Monday, December 28, 2020

Re: Jump between phrases with particular pattern and feed matching words to command

On Sun, Dec 27, 2020 at 03:20:01PM +0100, 'Fetchinson' via vim_use wrote:
>> I have a text file with content like this:
>>
>> [example.jpg|image]
>> [example.pdf|document]
>> [another.jpg|image]
>> [yetanother.doc|document]
>>
>> And I'd like to make vim "jump" between the 4 items back and forth via
>> two selected keys, for example "n" for next and "p" for previous. When
>> one of the items is "selected", it should be highlighted with a
>> background different from the default, I mean the whole item from [ to
>> ] should have a different background. Then I'd like to be able to
>> press a third key, for example, Enter, which should call a vim
>> function with the 2 arguments given by the file name and the file
>> type, for example "example.pdf" and "document".

You can achieve the first two goals with 'j', 'k', and the cursorline setting.

--
--
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/20201228162930.GA30924%40rainslide.net.

No comments: