BPJ
unread,Jun 27, 2016, 7:12:47 AM6/27/16Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to vim...@googlegroups.com
I'm trying to do a substitution in a 'horizontal/virtual column range'.
I have an ASCII table where the columns are separated by tab
characters (for now). I want to wrap the contents (which contain
space (U+0020) and \S characters, being of unequal length of
course!) of some specific table columns in asterisks (think
Markdown emphasis). I thought I could use a range and \%v to
match the text between two screen virtual columns and then use an
expression with substitute() to wrap instances of \T\+
inside the matched screen column range, something like
'a,'b s/\%13v.*\%46v/\=substitute(submatch(0),'\T\+','*&*','g')/
but apparently I've misunderstood \%v because I get no match.
So what is the right way to do this? I'm not looking forward to
changing three columns on some 70 lines manually!
/bpj