Neocomplete and Eclim don't work together - eclim

with the default set up, there nothing shows about the auto completion,either no autocomplete shows up nor <C-X><C-U> key, the later shows "pattern not found", Is there anyone can tell me how to make it working?
here my vimrc file:
set nocompatible
syntax on
set laststatus=2
set encoding=utf-8
set guifont=Anonymous\ Pro\ for\ Powerline:h13
let g:Powerline_symbols = 'fancy'
if has("gui_running")
set guioptions=egmrt
set transparency=10
set guifont=menlo:h14
endif
imap jj <Esc>
set autoindent
set tabstop=4
set shiftwidth=4
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'
" My Bundles here:
" original repos on github
Bundle 'scrooloose/nerdtree'
Bundle 'majutsushi/tagbar'
Bundle 'tpope/vim-rails'
Bundle 'Shougo/neocomplcache'
Bundle 'nanotech/jellybeans.vim'
Bundle 'Rip-Rip/clang_complete'
Bundle 'osyo-manga/neocomplcache-clang_complete'
colorscheme jellybeans
Bundle 'godlygeek/tabular'
Bundle 'Lokaltog/vim-powerline'
Bundle 'tpope/vim-haml'
Bundle 'nathanaelkane/vim-indent-guides'
Bundle 'vim-ruby/vim-ruby'
Bundle 'kchmck/vim-coffee-script'
" vim-scripts repos
Bundle 'DrawIt'
Bundle 'tComment'
Bundle 'sudo.vim'
Bundle 'Align'
" non github repos
"Bundle 'git://git.wincent.com/command-t.git'
filetype plugin indent on " required!
nmap 88 :TagbarToggle<CR>
nmap 99 :NERDTreeToggle<CR>
" use neocomplcache & clang_complete
" add neocomplcache option
let g:neocomplcache_force_overwrite_completefunc=1
" add clang_complete option
let g:clang_complete_auto=1
" Disable AutoComplPop.
let g:acp_enableAtStartup = 0
" Use neocomplcache.
let g:neocomplcache_enable_at_startup = 1
" Use smartcase.
let g:neocomplcache_enable_smart_case = 1
" Use camel case completion.
let g:neocomplcache_enable_camel_case_completion = 1
" Use underbar completion.
let g:neocomplcache_enable_underbar_completion = 1
" Set minimum syntax keyword length.
let g:neocomplcache_min_syntax_length = 3
let g:neocomplcache_lock_buffer_name_pattern = '\*ku\*'
" Define dictionary.
let g:neocomplcache_dictionary_filetype_lists = {
\ 'default' : '',
\ 'vimshell' : $HOME.'/.vimshell_hist',
\ 'scheme' : $HOME.'/.gosh_completions'
\ }
" Define keyword.
if !exists('g:neocomplcache_keyword_patterns')
let g:neocomplcache_keyword_patterns = {}
endif
let g:neocomplcache_keyword_patterns['default'] = '\h\w*'
" Plugin key-mappings.
imap <C-k> <Plug>(neocomplcache_snippets_expand)
smap <C-k> <Plug>(neocomplcache_snippets_expand)
inoremap <expr><C-g> neocomplcache#undo_completion()
inoremap <expr><C-l> neocomplcache#complete_common_string()
" SuperTab like snippets behavior.
"imap <expr><TAB> neocomplcache#sources#snippets_complete#expandable() ? "\<Plug>(neocomplcache_snippets_expand)" : pumvisible() ? "\<C-n>" : "\<TAB>"
" Recommended key-mappings.
" <CR>: close popup and save indent.
inoremap <expr><CR> neocomplcache#smart_close_popup() . "\<CR>"
" <TAB>: completion.
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
" <C-h>, <BS>: close popup and delete backword char.
inoremap <expr><C-h> neocomplcache#smart_close_popup()."\<C-h>"
inoremap <expr><BS> neocomplcache#smart_close_popup()."\<C-h>"
inoremap <expr><C-y> neocomplcache#close_popup()
inoremap <expr><C-e> neocomplcache#cancel_popup()
" AutoComplPop like behavior.
"let g:neocomplcache_enable_auto_select = 1
" Shell like behavior(not recommended).
"set completeopt+=longest
"let g:neocomplcache_enable_auto_select = 1
"let g:neocomplcache_disable_auto_complete = 1
"inoremap <expr><TAB> pumvisible() ? "\<Down>" : "\<TAB>"
"inoremap <expr><CR> neocomplcache#smart_close_popup() . "\<CR>"
" Enable omni completion.
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags
" Enable heavy omni completion.
if !exists('g:neocomplcache_omni_patterns')
let g:neocomplcache_omni_patterns = {}
endif
let g:neocomplcache_omni_patterns.ruby = '[^. *\t]\.\w*\|\h\w*::'
"autocmd FileType ruby setlocal omnifunc=rubycomplete#Complete
let g:neocomplcache_omni_patterns.php = '[^. \t]->\h\w*\|\h\w*::'

