Use <plug>(vl-...) instead of <plug>VimLatex

This commit is contained in:
Karl Yngve Lervåg 2015-01-30 19:47:19 +01:00
parent de98b867e3
commit 5f7d78383e
7 changed files with 106 additions and 107 deletions

View File

@ -149,9 +149,9 @@ function! s:init_environment() " {{{1
command! -buffer VimLatexReinitialize call latex#reinit() command! -buffer VimLatexReinitialize call latex#reinit()
" Define mappings " Define mappings
nnoremap <buffer> <plug>VimLatexInfo :call latex#info()<cr> nnoremap <buffer> <plug>(vl-info) :call latex#info()<cr>
nnoremap <buffer> <plug>VimLatexHelp :call latex#help()<cr> nnoremap <buffer> <plug>(vl-help) :call latex#help()<cr>
nnoremap <buffer> <plug>VimLatexReinit :call latex#reinit()<cr> nnoremap <buffer> <plug>(vl-reinit) :call latex#reinit()<cr>
endfunction endfunction
function! s:init_errorformat() " {{{1 function! s:init_errorformat() " {{{1

View File

@ -5,15 +5,15 @@
" "
function! latex#change#init(initialized) " {{{1 function! latex#change#init(initialized) " {{{1
nnoremap <buffer> <plug>VimLatexDeleteEnv :call latex#change#env('')<cr> nnoremap <buffer> <plug>(vl-delete-env) :call latex#change#env('')<cr>
nnoremap <buffer> <plug>VimLatexDeleteCmd vaBom`o<esc>xg``xdF\ nnoremap <buffer> <plug>(vl-delete-cmd) vaBom`o<esc>xg``xdF\
nnoremap <buffer> <plug>VimLatexChangeEnv :call latex#change#env_prompt()<cr> nnoremap <buffer> <plug>(vl-change-env) :call latex#change#env_prompt()<cr>
nnoremap <buffer> <plug>VimLatexChangeCmd :call latex#change#command()<cr> nnoremap <buffer> <plug>(vl-change-cmd) :call latex#change#command()<cr>
nnoremap <buffer> <plug>VimLatexToggleEnvStar :call latex#change#toggle_env_star()<cr> nnoremap <buffer> <plug>(vl-toggle-star) :call latex#change#toggle_env_star()<cr>
nnoremap <buffer> <plug>VimLatexToggleDelim :call latex#change#toggle_delim()<cr> nnoremap <buffer> <plug>(vl-toggle-delim) :call latex#change#toggle_delim()<cr>
nnoremap <buffer> <plug>VimLatexChangeToCmd :call latex#change#to_command()<cr>i nnoremap <buffer> <plug>(vl-create-cmd) :call latex#change#to_command()<cr>i
inoremap <buffer> <plug>VimLatexChangeToCmd <c-r>=latex#change#to_command()<cr> inoremap <buffer> <plug>(vl-create-cmd) <c-r>=latex#change#to_command()<cr>
inoremap <buffer> <plug>VimLatexCloseEnv <c-r>=latex#change#close_environment()<cr> inoremap <buffer> <plug>(vl-close-env) <c-r>=latex#change#close_environment()<cr>
endfunction endfunction
function! latex#change#command() " {{{1 function! latex#change#command() " {{{1

View File

@ -42,17 +42,17 @@ function! latex#latexmk#init(initialized) " {{{1
command! -buffer -bang VimLatexStatus call latex#latexmk#status(<q-bang> == "!") command! -buffer -bang VimLatexStatus call latex#latexmk#status(<q-bang> == "!")
" Define mappings " Define mappings
nnoremap <buffer> <plug>VimLatexCompile :call latex#latexmk#compile()<cr> nnoremap <buffer> <plug>(vl-compile) :call latex#latexmk#compile()<cr>
nnoremap <buffer> <plug>VimLatexCompileSS :call latex#latexmk#compile_ss(0)<cr> nnoremap <buffer> <plug>(vl-compile-ss) :call latex#latexmk#compile_ss(0)<cr>
nnoremap <buffer> <plug>VimLatexCompileToggle :call latex#latexmk#toggle()<cr> nnoremap <buffer> <plug>(vl-compile-toggle) :call latex#latexmk#toggle()<cr>
nnoremap <buffer> <plug>VimLatexCompileOutput :call latex#latexmk#output()<cr> nnoremap <buffer> <plug>(vl-compile-output) :call latex#latexmk#output()<cr>
nnoremap <buffer> <plug>VimLatexStop :call latex#latexmk#stop()<cr> nnoremap <buffer> <plug>(vl-stop) :call latex#latexmk#stop()<cr>
nnoremap <buffer> <plug>VimLatexStopAll :call latex#latexmk#stop_all()<cr> nnoremap <buffer> <plug>(vl-stop-all) :call latex#latexmk#stop_all()<cr>
nnoremap <buffer> <plug>VimLatexErrors :call latex#latexmk#errors(1)<cr> nnoremap <buffer> <plug>(vl-errors) :call latex#latexmk#errors(1)<cr>
nnoremap <buffer> <plug>VimLatexClean :call latex#latexmk#clean(0)<cr> nnoremap <buffer> <plug>(vl-clean) :call latex#latexmk#clean(0)<cr>
nnoremap <buffer> <plug>VimLatexCleanFull :call latex#latexmk#clean(1)<cr> nnoremap <buffer> <plug>(vl-clean-full) :call latex#latexmk#clean(1)<cr>
nnoremap <buffer> <plug>VimLatexStatus :call latex#latexmk#status(0)<cr> nnoremap <buffer> <plug>(vl-status) :call latex#latexmk#status(0)<cr>
nnoremap <buffer> <plug>VimLatexStatusAll :call latex#latexmk#status(1)<cr> nnoremap <buffer> <plug>(vl-status-all) :call latex#latexmk#status(1)<cr>
" The remaining part is only relevant for continuous mode " The remaining part is only relevant for continuous mode
if !g:latex_latexmk_continuous | return | endif if !g:latex_latexmk_continuous | return | endif

View File

@ -8,72 +8,71 @@ function! latex#mappings#init(initialized)
call latex#util#set_default('g:latex_mappings_enabled', 1) call latex#util#set_default('g:latex_mappings_enabled', 1)
if !g:latex_mappings_enabled | return | endif if !g:latex_mappings_enabled | return | endif
nmap <buffer> <localleader>li <plug>VimLatexInfo nmap <silent><buffer> <localleader>li <plug>(vl-info)
nmap <buffer> <localleader>lh <plug>VimLatexHelp nmap <silent><buffer> <localleader>lh <plug>(vl-help)
nmap <buffer> <localleader>lR <plug>VimLatexReinit nmap <silent><buffer> <localleader>lR <plug>(vl-reinit)
" Change nmap <silent><buffer> dse <plug>(vl-delete-env)
nnoremap <buffer> dse <plug>VimLatexDeleteEnv nmap <silent><buffer> dsc <plug>(vl-delete-cmd)
nnoremap <buffer> dsc <plug>VimLatexDeleteCmd nmap <silent><buffer> cse <plug>(vl-change-env)
nnoremap <buffer> cse <plug>VimLatexChangeEnv nmap <silent><buffer> csc <plug>(vl-change-cmd)
nnoremap <buffer> csc <plug>VimLatexChangeCmd nmap <silent><buffer> tse <plug>(vl-toggle-star)
nnoremap <buffer> tse <plug>VimLatexToggleEnvStar nmap <silent><buffer> tsd <plug>(vl-toggle-delim)
nnoremap <buffer> tsd <plug>VimLatexToggleDelim nmap <silent><buffer> <F7> <plug>(vl-create-cmd)
nnoremap <buffer> <F7> <plug>VimLatexChangeToCmd imap <silent><buffer> <F7> <plug>(vl-create-cmd)
inoremap <buffer> <F7> <plug>VimLatexChangeToCmd imap <silent><buffer> ]] <plug>(vl-close-env)
inoremap <buffer> ]] <plug>VimLatexCloseEnv
if g:latex_latexmk_enabled if g:latex_latexmk_enabled
nmap <buffer> <localleader>ll <plug>VimLatexCompileToggle nmap <silent><buffer> <localleader>ll <plug>(vl-compile-toggle)
nmap <buffer> <localleader>lo <plug>VimLatexCompileOutput nmap <silent><buffer> <localleader>lo <plug>(vl-compile-output)
nmap <buffer> <localleader>lk <plug>VimLatexStop nmap <silent><buffer> <localleader>lk <plug>(vl-stop)
nmap <buffer> <localleader>lK <plug>VimLatexStopAll nmap <silent><buffer> <localleader>lK <plug>(vl-stop-all)
nmap <buffer> <localleader>le <plug>VimLatexErrors nmap <silent><buffer> <localleader>le <plug>(vl-errors)
nmap <buffer> <localleader>lc <plug>VimLatexClean nmap <silent><buffer> <localleader>lc <plug>(vl-clean)
nmap <buffer> <localleader>lC <plug>VimLatexCleanFull nmap <silent><buffer> <localleader>lC <plug>(vl-clean-full)
nmap <buffer> <localleader>lg <plug>VimLatexStatus nmap <silent><buffer> <localleader>lg <plug>(vl-status)
nmap <buffer> <localleader>lG <plug>VimLatexStatusAll nmap <silent><buffer> <localleader>lG <plug>(vl-status-all)
endif endif
if g:latex_motion_enabled if g:latex_motion_enabled
nmap <buffer> % <plug>VimLatex% nmap <silent><buffer> % <plug>(vl-%)
xmap <buffer> % <plug>VimLatex% xmap <silent><buffer> % <plug>(vl-%)
omap <buffer> % <plug>VimLatex% omap <silent><buffer> % <plug>(vl-%)
nmap <buffer> ]] <plug>VimLatex]] nmap <silent><buffer> ]] <plug>(vl-]])
nmap <buffer> ][ <plug>VimLatex][ nmap <silent><buffer> ][ <plug>(vl-][)
nmap <buffer> [] <plug>VimLatex[] nmap <silent><buffer> [] <plug>(vl-[])
nmap <buffer> [[ <plug>VimLatex[[ nmap <silent><buffer> [[ <plug>(vl-[[)
xmap <buffer> ]] <plug>VimLatex]] xmap <silent><buffer> ]] <plug>(vl-]])
xmap <buffer> ][ <plug>VimLatex][ xmap <silent><buffer> ][ <plug>(vl-][)
xmap <buffer> [] <plug>VimLatex[] xmap <silent><buffer> [] <plug>(vl-[])
xmap <buffer> [[ <plug>VimLatex[[ xmap <silent><buffer> [[ <plug>(vl-[[)
omap <buffer> ]] <plug>VimLatex]] omap <silent><buffer> ]] <plug>(vl-]])
omap <buffer> ][ <plug>VimLatex][ omap <silent><buffer> ][ <plug>(vl-][)
omap <buffer> [] <plug>VimLatex[] omap <silent><buffer> [] <plug>(vl-[])
omap <buffer> [[ <plug>VimLatex[[ omap <silent><buffer> [[ <plug>(vl-[[)
xmap <buffer> ie <plug>VimLatexie xmap <silent><buffer> ie <plug>(vl-ie)
xmap <buffer> ae <plug>VimLatexae xmap <silent><buffer> ae <plug>(vl-ae)
omap <buffer> ie <plug>VimLatexie omap <silent><buffer> ie <plug>(vl-ie)
omap <buffer> ae <plug>VimLatexae omap <silent><buffer> ae <plug>(vl-ae)
xmap <buffer> i$ <plug>VimLatexi$ xmap <silent><buffer> i$ <plug>(vl-i$)
xmap <buffer> a$ <plug>VimLatexa$ xmap <silent><buffer> a$ <plug>(vl-a$)
omap <buffer> i$ <plug>VimLatexi$ omap <silent><buffer> i$ <plug>(vl-i$)
omap <buffer> a$ <plug>VimLatexa$ omap <silent><buffer> a$ <plug>(vl-a$)
xmap <buffer> id <plug>VimLatexid xmap <silent><buffer> id <plug>(vl-id)
xmap <buffer> ad <plug>VimLatexad xmap <silent><buffer> ad <plug>(vl-ad)
omap <buffer> id <plug>VimLatexid omap <silent><buffer> id <plug>(vl-id)
omap <buffer> ad <plug>VimLatexad omap <silent><buffer> ad <plug>(vl-ad)
endif endif
if g:latex_toc_enabled if g:latex_toc_enabled
nmap <buffer> <localleader>lt <plug>VimLatexTocOpen nmap <silent><buffer> <localleader>lt <plug>(vl-toc-open)
nmap <buffer> <localleader>lT <plug>VimLatexTocToggle nmap <silent><buffer> <localleader>lT <plug>(vl-toc-toggle)
endif endif
if g:latex_view_enabled if g:latex_view_enabled
nmap <buffer> <localleader>lv <plug>VimLatexView nmap <silent><buffer> <localleader>lv <plug>(vl-view)
if has_key(g:latex#data[b:latex.id], 'rsearch') if has_key(g:latex#data[b:latex.id], 'rsearch')
nmap <buffer> <localleader>lr <plug>VimLatexRSearch nmap <silent><buffer> <localleader>lr <plug>(vl-reverse-search)
endif endif
endif endif
endfunction endfunction

View File

@ -12,33 +12,33 @@ function! latex#motion#init(initialized) " {{{1
call latex#util#set_default('g:latex_motion_matchparen', 1) call latex#util#set_default('g:latex_motion_matchparen', 1)
" Define mappings " Define mappings
nnoremap <buffer> <plug>VimLatex% :call latex#motion#find_matching_pair()<cr> nnoremap <buffer> <plug>(vl-%) :call latex#motion#find_matching_pair()<cr>
xnoremap <buffer> <plug>VimLatex% :<c-u>call latex#motion#find_matching_pair(1)<cr> xnoremap <buffer> <plug>(vl-%) :<c-u>call latex#motion#find_matching_pair(1)<cr>
onoremap <buffer> <plug>VimLatex% :normal v%<cr> onoremap <buffer> <plug>(vl-%) :normal v%<cr>
nnoremap <buffer> <plug>VimLatex]] :call latex#motion#next_section(0,0,0)<cr> nnoremap <buffer> <plug>(vl-]]) :call latex#motion#next_section(0,0,0)<cr>
nnoremap <buffer> <plug>VimLatex][ :call latex#motion#next_section(1,0,0)<cr> nnoremap <buffer> <plug>(vl-][) :call latex#motion#next_section(1,0,0)<cr>
nnoremap <buffer> <plug>VimLatex[] :call latex#motion#next_section(1,1,0)<cr> nnoremap <buffer> <plug>(vl-[]) :call latex#motion#next_section(1,1,0)<cr>
nnoremap <buffer> <plug>VimLatex[[ :call latex#motion#next_section(0,1,0)<cr> nnoremap <buffer> <plug>(vl-[[) :call latex#motion#next_section(0,1,0)<cr>
xnoremap <buffer> <plug>VimLatex]] :<c-u>call latex#motion#next_section(0,0,1)<cr> xnoremap <buffer> <plug>(vl-]]) :<c-u>call latex#motion#next_section(0,0,1)<cr>
xnoremap <buffer> <plug>VimLatex][ :<c-u>call latex#motion#next_section(1,0,1)<cr> xnoremap <buffer> <plug>(vl-][) :<c-u>call latex#motion#next_section(1,0,1)<cr>
xnoremap <buffer> <plug>VimLatex[] :<c-u>call latex#motion#next_section(1,1,1)<cr> xnoremap <buffer> <plug>(vl-[]) :<c-u>call latex#motion#next_section(1,1,1)<cr>
xnoremap <buffer> <plug>VimLatex[[ :<c-u>call latex#motion#next_section(0,1,1)<cr> xnoremap <buffer> <plug>(vl-[[) :<c-u>call latex#motion#next_section(0,1,1)<cr>
onoremap <buffer> <plug>VimLatex]] :normal v]]<cr> onoremap <buffer> <plug>(vl-]]) :normal v]]<cr>
onoremap <buffer> <plug>VimLatex][ :normal v][<cr> onoremap <buffer> <plug>(vl-][) :normal v][<cr>
onoremap <buffer> <plug>VimLatex[] :normal v[]<cr> onoremap <buffer> <plug>(vl-[]) :normal v[]<cr>
onoremap <buffer> <plug>VimLatex[[ :normal v[[<cr> onoremap <buffer> <plug>(vl-[[) :normal v[[<cr>
xnoremap <buffer> <plug>VimLatexie :<c-u>call latex#motion#sel_environment(1)<cr> xnoremap <buffer> <plug>(vl-ie) :<c-u>call latex#motion#sel_environment(1)<cr>
xnoremap <buffer> <plug>VimLatexae :<c-u>call latex#motion#sel_environment()<cr> xnoremap <buffer> <plug>(vl-ae) :<c-u>call latex#motion#sel_environment()<cr>
onoremap <buffer> <plug>VimLatexie :normal vie<cr> onoremap <buffer> <plug>(vl-ie) :normal vie<cr>
onoremap <buffer> <plug>VimLatexae :normal vae<cr> onoremap <buffer> <plug>(vl-ae) :normal vae<cr>
xnoremap <buffer> <plug>VimLatexi$ :<c-u>call latex#motion#sel_inline_math(1)<cr> xnoremap <buffer> <plug>(vl-i$) :<c-u>call latex#motion#sel_inline_math(1)<cr>
xnoremap <buffer> <plug>VimLatexa$ :<c-u>call latex#motion#sel_inline_math()<cr> xnoremap <buffer> <plug>(vl-a$) :<c-u>call latex#motion#sel_inline_math()<cr>
onoremap <buffer> <plug>VimLatexi$ :normal vi$<cr> onoremap <buffer> <plug>(vl-i$) :normal vi$<cr>
onoremap <buffer> <plug>VimLatexa$ :normal va$<cr> onoremap <buffer> <plug>(vl-a$) :normal va$<cr>
xnoremap <buffer> <plug>VimLatexid :<c-u>call latex#motion#sel_delimiter(1)<cr> xnoremap <buffer> <plug>(vl-id) :<c-u>call latex#motion#sel_delimiter(1)<cr>
xnoremap <buffer> <plug>VimLatexad :<c-u>call latex#motion#sel_delimiter()<cr> xnoremap <buffer> <plug>(vl-ad) :<c-u>call latex#motion#sel_delimiter()<cr>
onoremap <buffer> <plug>VimLatexid :normal vi(<cr> onoremap <buffer> <plug>(vl-id) :normal vi(<cr>
onoremap <buffer> <plug>VimLatexad :normal va(<cr> onoremap <buffer> <plug>(vl-ad) :normal va(<cr>
" Highlight matching parens ($, (), ...) " Highlight matching parens ($, (), ...)
if !a:initialized && g:latex_motion_matchparen if !a:initialized && g:latex_motion_matchparen

View File

@ -27,8 +27,8 @@ function! latex#toc#init(initialized) " {{{1
command! -buffer VimLatexTocToggle call latex#toc#toggle() command! -buffer VimLatexTocToggle call latex#toc#toggle()
" Define mappings " Define mappings
nnoremap <buffer> <plug>VimLatexTocOpen :call latex#toc#open()<cr> nnoremap <buffer> <plug>(vl-toc-open) :call latex#toc#open()<cr>
nnoremap <buffer> <plug>VimLatexTocToggle :call latex#toc#toggle()<cr> nnoremap <buffer> <plug>(vl-toc-toggle) :call latex#toc#toggle()<cr>
endfunction endfunction
function! latex#toc#open() " {{{1 function! latex#toc#open() " {{{1

View File

@ -47,9 +47,9 @@ function! latex#view#init(initialized) " {{{1
endif endif
" Define mappings " Define mappings
nnoremap <buffer> <plug>VimLatexView :call g:latex#data[b:latex.id].view()<cr> nnoremap <buffer> <plug>(vl-view) :call g:latex#data[b:latex.id].view()<cr>
if has_key(data, 'rsearch') if has_key(data, 'rsearch')
nnoremap <buffer> <plug>VimLatexRSearch nnoremap <buffer> <plug>(vl-reverse-search)
\ :call g:latex#data[b:latex.id].rsearch()<cr> \ :call g:latex#data[b:latex.id].rsearch()<cr>
endif endif
endfunction endfunction