Tuesday, October 7, 2014

Re: shorten the display of url's while note taking

On Tuesday, October 7, 2014 10:07:52 PM UTC-5, Doug Walseth wrote:
> Hello -
>
> I use VIM for my notes (with vim-notes plugin). I would love it if I could shorten the display of url's so that it's easier to scan my notes.
>
> * I'd like to create a link by typing something like [text to display](url). e.g. [google](http://www.google.com)
> * this would ideally just display as "google", without the quotes, but highlighted in blue.
> * when I place the cursor on "google", it expands to show [google](http://www.google.com), so that I could edit it, etc.
> * bonus for typing "gf" and having it open the link in a browser.
>
>
> Is this possible?
>

You could use the "conceal" feature to hide parts of the text. Then by default when you move the cursor onto the line, the hidden text would be shown. Or you could set it up so that only happens in visual mode, or insert mode.

If that idea interests you, you can define a syntax match of the stuff you want to hide, and include the "conceal" attribute, and optionally the "cchar" attribute as well to specify a character to show in place of the hidden text.

--
--
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/d/optout.

No comments:

Post a Comment