Skip to content

Commit

Permalink
Made plugin tab align after the delimiter.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreydwalter committed May 27, 2017
1 parent 3b395bd commit 5b4bcc3
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions autoload/easy_align.vim
Expand Up @@ -578,9 +578,18 @@ function! s:do_align(todo, modes, all_tokens, all_delims, fl, ll, fc, lc, nth, r
endif
endif

" Align the token
let aligned = join([lpad, token, ml, dl, delim, dr, mr, rpad], '')
let tokens[nth] = aligned

" TODO: Integrate 'tab_align' this as an actual option.
let tpad_len = 0
"if d.tabstop_align
let aligned_len = len(aligned)
if aligned_len > &tabstop
let tpad_len = aligned_len % (&tabstop + 1)
endif
"endif

let tokens[nth] = join([aligned, repeat(' ', tpad_len)], '')

" Update the line
let a:todo[line] = before.join(tokens, '').after
Expand Down

0 comments on commit 5b4bcc3

Please sign in to comment.