Lifepillar
unread,Jun 20, 2021, 7:00:03 AM6/20/21Sign 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 need to programmatically search for a pattern in the first ten lines
of a given buffer, and save the match in a variable when found. Say, the
pattern is:
% KEY = value
I need to extract the value if the above appears in the first lines of
the buffer. Of course, the state of the buffer's window, such as the
cursor's position, etc., and the content of registers should not be
affected. How would you do that?
Thanks,
Life.