Fix mappings for vim files being global

<leader>c and <leader>if are now buffer-specific :)
This commit is contained in:
Talia 2018-08-23 11:01:45 +02:00
parent 217cd1fb31
commit e0c2d933a3

4
vimrc
View file

@ -946,8 +946,8 @@ au BufNewFile,BufRead *.vim,*vimrc :call <sid>init_vim_file()
function! s:init_vim_file() function! s:init_vim_file()
setl number setl number
nnoremap <buffer> <F5> :w<CR>:so %<CR> nnoremap <buffer> <F5> :w<CR>:so %<CR>
nnoremap <leader>c A<space>"<space> nnoremap <buffer> <leader>c A<space>"<space>
nnoremap <leader>if ofunction! <C-o>m'()<enter>endfunction<C-o>`'<C-o>l nnoremap <buffer> <leader>if ofunction! <C-o>m'()<enter>endfunction<C-o>`'<C-o>l
command! -buffer Functions lex MatchingLines("^\\s*fun\\(ction\\)\\?\\>!.*$") command! -buffer Functions lex MatchingLines("^\\s*fun\\(ction\\)\\?\\>!.*$")
command! -buffer Commands lex MatchingLines("^\\s*com\\(mand\\)\\?\\>!.*$") command! -buffer Commands lex MatchingLines("^\\s*com\\(mand\\)\\?\\>!.*$")