-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make surround use “k” instead of “s”
- Loading branch information
Showing
1 changed file
with
20 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,21 @@ | ||
" vim-bepo - Plugin vim pour disposition de clavier bépo | ||
" Maintainer: Micha Moskovic | ||
|
||
if exists("g:loaded_surround") && (!exists("g:surround_no_mappings") || ! g:surround_no_mappings) && maparg('cs', 'n') !=# '' | ||
execute 'nmap ls' maparg('cs', 'n') | ||
execute 'nmap lS' maparg('cS', 'n') | ||
nunmap cs | ||
nunmap cS | ||
" Require to set g:surround_no_mappings = 1 in your vimrc | ||
if exists("g:loaded_surround") && g:surround_no_mappings | ||
" based on https://github.com/tpope/vim-surround/blob/f51a26d3710629d031806305b6c8727189cd1935/plugin/surround.vim#L599 | ||
nmap dk <Plug>Dsurround | ||
nmap ck <Plug>Csurround | ||
nmap cK <Plug>CSurround | ||
nmap yk <Plug>Ysurround | ||
nmap yK <Plug>YSurround | ||
nmap ykk <Plug>Yssurround | ||
nmap yKk <Plug>YSsurround | ||
nmap yKK <Plug>YSsurround | ||
xmap K <Plug>VSurround | ||
xmap gK <Plug>VgSurround | ||
if !exists("g:surround_no_insert_mappings") || ! g:surround_no_insert_mappings | ||
if !hasmapto("<Plug>Isurround","i") && "" == mapcheck("<C-S>","i") | ||
imap <C-K> <Plug>Isurround | ||
endif | ||
imap <C-G>k <Plug>Isurround | ||
imap <C-G>K <Plug>ISurround | ||
endif | ||
endif |