Updated table mode

- Bumped version
- Added new mapping \t? to echo current cells representation for
  defining formulas.
- Updated docs
This commit is contained in:
Dhruva Sagar
2013-12-31 12:30:52 +05:30
parent 1302782b55
commit 5c42d58d4b
3 changed files with 22 additions and 4 deletions

View File

@@ -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