So your request can be rewritten as
1) please ship perl with Windows version of Vim
2) find a fast way to prefix each line with its own line position as %
value? Thus if you have 4 lines it should be:
0 %
50 %
100 %
In those cases I tend to write a stupid .vim file and source it:
fun! Prefix()
let max = line('$')
for i in range(0, max)
let s = getline(i)
call setilne (percent_value . s)
endfor
endf
call Prefix()
Would take me 30secs to one minute to write. If you don't know VimL
much.. Why not just write your own perl script and pipe the buffer?
:%! perl myscript_adding_prefixes.pl
Again - yes - it is not perfect. But good enough.
> I keep getting screwed though
> :s/\s*\n\s+{/ {; or with <>, I never remember which need quoting
Then what about using :s@\s*\n\s+..@replacement@e
Then you don't have to quote / key.
> but in s/\v\{([^\}]+\}/... ops, backslash isn't needed to quote stuff
> in brackets
> or closing braces if there was no opening... .. or on thursday and
> tuesday that
> occur on even days? or was it mondays and tue...er..
use case please: provide input and the output you'd like to see. Then we
can try to show you how we would solve the task using the 'swiss army
knife' features of Vim if appropriate.
Marc Weber
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php