mirror of
https://github.com/dhruvasagar/vim-table-mode.git
synced 2025-11-08 11:03:47 -05:00
Updated table mode
- Bumped version - Added new mapping \t? to echo current cells representation for defining formulas. - Updated docs
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
" Author: Dhruva Sagar <http://dhruvasagar.com/>
|
||||
" License: MIT (http://www.opensource.org/licenses/MIT)
|
||||
" Website: http://github.com/dhruvasagar/vim-table-mode
|
||||
" Version: 3.3.0
|
||||
" Version: 3.3.2
|
||||
" Note: This plugin was heavily inspired by the 'CucumberTables.vim'
|
||||
" (https://gist.github.com/tpope/287147) plugin by Tim Pope.
|
||||
"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
*table-mode.txt* Table Mode for easy table formatting. v3.3
|
||||
*table-mode.txt* Table Mode for easy table formatting. v3.3.2
|
||||
===============================================================================
|
||||
Table Mode, THE AWESOME AUTOMATIC TABLE CREATOR & FORMATTER
|
||||
VERSION 3.3
|
||||
VERSION 3.3.2
|
||||
|
||||
Author: Dhruva Sagar <http://dhruvasagar.com/>
|
||||
License: MIT <http://opensource.org/licenses/MIT/>
|
||||
@@ -272,6 +272,12 @@ g:table_mode_eval_expr_map *table-mode-eval-expr-map*
|
||||
NOTE you will need to use the |table-mode-map-prefix| before this to
|
||||
get the desired effect.
|
||||
|
||||
g:table_mode_echo_cell_map *table-mode-echo-cell-map*
|
||||
Use this option to define the mapping for echoing current cells
|
||||
representation for defining formulas. >
|
||||
let g:table_mode_echo_cell_map = '?'
|
||||
<
|
||||
|
||||
===============================================================================
|
||||
MAPPINGS *table-mode-mappings*
|
||||
|
||||
@@ -300,6 +306,9 @@ MAPPINGS *table-mode-mappings*
|
||||
*table-mode-mappings-realign*
|
||||
<Leader>tr Realigns table columns
|
||||
|
||||
<Leader>t? Echo the current table cells representation for defining
|
||||
formulas.
|
||||
|
||||
*table-mode-mappings-motions*
|
||||
<Leader>t[hjkl] Move to previous | below | above | right cell in the table.
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
" Author: Dhruva Sagar <http://dhruvasagar.com/>
|
||||
" License: MIT (http://www.opensource.org/licenses/MIT)
|
||||
" Website: http://github.com/dhruvasagar/vim-table-mode
|
||||
" Version: 3.3.1
|
||||
" Version: 3.3.2
|
||||
" Note: This plugin was heavily inspired by the 'CucumberTables.vim'
|
||||
" (https://gist.github.com/tpope/287147) plugin by Tim Pope.
|
||||
"
|
||||
@@ -50,6 +50,7 @@ call s:SetGlobalOptDefault('table_mode_delete_row_map', 'dd')
|
||||
call s:SetGlobalOptDefault('table_mode_delete_column_map', 'dc')
|
||||
call s:SetGlobalOptDefault('table_mode_add_formula_map', 'fa')
|
||||
call s:SetGlobalOptDefault('table_mode_eval_expr_map', 'fe')
|
||||
call s:SetGlobalOptDefault('table_mode_echo_cell_map', '?')
|
||||
|
||||
function! s:TableMotion() "{{{1
|
||||
let direction = nr2char(getchar())
|
||||
@@ -58,6 +59,12 @@ function! s:TableMotion() "{{{1
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
function! s:TableEchoCell() "{{{1
|
||||
if tablemode#IsATableRow('.')
|
||||
echomsg '$' . tablemode#RowNr('.') . ',' . tablemode#ColumnNr('.')
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Define Commands & Mappings {{{1
|
||||
if !g:table_mode_always_active "{{{2
|
||||
exec "nnoremap <silent> " . g:table_mode_map_prefix . g:table_mode_toggle_map .
|
||||
@@ -101,6 +108,8 @@ execute "nnoremap <silent> " . g:table_mode_map_prefix . g:table_mode_add_formul
|
||||
\ " :TableAddFormula<CR>"
|
||||
execute "nnoremap <silent> " . g:table_mode_map_prefix . g:table_mode_eval_expr_map .
|
||||
\ " :TableEvalFormulaLine<CR>"
|
||||
execute "nnoremap <silent> " . g:table_mode_map_prefix . g:table_mode_echo_cell_map .
|
||||
\ " :call <SID>TableEchoCell()<CR>"
|
||||
|
||||
" Avoiding side effects {{{1
|
||||
let &cpo = s:save_cpo
|
||||
|
||||
Reference in New Issue
Block a user