Closed DWIAltonaAnalytics closed 1 month ago
I use vimtex throug vims package mechanism, and have it in
pack/foo/start/vimtex/
Cool. Notice that I personally strongly prefer a plugin manager. For Vim, I've found vim-plug to work very well. But the builtin package mechanism is probably also fine, if you know what you are doing.
I use a dvorak keyboard layout and have remapped some keys, I end up using
t
instead ofj
to move down.now this conflicts with all the nmap from vimtex starting with a t, and everytime I want to move down a line, there is that pesky wait until the cursor moves.
In this case, I would advice the following: Either disable all default mappings and make your own. Use let g:vimtex_mappings_enabled = v:false
to disable. See the map targets under :help vimtex-default-mappings
for the mappings you want to create.
Or you can use g:vimtex_mappings_prefix
to adjust the <localleader>l
prefix and then remap the keys you want to override in your personal $vim/ftplugin/tex.vim
.
Notice that you should not put it under after/
, because VimTeX will avoid creating mappings to <plug>(...)
targets that already have a map.
I tried different approaches:
adding
nunmap t**
to$vim/after/tex.vim
You probably wanted $vim/after/ftplugin/tex.vim
; but see my previous comment.
Hi, thank you.
I went with the g:vimtex_mappings_enabled = v:false
in my vimrc and added the mappings I was using to my $vim/ftplugin/tex.vim
I can add more if I need them.
fixed.
I think that's a very good approach.
Description
this might be related to #1673 or #1783 but these did not help me.
I use vimtex throug vims package mechanism, and have it in
pack/foo/start/vimtex/
I use a dvorak keyboard layout and have remapped some keys, I end up using
t
instead ofj
to move down.now this conflicts with all the nmap from vimtex starting with a t, and everytime I want to move down a line, there is that pesky wait until the cursor moves.
I tried different approaches:
adding
nunmap t**
to$vim/after/tex.vim
and my vimrc but that did not remove the mappings, I get an error that these mappings do not exist. if I do packloadall in my vimrc it is still the same.I added mappings for
t**
stuff in my vimrc, called packloadall and then removed them again, but that didn't help either.how can I remove just some of the mappings VimTeX provides without disabling them all?
Steps to reproduce
load vimtex with vims package mechanism
have
no t j
in your vimrc, open a latex file and try to move the cursor down by pressingt
wait for a tiny bit to see the cursor move.
Expected behavior
I can unmap any mapping created by vimtex
Actual behavior
unmapping does not work.
Do you use a latexmkrc file?
no
VimtexInfo