Hello,
i want to align all those vim comments, which are not the first
non-whitespace character on the line and also not part of an command,
etc.
Example:
" aligns all quotes which are not the first character at the
beginning of the line
nnoremap <Leader>a1 :Tabularize /^\@<!" <CR>
nnoremap <Leader>a2 :Tabularize /\(^\s*\)\@<!" <CR>
=> should not match, because the comment is alone on the first line and
the second and third quote are part of the command
Plug 'flazz/vim-colorschemes' " Vim colorschemes
=> should match, the comment has non-whitespace characters before it.
trying
====
:Tabularize /\(^\s*\)\@<! "
Orginal:
http://ur1.ca/nh1ac
result:
http://ur1.ca/nh1as
Orginal: (first example)
result:
http://ur1.ca/nh1c2
in short:
======
how can i "parse" vim scripts in a regex, to determine, if the actual
matched quote is part of a command or a comment?