diff --git a/autoload/latex.vim b/autoload/latex.vim index 293f8b3..3390374 100644 --- a/autoload/latex.vim +++ b/autoload/latex.vim @@ -149,9 +149,9 @@ function! s:init_environment() " {{{1 command! -buffer VimLatexReinitialize call latex#reinit() " Define mappings - nnoremap VimLatexInfo :call latex#info() - nnoremap VimLatexHelp :call latex#help() - nnoremap VimLatexReinit :call latex#reinit() + nnoremap (vl-info) :call latex#info() + nnoremap (vl-help) :call latex#help() + nnoremap (vl-reinit) :call latex#reinit() endfunction function! s:init_errorformat() " {{{1 diff --git a/autoload/latex/change.vim b/autoload/latex/change.vim index d617a0a..4a0d749 100644 --- a/autoload/latex/change.vim +++ b/autoload/latex/change.vim @@ -5,15 +5,15 @@ " function! latex#change#init(initialized) " {{{1 - nnoremap VimLatexDeleteEnv :call latex#change#env('') - nnoremap VimLatexDeleteCmd vaBom`oxg``xdF\ - nnoremap VimLatexChangeEnv :call latex#change#env_prompt() - nnoremap VimLatexChangeCmd :call latex#change#command() - nnoremap VimLatexToggleEnvStar :call latex#change#toggle_env_star() - nnoremap VimLatexToggleDelim :call latex#change#toggle_delim() - nnoremap VimLatexChangeToCmd :call latex#change#to_command()i - inoremap VimLatexChangeToCmd =latex#change#to_command() - inoremap VimLatexCloseEnv =latex#change#close_environment() + nnoremap (vl-delete-env) :call latex#change#env('') + nnoremap (vl-delete-cmd) vaBom`oxg``xdF\ + nnoremap (vl-change-env) :call latex#change#env_prompt() + nnoremap (vl-change-cmd) :call latex#change#command() + nnoremap (vl-toggle-star) :call latex#change#toggle_env_star() + nnoremap (vl-toggle-delim) :call latex#change#toggle_delim() + nnoremap (vl-create-cmd) :call latex#change#to_command()i + inoremap (vl-create-cmd) =latex#change#to_command() + inoremap (vl-close-env) =latex#change#close_environment() endfunction function! latex#change#command() " {{{1 diff --git a/autoload/latex/latexmk.vim b/autoload/latex/latexmk.vim index 8a3c779..66c6d87 100644 --- a/autoload/latex/latexmk.vim +++ b/autoload/latex/latexmk.vim @@ -42,17 +42,17 @@ function! latex#latexmk#init(initialized) " {{{1 command! -buffer -bang VimLatexStatus call latex#latexmk#status( == "!") " Define mappings - nnoremap VimLatexCompile :call latex#latexmk#compile() - nnoremap VimLatexCompileSS :call latex#latexmk#compile_ss(0) - nnoremap VimLatexCompileToggle :call latex#latexmk#toggle() - nnoremap VimLatexCompileOutput :call latex#latexmk#output() - nnoremap VimLatexStop :call latex#latexmk#stop() - nnoremap VimLatexStopAll :call latex#latexmk#stop_all() - nnoremap VimLatexErrors :call latex#latexmk#errors(1) - nnoremap VimLatexClean :call latex#latexmk#clean(0) - nnoremap VimLatexCleanFull :call latex#latexmk#clean(1) - nnoremap VimLatexStatus :call latex#latexmk#status(0) - nnoremap VimLatexStatusAll :call latex#latexmk#status(1) + nnoremap (vl-compile) :call latex#latexmk#compile() + nnoremap (vl-compile-ss) :call latex#latexmk#compile_ss(0) + nnoremap (vl-compile-toggle) :call latex#latexmk#toggle() + nnoremap (vl-compile-output) :call latex#latexmk#output() + nnoremap (vl-stop) :call latex#latexmk#stop() + nnoremap (vl-stop-all) :call latex#latexmk#stop_all() + nnoremap (vl-errors) :call latex#latexmk#errors(1) + nnoremap (vl-clean) :call latex#latexmk#clean(0) + nnoremap (vl-clean-full) :call latex#latexmk#clean(1) + nnoremap (vl-status) :call latex#latexmk#status(0) + nnoremap (vl-status-all) :call latex#latexmk#status(1) " The remaining part is only relevant for continuous mode if !g:latex_latexmk_continuous | return | endif diff --git a/autoload/latex/mappings.vim b/autoload/latex/mappings.vim index ccac404..acd122d 100644 --- a/autoload/latex/mappings.vim +++ b/autoload/latex/mappings.vim @@ -8,72 +8,71 @@ function! latex#mappings#init(initialized) call latex#util#set_default('g:latex_mappings_enabled', 1) if !g:latex_mappings_enabled | return | endif - nmap li VimLatexInfo - nmap lh VimLatexHelp - nmap lR VimLatexReinit + nmap li (vl-info) + nmap lh (vl-help) + nmap lR (vl-reinit) - " Change - nnoremap dse VimLatexDeleteEnv - nnoremap dsc VimLatexDeleteCmd - nnoremap cse VimLatexChangeEnv - nnoremap csc VimLatexChangeCmd - nnoremap tse VimLatexToggleEnvStar - nnoremap tsd VimLatexToggleDelim - nnoremap VimLatexChangeToCmd - inoremap VimLatexChangeToCmd - inoremap ]] VimLatexCloseEnv + nmap dse (vl-delete-env) + nmap dsc (vl-delete-cmd) + nmap cse (vl-change-env) + nmap csc (vl-change-cmd) + nmap tse (vl-toggle-star) + nmap tsd (vl-toggle-delim) + nmap (vl-create-cmd) + imap (vl-create-cmd) + imap ]] (vl-close-env) if g:latex_latexmk_enabled - nmap ll VimLatexCompileToggle - nmap lo VimLatexCompileOutput - nmap lk VimLatexStop - nmap lK VimLatexStopAll - nmap le VimLatexErrors - nmap lc VimLatexClean - nmap lC VimLatexCleanFull - nmap lg VimLatexStatus - nmap lG VimLatexStatusAll + nmap ll (vl-compile-toggle) + nmap lo (vl-compile-output) + nmap lk (vl-stop) + nmap lK (vl-stop-all) + nmap le (vl-errors) + nmap lc (vl-clean) + nmap lC (vl-clean-full) + nmap lg (vl-status) + nmap lG (vl-status-all) endif if g:latex_motion_enabled - nmap % VimLatex% - xmap % VimLatex% - omap % VimLatex% - nmap ]] VimLatex]] - nmap ][ VimLatex][ - nmap [] VimLatex[] - nmap [[ VimLatex[[ - xmap ]] VimLatex]] - xmap ][ VimLatex][ - xmap [] VimLatex[] - xmap [[ VimLatex[[ - omap ]] VimLatex]] - omap ][ VimLatex][ - omap [] VimLatex[] - omap [[ VimLatex[[ - xmap ie VimLatexie - xmap ae VimLatexae - omap ie VimLatexie - omap ae VimLatexae - xmap i$ VimLatexi$ - xmap a$ VimLatexa$ - omap i$ VimLatexi$ - omap a$ VimLatexa$ - xmap id VimLatexid - xmap ad VimLatexad - omap id VimLatexid - omap ad VimLatexad + nmap % (vl-%) + xmap % (vl-%) + omap % (vl-%) + nmap ]] (vl-]]) + nmap ][ (vl-][) + nmap [] (vl-[]) + nmap [[ (vl-[[) + xmap ]] (vl-]]) + xmap ][ (vl-][) + xmap [] (vl-[]) + xmap [[ (vl-[[) + omap ]] (vl-]]) + omap ][ (vl-][) + omap [] (vl-[]) + omap [[ (vl-[[) + xmap ie (vl-ie) + xmap ae (vl-ae) + omap ie (vl-ie) + omap ae (vl-ae) + xmap i$ (vl-i$) + xmap a$ (vl-a$) + omap i$ (vl-i$) + omap a$ (vl-a$) + xmap id (vl-id) + xmap ad (vl-ad) + omap id (vl-id) + omap ad (vl-ad) endif if g:latex_toc_enabled - nmap lt VimLatexTocOpen - nmap lT VimLatexTocToggle + nmap lt (vl-toc-open) + nmap lT (vl-toc-toggle) endif if g:latex_view_enabled - nmap lv VimLatexView + nmap lv (vl-view) if has_key(g:latex#data[b:latex.id], 'rsearch') - nmap lr VimLatexRSearch + nmap lr (vl-reverse-search) endif endif endfunction diff --git a/autoload/latex/motion.vim b/autoload/latex/motion.vim index 2299687..b916efa 100644 --- a/autoload/latex/motion.vim +++ b/autoload/latex/motion.vim @@ -12,33 +12,33 @@ function! latex#motion#init(initialized) " {{{1 call latex#util#set_default('g:latex_motion_matchparen', 1) " Define mappings - nnoremap VimLatex% :call latex#motion#find_matching_pair() - xnoremap VimLatex% :call latex#motion#find_matching_pair(1) - onoremap VimLatex% :normal v% - nnoremap VimLatex]] :call latex#motion#next_section(0,0,0) - nnoremap VimLatex][ :call latex#motion#next_section(1,0,0) - nnoremap VimLatex[] :call latex#motion#next_section(1,1,0) - nnoremap VimLatex[[ :call latex#motion#next_section(0,1,0) - xnoremap VimLatex]] :call latex#motion#next_section(0,0,1) - xnoremap VimLatex][ :call latex#motion#next_section(1,0,1) - xnoremap VimLatex[] :call latex#motion#next_section(1,1,1) - xnoremap VimLatex[[ :call latex#motion#next_section(0,1,1) - onoremap VimLatex]] :normal v]] - onoremap VimLatex][ :normal v][ - onoremap VimLatex[] :normal v[] - onoremap VimLatex[[ :normal v[[ - xnoremap VimLatexie :call latex#motion#sel_environment(1) - xnoremap VimLatexae :call latex#motion#sel_environment() - onoremap VimLatexie :normal vie - onoremap VimLatexae :normal vae - xnoremap VimLatexi$ :call latex#motion#sel_inline_math(1) - xnoremap VimLatexa$ :call latex#motion#sel_inline_math() - onoremap VimLatexi$ :normal vi$ - onoremap VimLatexa$ :normal va$ - xnoremap VimLatexid :call latex#motion#sel_delimiter(1) - xnoremap VimLatexad :call latex#motion#sel_delimiter() - onoremap VimLatexid :normal vi( - onoremap VimLatexad :normal va( + nnoremap (vl-%) :call latex#motion#find_matching_pair() + xnoremap (vl-%) :call latex#motion#find_matching_pair(1) + onoremap (vl-%) :normal v% + nnoremap (vl-]]) :call latex#motion#next_section(0,0,0) + nnoremap (vl-][) :call latex#motion#next_section(1,0,0) + nnoremap (vl-[]) :call latex#motion#next_section(1,1,0) + nnoremap (vl-[[) :call latex#motion#next_section(0,1,0) + xnoremap (vl-]]) :call latex#motion#next_section(0,0,1) + xnoremap (vl-][) :call latex#motion#next_section(1,0,1) + xnoremap (vl-[]) :call latex#motion#next_section(1,1,1) + xnoremap (vl-[[) :call latex#motion#next_section(0,1,1) + onoremap (vl-]]) :normal v]] + onoremap (vl-][) :normal v][ + onoremap (vl-[]) :normal v[] + onoremap (vl-[[) :normal v[[ + xnoremap (vl-ie) :call latex#motion#sel_environment(1) + xnoremap (vl-ae) :call latex#motion#sel_environment() + onoremap (vl-ie) :normal vie + onoremap (vl-ae) :normal vae + xnoremap (vl-i$) :call latex#motion#sel_inline_math(1) + xnoremap (vl-a$) :call latex#motion#sel_inline_math() + onoremap (vl-i$) :normal vi$ + onoremap (vl-a$) :normal va$ + xnoremap (vl-id) :call latex#motion#sel_delimiter(1) + xnoremap (vl-ad) :call latex#motion#sel_delimiter() + onoremap (vl-id) :normal vi( + onoremap (vl-ad) :normal va( " Highlight matching parens ($, (), ...) if !a:initialized && g:latex_motion_matchparen diff --git a/autoload/latex/toc.vim b/autoload/latex/toc.vim index 5b23235..26081b2 100644 --- a/autoload/latex/toc.vim +++ b/autoload/latex/toc.vim @@ -27,8 +27,8 @@ function! latex#toc#init(initialized) " {{{1 command! -buffer VimLatexTocToggle call latex#toc#toggle() " Define mappings - nnoremap VimLatexTocOpen :call latex#toc#open() - nnoremap VimLatexTocToggle :call latex#toc#toggle() + nnoremap (vl-toc-open) :call latex#toc#open() + nnoremap (vl-toc-toggle) :call latex#toc#toggle() endfunction function! latex#toc#open() " {{{1 diff --git a/autoload/latex/view.vim b/autoload/latex/view.vim index c2d41b1..a55e788 100644 --- a/autoload/latex/view.vim +++ b/autoload/latex/view.vim @@ -47,9 +47,9 @@ function! latex#view#init(initialized) " {{{1 endif " Define mappings - nnoremap VimLatexView :call g:latex#data[b:latex.id].view() + nnoremap (vl-view) :call g:latex#data[b:latex.id].view() if has_key(data, 'rsearch') - nnoremap VimLatexRSearch + nnoremap (vl-reverse-search) \ :call g:latex#data[b:latex.id].rsearch() endif endfunction