mirror of
https://github.com/dhruvasagar/vim-table-mode.git
synced 2025-11-08 11:03:47 -05:00
Merge branch 'master' of github.com:dhruvasagar/vim-table-mode into feature/table-formulas
Conflicts: autoload/tablemode.vim
This commit is contained in:
@@ -20,10 +20,10 @@
|
||||
" =============================================================================
|
||||
|
||||
" Finish if already loaded {{{1
|
||||
if exists('g:table_mode_loaded')
|
||||
if exists('g:loaded_table_mode')
|
||||
finish
|
||||
endif
|
||||
let g:table_mode_loaded = 1
|
||||
let g:loaded_table_mode = 1
|
||||
"}}}1
|
||||
"
|
||||
" Finish if Tabularize plugin is not available {{{1
|
||||
@@ -152,4 +152,4 @@ let &cpo = s:save_cpo
|
||||
" }}}1
|
||||
|
||||
" ModeLine {{{
|
||||
" vim:fdl=0 fdm=marker
|
||||
" vim: sw=2 sts=2 fdl=0 fdm=marker
|
||||
|
||||
@@ -20,6 +20,12 @@
|
||||
|
||||
" Private Functions {{{1
|
||||
|
||||
if exists('g:autoloaded_table_mode') "{{{2
|
||||
finish
|
||||
endif
|
||||
let g:autoloaded_table_mode = 1
|
||||
" }}}2
|
||||
|
||||
" Utility Functions {{{2
|
||||
|
||||
function! s:throw(string) abort "{{{3
|
||||
@@ -525,7 +531,7 @@ function! s:Align(lines) "{{{3
|
||||
for line in lines
|
||||
if len(line) <= 1 | continue | endif
|
||||
|
||||
if line[0] !~ '^\s*$'
|
||||
if line[0] !~ s:StartExpr()
|
||||
let line[0] = s:StripTrailingSpaces(line[0])
|
||||
endif
|
||||
if len(line) >= 2
|
||||
@@ -659,7 +665,6 @@ function! tablemode#TableRealign(line) "{{{2
|
||||
let tline = tline + s:RowGap()
|
||||
endwhile
|
||||
|
||||
" call tabular#TabularizeStrings(lines, g:table_mode_separator, g:table_mode_align)
|
||||
let lines = s:Align(lines)
|
||||
|
||||
for lnum in lnums
|
||||
@@ -864,3 +869,5 @@ endfunction
|
||||
" }}}2
|
||||
|
||||
" }}}1
|
||||
|
||||
" vim: sw=2 sts=2 fdl=0 fdm=marker
|
||||
|
||||
Reference in New Issue
Block a user