]> git.rmz.io Git - dotfiles.git/blobdiff - vim/vimrc
vim: add sort operator
[dotfiles.git] / vim / vimrc
index 23889f1e992244a308377e6cca687eff7b1acf8d..0e533cf4f69e8eea87d6f83a66fb49406cfccf6b 100644 (file)
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -736,6 +736,12 @@ if !exists(":DiffOrig")
                   \ | wincmd p | diffthis
 endif
 
+" sort operator {{{2
+function! SortLinesOpFunc(...)
+  '[,']sort
+endfunction
+nnoremap <silent> gs :<C-U>set operatorfunc=SortLinesOpFunc<CR>g@
+
 " edit configs  {{{2
 function! EditConfig(what)
     let l:dir = split(&runtimepath,',')[0]