All pastes #1858836 Raw Edit

Stuff

public text v1 · immutable
#1858836 ·published 2010-04-08 12:27 UTC
rendered paste body
syntax on
set tabstop=4
set autoindent
set tags=~/files/dev/a/ctags
set complete=.,w,b,u,t,i
"set completefunc=MyTabComplete
set foldmethod=indent
au BufWinLeave * mkview
au BufWinEnter * silent loadview
set makeprg=vimAnt
autocmd BufNew,BufRead *.java inoremap <tab> <C-R>=My_TabComplete()<CR>

" javac efm
set efm=
\\ %#[javac]\ %#%f:%l:%c:%*\\d:%*\\d:\ %t%[%^:]%#:%m,
\%A\ %#[javac]\ %f:%l:\ %m,
\%-Z\ %#[javac]\ %p^,
\%-C\ %#[javac]\ symbol\ %#:\ %m,
\%-C%.%#,
\%A%f:%l:\ %m,
\%-Z%p^,
\%f:%l

" tab completion
function! My_TabComplete()
let line = getline('.')                         " curline
let substr = strpart(line, -1, col('.')+1)      " from start to cursor
let substr = matchstr(substr, "[^ \t]*$")       " word till cursor
if (strlen(substr)==0)                          " nothing to match on empty string
 return "\<tab>"
endif
let bool = match(substr, '\.')                  " position of period, if any  
if (bool==-1)
 return "\<C-X>\<C-P>"                         " existing text matching
else
 return "\<C-X>\<C-U>"                         " plugin matching 
endif
endfunction