diff --git a/after/ftplugin/fugitive.vim b/after/ftplugin/fugitive.vim new file mode 100644 index 0000000..6c99447 --- /dev/null +++ b/after/ftplugin/fugitive.vim @@ -0,0 +1,9 @@ +" vim-bepo - Plugin vim pour disposition de clavier bépo +" Maintainer: Micha Moskovic + +" save old 's' mapping to enable sort +if !exists("s:s_map") "check needed to avoid mapping to remapped 's' + let s:s_map = maparg("s","n") +endif +execute "nnoremap k " . s:s_map +nunmap s diff --git a/after/ftplugin/netrw.vim b/after/ftplugin/netrw.vim new file mode 100644 index 0000000..41495ca --- /dev/null +++ b/after/ftplugin/netrw.vim @@ -0,0 +1,13 @@ +" vim-bepo - Plugin vim pour disposition de clavier bépo +" Maintainer: Micha Moskovic + +" save old 's' mapping to enable sort +if !exists("s:s_map") "check needed to avoid mapping to remapped 's' + let s:s_map = maparg("s","n") +endif +execute "nnoremap k " . s:s_map +" on recent versions of netrw, mappings are registered only once per Vim +" session (instead of once per buffer), so unmapping will fail afterwards and +" errors need to be silenced +silent! nunmap t +silent! nunmap s diff --git a/after/plugin/surround.vim b/after/plugin/surround.vim new file mode 100644 index 0000000..f3559aa --- /dev/null +++ b/after/plugin/surround.vim @@ -0,0 +1,25 @@ +" vim-bepo - Plugin vim pour disposition de clavier bépo" +" Maintainer: Clément Joly + +" Require to set g:surround_no_mappings = 1 in your vimrc +if exists("g:loaded_surround") && g:loaded_surround && exists("g:surround_no_mappings") && g:surround_no_mappings + " based on https://github.com/tpope/vim-surround/blob/f51a26d3710629d031806305b6c8727189cd1935/plugin/surround.vim#L599 + nmap dj Dsurround + nmap dj Dsurround + nmap lj Csurround + nmap lJ CSurround + nmap yj Ysurround + nmap yJ YSurround + nmap yjj Yssurround + nmap yJj YSsurround + nmap yJJ YSsurround + xmap J VSurround + xmap gJ VgSurround + if !exists("g:surround_no_insert_mappings") || ! g:surround_no_insert_mappings + " if !hasmapto("Isurround","i") && "" == mapchecj("","i") + " imap Isurround + " endif + imap j Isurround + imap J ISurround + endif +endif diff --git a/after/plugin/unimpaired.vim b/after/plugin/unimpaired.vim new file mode 100644 index 0000000..4721821 --- /dev/null +++ b/after/plugin/unimpaired.vim @@ -0,0 +1,8 @@ +" Fix mapping brought by unimpared + +if !empty(maparg("co", "n")) + nunmap co +endif +if !empty(maparg("cop", "n")) + nunmap cop +endif