mirror of
https://github.com/spf13/spf13-vim.git
synced 2024-09-21 07:27:11 +00:00
Configurify the mappings for editing/applying the spf13 config
A user can set the following variables in their .vimrc.before.local file to customise the key mappings: g:spf13_edit_config_mapping g:spf13_apply_config_mapping the defaults are <leader>ev and <leader>sv respectively
This commit is contained in:
parent
5315ee88d0
commit
b140b32672
20
.vimrc
20
.vimrc
@ -285,6 +285,22 @@
|
||||
let maplocalleader=g:spf13_localleader
|
||||
endif
|
||||
|
||||
" The default mappings for editing and applying the spf13 configuration
|
||||
" are <leader>ev and <leader>sv respectively. Change them to your preference
|
||||
" by adding the following to your .vimrc.before.local file:
|
||||
" let g:spf13_edit_config_mapping='<leader>ec'
|
||||
" let g:spf13_apply_config_mapping='<leader>sc'
|
||||
if !exists('g:spf13_edit_config_mapping')
|
||||
let s:spf13_edit_config_mapping = '<leader>ev'
|
||||
else
|
||||
let s:spf13_edit_config_mapping = g:spf13_edit_config_mapping
|
||||
endif
|
||||
if !exists('g:spf13_apply_config_mapping')
|
||||
let s:spf13_apply_config_mapping = '<leader>sv'
|
||||
else
|
||||
let s:spf13_apply_config_mapping = g:spf13_apply_config_mapping
|
||||
endif
|
||||
|
||||
" Easier moving in tabs and windows
|
||||
" The lines conflict with the default digraph mapping of <C-K>
|
||||
" If you prefer that functionality, add the following to your
|
||||
@ -1190,8 +1206,8 @@
|
||||
execute bufwinnr(".vimrc.local") . "wincmd w"
|
||||
endfunction
|
||||
|
||||
noremap <leader>ev :call <SID>EditSpf13Config()<CR>
|
||||
noremap <leader>sv :source ~/.vimrc<CR>
|
||||
execute "noremap " . s:spf13_edit_config_mapping " :call <SID>EditSpf13Config()<CR>"
|
||||
execute "noremap " . s:spf13_apply_config_mapping . " :source ~/.vimrc<CR>"
|
||||
" }
|
||||
|
||||
" Use fork vimrc if available {
|
||||
|
@ -92,6 +92,10 @@
|
||||
" Require a special keypress to enter multiple cursors mode
|
||||
" let g:multi_cursor_start_key='+'
|
||||
|
||||
" Mappings for editing/applying spf13 config
|
||||
" let g:spf13_edit_config_mapping='<leader>ev'
|
||||
" let g:spf13_apply_config_mapping='<leader>sv'
|
||||
|
||||
" }
|
||||
|
||||
" Use fork before if available {
|
||||
|
Loading…
Reference in New Issue
Block a user