Put this in your vimrc
let g:EclimCompletionMethod = 'omnifunc'
Check out http://eclim.org/vim/code_completion.html for more information.

Related

is there a way to check if a file exists with the glob * in Unix Shell Scripting?

Suppose I have the file "FILE_${RUNDATE}_0957_PROD.csv" to check if it doesn't exist, it must bypass the IF statement. If I setenv the variable $FILENAME with the full name it works with the code below, but using the '*' reg-ex ("0957" represents a timestamp which I don't know the exact value) it enters into the IF statement.
#!/bin/csh -f
set RUNDATE = `date +'%Y%m%d'`
setenv FILENAME "DATA_${RUNDATE}_*_PROD.csv"
if ( ! -eq "$FILENAME" ) then
/bin/echo "File NOT Found Locally! \n"
endif

How to create folder by Date time in batch file

I am trying to create a folder by date time in my batch file using following code
#echo off & for /F "tokens=1-4 delims=/ " %%A in ('date/t') do (
set DateDay=%%A
set DateMonth=%%B
set Date=%%C
set DateYear=%%D
)
#echo off & for /F "tokens=1-4 delims=/ " %%D in ('time/t') do (
set DateTime=%%D
)
set CurrentDate=%Date%-%DateMonth%-%DateYear%-0%time:~0,2%.%time:~3,2%.%time:~6,2%
mkdir %CurrentDate%
using this I get folder name as 22-02-2021-010.01.37
But if time Hours is in 1 to 9 hr my folder is displayed as
22-02-2021-0 9.59.19 there is always a space in 0 and 9 and 1 to 9 hr is not displayed as 01,02,03 Hr
Answer Should Be:
22-02-2021-009.59.19
The best and the correct method to get this is to use the date independently of the region day/month order, you can use "WMIC os GET LocalDateTime" as a source, since it's in ISO order:
#echo off
Title Get FileName With Date and Time
Call :GetFileNameWithDateTime MyCurrentDate
echo %MyCurrentDate%
MkDir %MyCurrentDate%
pause & exit
::----------------------------------------------------------------------------------
:GetFileNameWithDateTime <FileName>
for /f "skip=1" %%x in ('wmic os get localdatetime') do if not defined MyDate set "MyDate=%%x"
set "%1=%MyDate:~0,4%-%MyDate:~4,2%-%MyDate:~6,2%-%MyDate:~8,2%-%MyDate:~10,2%"
Exit /B
::----------------------------------------------------------------------------------
set "CurrentDate=%Date%-%DateMonth%-%DateYear%-0%time:~0,2%.%time:~3,2%.%time:~6,2%"
set "CurrentDate=%currentDate: =0%"
mkdir %CurrentDate%
substituting 0 for in currentdate
Tips : Use set "var1=data" for setting values - this avoids problems caused by trailing spaces. In comparisons, use if "thing1" == "thing2" ... to avoid problems caused by spaces in thing1/2.
If you want something which will work on any modern system, and still output the directory name in your specific format/order, regardless of user or locale settings, then…
you could do it like this from a batch-file:
#For /F "Tokens=1-6 Delims=/: " %%G In ('%SystemRoot%\System32\Robocopy.exe \: . /NJH /L ^| %SystemRoot%\System32\find.exe " 123"') Do #MD "%%I-%%H-%%G-0%%J.%%K.%%L"
or directly from the Windows command-line, cmd.exe:
For /F "Tokens=1-6 Delims=/: " %G In ('%SystemRoot%\System32\Robocopy.exe \: . /NJH /L ^| %SystemRoot%\System32\find.exe " 123"') Do #MD %I-%H-%G-0%J.%K.%L

Bitbake depends AAA packet, it will rdepends AAA-dev

