Vimtex: Not Using Modified Leader

Created on 14 Jan 2016  路  3Comments  路  Source: lervag/vimtex

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?

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:

let maplocalleader = ','

All 3 comments

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!).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

itsShnik picture itsShnik  路  5Comments

adimanea picture adimanea  路  5Comments

Davidnet picture Davidnet  路  4Comments

David-Fu picture David-Fu  路  5Comments

chakravala picture chakravala  路  5Comments