Migrated vim+vundle config to neovim+plug
This commit is contained in:
commit
b531014a99
20 changed files with 2861 additions and 0 deletions
1
after/ftplugin/bib.vim
Normal file
1
after/ftplugin/bib.vim
Normal file
|
@ -0,0 +1 @@
|
|||
map <nowait> <silent> <Leader>f :%!bibformat<CR>
|
3
after/ftplugin/c.vim
Normal file
3
after/ftplugin/c.vim
Normal file
|
@ -0,0 +1,3 @@
|
|||
let c_space_errors = 1
|
||||
let c_space_errors = 1
|
||||
let c_no_comment_fold = 1
|
42
after/ftplugin/java.vim
Normal file
42
after/ftplugin/java.vim
Normal file
|
@ -0,0 +1,42 @@
|
|||
iab <buffer> syso System.out.println
|
||||
|
||||
setlocal foldmethod=syntax
|
||||
setlocal foldenable
|
||||
setlocal textwidth=120
|
||||
|
||||
nnoremap <silent> <buffer> <leader>jc :JavaCorrect<cr>
|
||||
nnoremap <silent> <buffer> <leader>jd :JavaDocComment<cr>
|
||||
nnoremap <silent> <buffer> <F2> :JavaDocPreview<cr>
|
||||
nnoremap <silent> <buffer> <F3> :JavaSearchContext<cr>
|
||||
nnoremap <silent> <buffer> <leader>jf :%JavaFormat<cr>
|
||||
nnoremap <silent> <buffer> <leader>ji :JavaImportOrganize<cr>
|
||||
nnoremap <buffer> <leader>jr :JavaRename<space>
|
||||
|
||||
inoremap <expr> <C-Space> pumvisible() \|\| &omnifunc == '' ?
|
||||
\ "\<lt>C-n>" :
|
||||
\ "\<lt>C-x>\<lt>C-o><c-r>=pumvisible() ?" .
|
||||
\ "\"\\<lt>c-n>\\<lt>c-p>\\<lt>c-n>\" :" .
|
||||
\ "\" \\<lt>bs>\\<lt>C-n>\"\<CR>"
|
||||
imap <C-@> <C-Space>map <silent> <buffer> <C-Space> <C-x><C-o>
|
||||
|
||||
function! InsertJavaPackage()
|
||||
let filename = expand("%")
|
||||
let filename = substitute(filename, "\.java$", "", "")
|
||||
let dir = getcwd() . "/" . filename
|
||||
let dir = substitute(dir, "^.*\/src\/", "", "")
|
||||
let dir = substitute(dir, "\/[^\/]*$", "", "")
|
||||
let dir = substitute(dir, "\/", ".", "g")
|
||||
let filename = substitute(filename, "^.*\/", "", "")
|
||||
let dir = "package " . dir . ";"
|
||||
let result = append(0, dir)
|
||||
let result = append(1, "")
|
||||
let result = append(2, "class " . filename . " {")
|
||||
let result = append(4, "}")
|
||||
endfunction
|
||||
|
||||
"java {{{
|
||||
"if filereadable(bufname("%")) == 0
|
||||
" call InsertJavaPackage()
|
||||
"endif
|
||||
|
||||
"}}}
|
3
after/ftplugin/ledger.vim
Normal file
3
after/ftplugin/ledger.vim
Normal file
|
@ -0,0 +1,3 @@
|
|||
inoremap <S-TAB> <TAB>
|
||||
inoremap <TAB> <C-R>=SmartTab()<CR>
|
||||
inoremap <BS> <C-R>=SmartDelete()<CR>
|
12
after/ftplugin/ruby.vim
Normal file
12
after/ftplugin/ruby.vim
Normal file
|
@ -0,0 +1,12 @@
|
|||
setl sts=2
|
||||
setl sw=2
|
||||
setl expandtab
|
||||
setl omnifunc=rubycomplete#Complete
|
||||
let g:rubycomplete_buffer_loading = 1
|
||||
let g:rubycomplete_classes_in_global = 1
|
||||
|
||||
nmap K :!ri <cword><cr>
|
||||
|
||||
hi link rubySymbol Special
|
||||
|
||||
source $MYVIMDIR/bundle/ri-browser/ftplugin/ri.vim
|
52
after/ftplugin/tex.vim
Normal file
52
after/ftplugin/tex.vim
Normal file
|
@ -0,0 +1,52 @@
|
|||
" set makeprg=latexmk
|
||||
|
||||
setlocal errorformat=%f:%l:\ %m,%f:%l-%\\d%\\+:\ %m
|
||||
if filereadable('Makefile')
|
||||
setlocal makeprg=make
|
||||
else
|
||||
exec "setlocal makeprg=make\\ -f\\ ~/.config/makefiles/latex.mk\\ " . substitute(bufname("%"),"tex$","pdf", "")
|
||||
endif
|
||||
|
||||
let g:LatexBox_completion_environments += [
|
||||
\ {'word': 'frame', 'menu': 'beamer frame'},
|
||||
\ {'word': 'block', 'menu': 'beamer block'},
|
||||
\ {'word': 'alertblock', 'menu': 'beamer block'},
|
||||
\ {'word': 'tikzpicture', 'menu': 'tikz'},
|
||||
\ {'word': 'cases', 'menu': 'math cases'},
|
||||
\ {'word': 'lstlisting', 'menu': 'code listing'},
|
||||
\ {'word': 'matrix', 'menu': 'matrix'},
|
||||
\ {'word': 'pmatrix', 'menu': '(matrix)'},
|
||||
\ {'word': 'bmatrix', 'menu': '[matrix]'},
|
||||
\ {'word': 'Bmatrix', 'menu': '{matrix}'},
|
||||
\ {'word': 'subfigure', 'menu': 'subfigure'},
|
||||
\ {'word': 'split', 'menu': 'math split'},
|
||||
\]
|
||||
|
||||
let g:LatexBox_completion_commands += [
|
||||
\ {'word': '\ExplSyntaxOn', 'menu': 'start LaTeX3 syntax'},
|
||||
\ {'word': '\ExplSyntaxOff', 'menu': 'stop LaTeX3 syntax'},
|
||||
\ {'word': '\frametitle', 'menu': 'beamer title'},
|
||||
\ {'word': '\alert', 'menu': 'beamer title'},
|
||||
\ {'word': '\uncover<', 'menu': 'beamer uncover', 'abbr': '\uncover'}
|
||||
\]
|
||||
|
||||
if exists("&cole")
|
||||
" conceal" Use conceal vim 7.3 feature:
|
||||
set cole=0 " conceal level
|
||||
" Conceal in tex file: "admgs", a=accents, d=delimiters, m=math symbols,
|
||||
" g=Greek, s=superscripts/subscripts:
|
||||
let g:tex_conceal="agm"
|
||||
endif
|
||||
|
||||
imap <buffer> [[ \begin{<C-x><C-o>
|
||||
imap <buffer> ]] <Plug>LatexCloseCurEnv
|
||||
imap <buffer> [( \left(
|
||||
|
||||
nmap <buffer> <F5> <Plug>LatexChangeEnv
|
||||
vmap <buffer> <leader>tw <Plug>LatexWrapSelection
|
||||
vmap <buffer> <leader>tW <Plug>LatexEnvWrapSelection
|
||||
|
||||
map <silent> <buffer> <F10> :exec "silent !xdg-open" expand("%:t:r") . ".pdf &>/dev/null"<cr><C-l>
|
||||
map <silent> <buffer> <expr> <F9> vimproc#system_bg("latexmk " . expand("%") . " &")
|
||||
|
||||
setlocal tw=100
|
5
after/ftplugin/treetop.vim
Normal file
5
after/ftplugin/treetop.vim
Normal file
|
@ -0,0 +1,5 @@
|
|||
setl sts=2
|
||||
setl sw=2
|
||||
setl expandtab
|
||||
|
||||
"source $HOME/bundle/ri-browser/ftplugin/ri.vim
|
1
after/ftplugin/xwiki.vim
Normal file
1
after/ftplugin/xwiki.vim
Normal file
|
@ -0,0 +1 @@
|
|||
set tw=0
|
1
after/ftplugin/zsh.vim
Normal file
1
after/ftplugin/zsh.vim
Normal file
|
@ -0,0 +1 @@
|
|||
set ts=4 sw=4
|
Loading…
Add table
Add a link
Reference in a new issue