Skip to content

Commit

Permalink
Edit / apply config mappings removed (#65).
Browse files Browse the repository at this point in the history
  • Loading branch information
offa committed Jul 18, 2021
1 parent 90d212a commit 7b4141f
Showing 1 changed file with 0 additions and 41 deletions.
41 changes: 0 additions & 41 deletions .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,6 @@
" 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'

" }}

" Environment {{
Expand Down Expand Up @@ -346,22 +342,6 @@
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
Expand Down Expand Up @@ -988,27 +968,6 @@
" e.g. Grep current file for <search_term>: Shell grep -Hn <search_term> %
" }}

function! s:ExpandFilenameAndExecute(command, file)
execute a:command . " " . expand(a:file, ":p")
endfunction

function! s:EditSpf13Config()
call <SID>ExpandFilenameAndExecute("tabedit", "~/.vimrc")
call <SID>ExpandFilenameAndExecute("vsplit", "~/.vimrc.before")
call <SID>ExpandFilenameAndExecute("vsplit", "~/.vimrc.bundles")

execute bufwinnr(".vimrc") . "wincmd w"
call <SID>ExpandFilenameAndExecute("split", "~/.vimrc.local")
wincmd l
call <SID>ExpandFilenameAndExecute("split", "~/.vimrc.before.local")
wincmd l
call <SID>ExpandFilenameAndExecute("split", "~/.vimrc.bundles.local")

execute bufwinnr(".vimrc.local") . "wincmd w"
endfunction

execute "noremap " . s:spf13_edit_config_mapping " :call <SID>EditSpf13Config()<CR>"
execute "noremap " . s:spf13_apply_config_mapping . " :source ~/.vimrc<CR>"
" }}

" Use local vimrc if available {{
Expand Down

0 comments on commit 7b4141f

Please sign in to comment.