summaryrefslogtreecommitdiffstats
path: root/autoload
diff options
context:
space:
mode:
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ledger.vim13
-rw-r--r--autoload/terraform.vim19
-rw-r--r--autoload/yats.vim2
3 files changed, 21 insertions, 13 deletions
diff --git a/autoload/ledger.vim b/autoload/ledger.vim
index 76be457d..265aa666 100644
--- a/autoload/ledger.vim
+++ b/autoload/ledger.vim
@@ -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:
diff --git a/autoload/terraform.vim b/autoload/terraform.vim
index 652c4b30..594d74a0 100644
--- a/autoload/terraform.vim
+++ b/autoload/terraform.vim
@@ -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
diff --git a/autoload/yats.vim b/autoload/yats.vim
index 8f5fe2d0..f96841aa 100644
--- a/autoload/yats.vim
+++ b/autoload/yats.vim
@@ -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.