mirror of
https://github.com/dhruvasagar/vim-table-mode.git
synced 2025-11-12 13:03:46 -05:00
Fixed #38
Added a mapping `<Plug>(table-mode-sort)` which is mapped by default to `<Leader>ts` that sorts the current table by the column in which the cursor is currently. Also added `TableSort` command that gives you a little more control over the sorting, you can pass in additional :sort flags like u, i, n etc and also use it with a `!` to sort in reverse order.
This commit is contained in:
@@ -43,6 +43,7 @@ function! s:ToggleMapping() "{{{2
|
||||
call s:Map('<Plug>(table-mode-add-formula)', '<Leader>tfa', 'n')
|
||||
call s:Map('<Plug>(table-mode-eval-formula)', '<Leader>tfe', 'n')
|
||||
call s:Map('<Plug>(table-mode-echo-cell)', '<Leader>t?', 'n')
|
||||
call s:Map('<Plug>(table-mode-sort)', '<Leader>ts', 'n')
|
||||
else
|
||||
call s:UnMap(separator_map, 'i')
|
||||
call s:UnMap('{<Bar>', 'n')
|
||||
@@ -56,6 +57,7 @@ function! s:ToggleMapping() "{{{2
|
||||
call s:UnMap('<Leader>tfa', 'n')
|
||||
call s:UnMap('<Leader>tfe', 'n')
|
||||
call s:UnMap('<Leader>t?', 'n')
|
||||
call s:UnMap('<Leader>ts', 'n')
|
||||
endif
|
||||
endif
|
||||
endfunction
|
||||
|
||||
Reference in New Issue
Block a user