Minor simplification and improvement
This commit is contained in:
parent
fe4e9a4eb4
commit
d63b06e7f6
@ -4,7 +4,7 @@
|
|||||||
" Email: karl.yngve@gmail.com
|
" Email: karl.yngve@gmail.com
|
||||||
"
|
"
|
||||||
|
|
||||||
if !get(g:, 'vimtex_enabled', 1)
|
if !get(g:, 'vimtex_enabled', 1) || !get(g:, 'vimtex_toc_enabled', 1)
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -20,13 +20,11 @@ function! s:map(mode, lhs, rhs, ...)
|
|||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
if get(g:, 'vimtex_toc_enabled', 1)
|
|
||||||
command! -buffer VimtexTocOpen call vimtex#toc#open()
|
command! -buffer VimtexTocOpen call vimtex#toc#open()
|
||||||
command! -buffer VimtexTocToggle call vimtex#toc#toggle()
|
command! -buffer VimtexTocToggle call vimtex#toc#toggle()
|
||||||
nnoremap <buffer> <plug>(vimtex-toc-open) :call vimtex#toc#open()<cr>
|
nnoremap <buffer> <plug>(vimtex-toc-open) :call vimtex#toc#open()<cr>
|
||||||
nnoremap <buffer> <plug>(vimtex-toc-toggle) :call vimtex#toc#toggle()<cr>
|
nnoremap <buffer> <plug>(vimtex-toc-toggle) :call vimtex#toc#toggle()<cr>
|
||||||
call s:map('n', '<localleader>lt', '<plug>(vimtex-toc-open)')
|
call s:map('n', '<localleader>lt', '<plug>(vimtex-toc-open)')
|
||||||
call s:map('n', '<localleader>lT', '<plug>(vimtex-toc-toggle)')
|
call s:map('n', '<localleader>lT', '<plug>(vimtex-toc-toggle)')
|
||||||
endif
|
|
||||||
|
|
||||||
" vim: fdm=marker sw=2
|
" vim: fdm=marker sw=2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user