I add depends packet to a exist .bb file, such as add DPENDS="AAA" line to .bb file, when I compile the .bb file, it failed for XXX rdepends on AAA-dev [dev-deps], and I search google, all the answer almost is add line INSANE_SKIP_${PN} += "dev-deps" or RDEPENDS_${PN}_remove = "AAA-dev" to .bb file.
But my question is why? why one packet depend AAA packet, it should also RDPENDS AAA-dev, is there any other answer to fix this problem
The bb source file is:
inherit autotools qcommon
DESCRIPTION = "Daemon to handle AT commands"
DEPENDS = "glib-2.0 qmi qmi-framework qmi-client-helper ocean-link"
SRC_DIR = "${WORKSPACE}/atfwd-daemon/"
S = "${WORKDIR}/atfwd-daemon/"
PR = "r3"
EXTRA_OECONF += "--with-glib --with-common-includes=${STAGING_INCDIR}"
do_configure_append() {
echo "/*This is compiled to generate, only look don't try*/" > ${S}atfwd_config.h
echo "#ifndef _ATFWD_CONFIG_H_" >> ${S}atfwd_config.h
echo "#define _ATFWD_CONFIG_H_" >> ${S}atfwd_config.h
#//<!-- ODM feature caogang#2015-07-13
if [ "${PRJ_NAU8810}" = "NAU8810_CODEC" ]; then
echo "#define NAU8810_CODEC" >> ${S}atfwd_config.h
fi
if [ "${FEATURE_ACDB_ENABLE}" = "true" ]; then
echo "#define FEATURE_ACDB_ENABLE 1" >> ${S}atfwd_config.h
fi
if [ "${PRJ_XXX}" != "" ]; then
echo "#define ${PRJ_XXX}" >> ${S}atfwd_config.h
fi
#//end-->
I add a DEPENDS on onenet pkg
inherit autotools qcommon
DESCRIPTION = "Daemon to handle AT commands"
DEPENDS = "glib-2.0 qmi qmi-framework qmi-client-helper ocean-link onenet"
SRC_DIR = "${WORKSPACE}/atfwd-daemon/"
S = "${WORKDIR}/atfwd-daemon/"
PR = "r3"
EXTRA_OECONF += "--with-glib --with-common-includes=${STAGING_INCDIR}"
do_configure_append() {
echo "/*This is compiled to generate, only look don't try*/" > ${S}atfwd_config.h
echo "#ifndef _ATFWD_CONFIG_H_" >> ${S}atfwd_config.h
echo "#define _ATFWD_CONFIG_H_" >> ${S}atfwd_config.h
#//<!-- ODM feature caogang#2015-07-13
if [ "${PRJ_NAU8810}" = "NAU8810_CODEC" ]; then
echo "#define NAU8810_CODEC" >> ${S}atfwd_config.h
fi
if [ "${FEATURE_ACDB_ENABLE}" = "true" ]; then
echo "#define FEATURE_ACDB_ENABLE 1" >> ${S}atfwd_config.h
fi
if [ "${PRJ_XXX}" != "" ]; then
echo "#define ${PRJ_XXX}" >> ${S}atfwd_config.h
fi
#//end-->
The onenet.bb is:
inherit pkgconfig cmake
DESCRIPTION = "onenet sdk"
LICENSE = "PD"
PR = "r0"
LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE;md5=bae84cdd023be37582157d865da54cc6"
SRCREV = "065d98dd8de91544315d6167ce73626ce739666d"
SRC_URI = "git://github.com/cm-heclouds/MQTT.git;protocol=https"
S = "${WORKDIR}/git/mqtt_sdk"
do_install() {
install -d ${D}/usr/lib
install -d ${D}/usr/include/onenet
install -m 0644 ${B}/bin/libmqtt.so -D ${D}/usr/lib/
for inc in $(find ${S} -name *.h ! -name 'cJSON.h'); do
install -m 0644 ${inc} -D ${D}/usr/include/onenet
done
}s
The sanity check documentation explains this:
dev-deps: Checks that all packages except -dev or -staticdev packages
do not depend on -dev packages, which would be a packaging bug.
It's telling you that in your current recipe "XXX" runtime-depends on "AAA-dev" and that this is a normally an error. You need to find out how/why this dependency is added before you can decide what the correct solution is.
Based on the added recipes: The issue seems to be that onenet build produces an unversioned ".so" file. This is typically a mistake (the actual library file should be e.g. "libmqtt.so.1.1" and the unversioned file should just be a symlink to the versioned one). I'm very surprised that you are not getting a fatal error on this issue when you build onenet. Are you suppressing the QA error for this?
Since you've managed to build onenet somehow, you now probably have a onenet-dev package that erroneously contains the actual library: The build system notices this during atfwd-daemon build, adds a runtime dependency to onenet-dev (because that's where the library is) and then the QA error triggers because normal packages should not depend on -dev packages.
Possible fixes:
Either fix the onenet build system so it produces a versioned library, or
Force the .so file to be packaged into the actual onenet package instead of onenet-dev, like this:
FILES_${PN}-dev = "${includedir}/"
FILES_${PN} += "${libdir}/libmqtt.so"
A bonus suggestion: Using directory variables instead of paths like /usr/include and /usr/lib (like I did above) is a good "Best Practice".

Copy a directory over http within a windows batch file

I need a command to use in a batch file, which copies the contents of a remote directory to a local directory over http.
For example to copy folder http ://path//folder to C:\folder
I need to do this without installing any additional tools.
Thanks in advance!
There's no standard way for an http server to list accessible directories.
For example I took http://unomoralez.com/content/files/catalog2/source/ as one of the common ways to list directory with http. Your site could look different though but there's no way for me tho know... (ther's a temp list2.txt file - you can remark its deletion to check the format of directory page and tell me if its not working. IF it is IIS could look like this: http://live.sysinternals.com/tools/)
the script downloads all content into .\download_dir (not recursive download) :
#if (#X)==(#Y) #end /****** jscript comment ******
#echo off
::::::::::::::::::::::::::::::::::::
::: compile the script ::::
::::::::::::::::::::::::::::::::::::
setlocal
if exist simpledownloader.exe goto :skip_compilation
set "frm=%SystemRoot%\Microsoft.NET\Framework\"
:: searching the latest installed .net framework
for /f "tokens=* delims=" %%v in ('dir /b /s /a:d /o:-n "%SystemRoot%\Microsoft.NET\Framework\v*"') do (
if exist "%%v\jsc.exe" (
rem :: the javascript.net compiler
set "jsc=%%~dpsnfxv\jsc.exe"
goto :break_loop
)
)
echo jsc.exe not found && exit /b 0
:break_loop
call %jsc% /nologo /out:"simpledownloader.exe" "%~dpsfnx0"
::::::::::::::::::::::::::::::::::::
::: end of compilation ::::
::::::::::::::::::::::::::::::::::::
:skip_compilation
:: download the file
:::::::::::::::::::::::::::::::::::::::::
::::just change the link and the file::::
:::::::::::::::::::::::::::::::::::::::::
::!!!!!!!!!!!!!!!!!!!!!!!!!:::
simpledownloader.exe "http://unomoralez.com/content/files/catalog2/source/" "list2.txt"
md download_dir >nul 2>&1
for /f "skip=1 tokens=4 delims=>< " %%a in ('type list2.txt^| find /i "href" ') do (
simpledownloader.exe "http://unomoralez.com/content/files/catalog2/source/%%a" .\download_dir\%%a
)
del /q /f list2.txt
exit /b 0
****** end of jscript comment ******/
import System;
var arguments:String[] = Environment.GetCommandLineArgs();
var webClient:System.Net.WebClient = new System.Net.WebClient();
print("Downloading " + arguments[1] + " to " + arguments[2]);
try {
webClient.DownloadFile(arguments[1], arguments[2]);
} catch (e) {
Console.BackgroundColor = ConsoleColor.Green;
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("\n\nProblem with downloading " + arguments[1] + " to " + arguments[2] + "Check if the internet address is valid");
Console.ResetColor();
Environment.Exit(5);
}
As you have powershell you also have .net so this code will be executed without problems for you.
This was more or less a code that I already had but you can also check this -> https://code.google.com/p/curlie/ if you are familiar with cURL and create a hybrid jscript/.bat file.

Custom rubble in Aptana not activated automatically

I am new to Aptana, so I could be missing something obvious. My problem in that bundle I created does not get activated when Aptana is loaded. I have to update date of the rubble.rb file for it to work.
touch ~/Documents/Aptana Rubles/ioncubeEncode.ruble
After I do that, for the rest of that Aptana session things are peachy.
I do not think it is relevant, but here is bundle code, which works just fine (when it works):
require 'ruble'
#Ruble::Logger.log_level = :trace
bundle do |bundle|
bundle.author = "Sasha"
bundle.copyright = "None"
bundle.display_name = "Ioncube Encode"
bundle.description = "Encode just saved php file form base_local to base folder"
end
command "Ioncube Encode" do |cmd|
cmd.input = :document
cmd.output = :output_to_console
cmd.trigger = :execution_listener , "org.eclipse.ui.file.save"
cmd.invoke do |ctx|
source_path = ENV['TM_FILEPATH']
ext = File.extname(source_path)
if ext == '.php'
if ( source_path =~ /base_local/)
destination_path = source_path.sub('/base_local/','/base/')
#CONSOLE.puts "Ioncube Encoding: " + source_path + " to " + destination_path
exec="/usr/local/ioncube/ioncube_encoder5 -v --optimize more --without-loader-check " + source_path + " -o " +destination_path + " 2>&1"
IO.popen(exec, 'r+') do |io|
io.close_write
CONSOLE.puts io.read
end
end
end
end
end
This might not seem like a big deal but it bothers me - a lot.

Resources