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

Option to not count lines which do not have the delimiter into the first field length #23

Open
jan-matejka opened this issue Apr 19, 2013 · 1 comment

Comments

@jan-matejka
Copy link

Consider file contents:

bundle edit_line append_groups_starting(v) {
vars:
  "index"        slist => getindices("$(v)");

classes:
  "add_$(index)"     not => groupexists("$(index)"),
                 comment => "Class created if group does not exist";

insert_lines:
  "$($(v)[$(index)])",
         comment => "Append users into a group file format",
      ifvarclass => "add_$(index)";
}

If you want to :Tabularize all the content's on delimiter '=>' it will count eg. the whole first line as first column and format all the rest accordingly.

It would be very usefull to say 'Tabularize by => but completely omit/ignore lines which does not contain the delimiter'

@godlygeek
Copy link
Owner

You're looking for the (not yet documented) command :GTabularize - see the discussion at issue #10

You should be able to do what you want by doing :GTabularize /=> - it will work on all lines in the buffer by default, but it takes a range if you wanted to apply it to only the visual selection or some such.

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

2 participants