I have the following in my .vimrc:
set nocompatible
filetype off
" set the runtime path to include neobundle and initialize
set runtimepath+=~/.vim/bundle/neobundle.vim/
call neobundle#begin(expand('~/.vim/bundle/'))
NeoBundleFetch 'Shougo/neobundle.vim'
...
NeoBundle 'lervag/vimtex'
...
call neobundle#end()
filetype plugin indent on
NeoBundleCheck
...
" Set <leader>
let mapleader=','
let g:mapleader=','
...
All my other plugins do use , as the leader, but vimtex is still using \ as the leader:
n \lm @<Plug>(vimtex-imaps-list)
n \lv @<Plug>(vimtex-view)
n \lY @<Plug>(vimtex-labels-toggle)
n \ly @<Plug>(vimtex-labels-open)
n \lT @<Plug>(vimtex-toc-toggle)
...
How can I change this behavior?
This is because vimtex uses the maplocalleader, see :h maplocalleader. This is the recommended practice for filetype plugins. So, to change the leader key for vimtex, do:
let maplocalleader = ','
@lervag How would I go about changing the localleader vimtex uses?
How would I go about changing the localleader vimtex uses?
What do you mean? I wrote that just above your question. Note, though, that you must put let maplocalleader in your .vimrc file. See also :help maplocalleader (as was suggested in my previous post!).
Most helpful comment
This is because vimtex uses the maplocalleader, see
:h maplocalleader. This is the recommended practice for filetype plugins. So, to change the leader key for vimtex, do: