Sunday, May 19, 2019

Re: delete until

The way you described the problem, it sounded like you wanted to
go forward to the next slash even if there was an intervening "'"
char:

this 'is/a/firstpath' and this 'is/another/path'

where, if your cursor was on the "f" of "firstpath", you wanted to
jump to the next slash (after the second "is") instead of the
single-quote at the end of "firstpath". So that's what the solution
in my previous email does. However, if you just want a "go to the
next slash-or-single-quote, whichever is next" it's a lot tidier:

nnoremap <f5> /[/']/<cr>

-tim


On 2019-05-19 16:03, Tim Chase wrote:
> On 2019-05-19 19:21, Mathieu Roux wrote:
> > and how can i say?: go to the next /, and if you don't find it, go
> > to the next '
> >
> > For exemple, if i am at the beginning of the string
> > 'abc/def/ghi',and some /
> > it should go to /
> > and if i am on "g" on the same string, it should go to '
> >
> > In fact i want to map this command to <F5>.
> >
> > map <F5> f('|/)v0*
>
> Might try something like this?
>
> nnoremap <f5> /\%#.\(.\{-}\/\<bar>[^\/]*'\)/e<cr>
>
> -tim
>
>
> --
> --
> 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. To view this discussion on
> the web visit
> https://groups.google.com/d/msgid/vim_use/20190519160353.4abf9eb2%40bigbox.christie.dr.
> For more options, visit https://groups.google.com/d/optout.


--
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20190519162132.7018d2e6%40bigbox.christie.dr.
For more options, visit https://groups.google.com/d/optout.

No comments: