Tuesday, October 22, 2013

Re: Place a sign on each line between two regexps

On Tuesday, October 22, 2013 3:46:09 PM UTC-5, esquifit wrote:
> On Tuesday, October 22, 2013 5:57:58 PM UTC+2, Ben Fritz wrote:
> >
> > Or maybe a normal command with a range:
> >
> > :g#start#+1,/end/-1normal! :exe 'sign place 1 name=Foo line='.line('.').'
> > file='.expand('%:p')^M
>
> This is indeed similar to what I originally intended. The 'normal :exe'
> does the trick of avoiding the E418 about ranges not supported by exe, but
> for some reason the whole line doesn't work. Even a simpler thing like
>
> :g/START/;/END/normal :exe 'echo '.line('.')
>
> doesn't yield any result.
>

Did you include a literal carriage return at the end, by typing CTRL-V and then CTRL-M or Enter to get Vim to display ^M?

I'm seeing a weird pattern for the :g command again in your simplified example, I'm not going to test whether it works anyway.

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: