match string in part of List buffer starting at index

13 views
Skip to first unread message

Ni Va

unread,
Jan 17, 2020, 2:48:00 AM1/17/20
to vim_use
Hi,

Would like to match a string onto a part of List starting to Nth index ?

Thank you

Shlomi Fish

unread,
Jan 17, 2020, 3:40:36 AM1/17/20
to Ni Va, vim...@googlegroups.com
Hi,

what do you mean?

--

Shlomi Fish https://www.shlomifish.org/
Let’s talk about restores instead of backups - http://is.gd/WatQqu

Attention: There will be a rain dance Friday night, weather permitting.
— Source unknown, via Nadav Har’El.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

Ni Va

unread,
Jan 17, 2020, 7:42:31 AM1/17/20
to vim_use
That sort of thing
match(s:buffer[startidx : ]

Shlomi Fish

unread,
Jan 17, 2020, 9:52:14 AM1/17/20
to Ni Va, vim...@googlegroups.com
On Fri, 17 Jan 2020 04:42:30 -0800 (PST)
Ni Va <niva...@gmail.com> wrote:

> That sort of thing
> match(s:buffer[startidx : ]
>

Try using
https://learnvimscriptthehardway.stevelosh.com/chapters/27.html#joining or a
loop or whatever.
Interview with Ben Collins-Sussman - https://shlom.in/sussman

Chuck Norris killed the fat lady before she could sing.
http://www.shlomifish.org/humour/bits/facts/Chuck-Norris/

Andy Wokula

unread,
Jan 17, 2020, 10:34:53 AM1/17/20
to vim...@googlegroups.com
Check out match(), matchstr(), matchstrpos() etc with List argument for {expr}
and {start} index.

--
Andy

Ni Va

unread,
Jan 17, 2020, 11:42:20 AM1/17/20
to vim...@googlegroups.com
It's done. Thank you

--
--
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 a topic in the Google Groups "vim_use" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_use/KNLKeofTK-g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vim_use+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/5E21D40F.8050008%40yahoo.de.
Reply all
Reply to author
Forward
0 new messages