Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align to Nearest Tabstop #38

Open
orbisvicis opened this issue Mar 9, 2015 · 1 comment
Open

Align to Nearest Tabstop #38

orbisvicis opened this issue Mar 9, 2015 · 1 comment

Comments

@orbisvicis
Copy link

I don't think its possible to align to nearest tabstop without first counting characters of the longest line, manually. So I propose this:

  :Tabularize /,/r1tc1lt1

    abc     , d  , ghi
      a     , b
      a     , b  ,  c
    ---s....-s-.s-s---

Legend:

  • -: character
  • s: space
  • .: tab

Where tab is appropriate number of spaces if expandtab.

@orbisvicis
Copy link
Author

Not sure which argument format is best:

" embed actual characters
" more powerful
/pattern/([lrc][^lrc]+)+/
" similar, with control-char delimiter
" most powerful
" more inconvenient to type
/pattern/([lrc][^<ctrl-x>]+<ctrl-x>)+/
" encode space/tab, plugin option to set default as space/tab
" backwards compatible
/pattern/([lrc](\d+[st]?|[st])+)+/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant