Skip to content

Commit

Permalink
Make surround use “k” instead of “s”
Browse files Browse the repository at this point in the history
  • Loading branch information
cljoly committed Jul 4, 2021
1 parent a515269 commit e5a6f69
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions after/plugin/surround.vim
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

0 comments on commit e5a6f69

Please sign in to comment.