christoomey/vim-sort-motion

Sort in reverse order

iovis opened this issue · 0 comments

iovis commented

Hi would you consider adding a mapping to sort in reverse order? I was thinking something like the following (what I have in my vimrc):

function! SortReverseLinesOpFunc(...)
  '[,']sort!
endfunction

nnoremap <silent> gr :<c-u>set operatorfunc=SortReverseLinesOpFunc<cr>g@
xnoremap <silent> gr :sort!<cr>