From: Samir Benmendil Date: Tue, 17 May 2016 08:00:15 +0000 (+0100) Subject: vim: add sort operator X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/82b9ea0aee24ef8542719076bb166b169f58a46f vim: add sort operator --- diff --git a/vim/vimrc b/vim/vimrc index 23889f1..0e533cf 100644 --- 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 gs :set operatorfunc=SortLinesOpFuncg@ + " edit configs {{{2 function! EditConfig(what) let l:dir = split(&runtimepath,',')[0]