We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a5dda6 commit fcc17bcCopy full SHA for fcc17bc
vim/after/ftplugin/cucumber.vim
@@ -13,4 +13,26 @@ Snippet visit When I visit <{}>
13
" Factory steps
14
Snippet exist Given a <{factory}> exists with a <{attribute}> of "<{}>"
15
16
+function! AlignAsciiTable()
17
+ let startline = line(".")
18
+ while match(getline(startline), "|") != -1
19
+ let startline = startline - 1
20
+ endwhile
21
+ let startline = startline + 1
22
+
23
+ let endline = startline
24
+ while match(getline(endline), "|") != -1
25
+ let endline = endline + 1
26
27
+ let endline = endline - 1
28
29
+ if startline >= endline
30
+ return
31
+ endif
32
33
+ exec startline . "," . endline . "!align_ascii_table"
34
+endfunction
35
36
+nmap <buffer> <C-A> :call AlignAsciiTable()<CR>
37
38
vmap <buffer> <C-A> !align_ascii_table<CR>
0 commit comments