This commit is contained in:
Adam Stankiewicz
2020-12-29 19:44:40 +01:00
parent 73c5187177
commit 95d82fdb66
40 changed files with 528 additions and 348 deletions

View File

@@ -444,6 +444,19 @@ function! ledger#align_commodity() abort
endif
endf
" Align the commodity on the entire buffer
function! ledger#align_commodity_buffer() abort
" Store the viewport position
let view = winsaveview()
" Call ledger#align_commodity for every line
%call ledger#align_commodity()
" Restore the viewport position
call winrestview(view)
unlet view
endf
" Align the amount under the cursor and append/prepend the default currency.
function! ledger#align_amount_at_cursor() abort
" Select and cut text:

View File

@@ -48,33 +48,28 @@ endfunction
function! terraform#commands(ArgLead, CmdLine, CursorPos) abort
let commands = [
\ 'init',
\ 'validate',
\ 'plan',
\ 'apply',
\ 'console',
\ 'destroy',
\ 'env',
\ 'console',
\ 'fmt',
\ 'force-unlock',
\ 'get',
\ 'graph',
\ 'import',
\ 'init',
\ 'login',
\ 'logout',
\ 'output',
\ 'plan',
\ 'providers',
\ 'refresh',
\ 'show',
\ 'state',
\ 'taint',
\ 'untaint',
\ 'validate',
\ 'version',
\ 'workspace',
\ '0.12upgrade',
\ '0.13upgrade',
\ 'debug',
\ 'force-unlock',
\ 'push',
\ 'state'
\ 'workspace'
\ ]
return join(commands, "\n")
endfunction

View File

@@ -10,7 +10,7 @@ let s:syng_linecom = 'linecomment\c'
" Check if the character at lnum:col is inside a multi-line comment.
function yats#IsInMultilineComment(lnum, col)
return !s:IsLineComment(a:lnum, a:col) && synIDattr(synID(a:lnum, a:col, 1), 'name') =~ s:syng_multiline
return !yats#IsLineComment(a:lnum, a:col) && synIDattr(synID(a:lnum, a:col, 1), 'name') =~ s:syng_multiline
endfunction
" Check if the character at lnum:col is a line comment.