Hi,
I want to set leader in init.toml, this is my config:
~/.SpaceVim.d/init.toml
[options]
bootstrap_after = "config#after"
bootstrap_before = "config#before"
~/.SpaceVim.d/autoload/config.vim
func! config#before() abort
let mapleader=','
endf
func! config#after() abort
let mapleader=','
endf
But it isn't work, how should I do?
the doc of mapleader is not very clear, it should tell user to use g:mapleader instead, I think this is a type of vim's help file.
so your function should be
func! config#before() abort
let g:mapleader = ','
" after this line, when you using <leader> to defind key bindings
" the leader is ,
" for example:
nnoremap <leader>w :w<cr>
" this mapping means using `,w` to save current file.
endf
Finally I found the right solution! You won't know how hard I got here. It would really be nice to make it more clear in the doc how to set the mapleader simply because it is such an important key!
OK锛孖 will add it.
@fifman
Finally I found the right solution! You won't know how hard I got here. It would really be nice to make it more clear in the doc how to set the
mapleadersimply because it is such an important key!
Hello, could you tell me how do you change your mapleader key finally ? I'm also interested on it, indeed default mapleader is "\", but for azerty keyboard, this is not a good mapleader key.
Most helpful comment
the doc of mapleader is not very clear, it should tell user to use
g:mapleaderinstead, I think this is a type of vim's help file.so your function should be