Search code examples
htmlvimwysiwyg

Using "wysiwyg editors" like markup input in vim


When adding markup to raw text to turn it into html, wysiwyg editors let you select the piece of text you want to apply the markup to and then press something like <C-b> and get some <strong> markup around of it. It's very quick and useful.

I would like to know what options I have to do this using Vim' visual mode, and maybe make it usable only on html/jsp/php files or so. I have been looking for this for a long time. Does anyone have anything nice to share about this? Thanks in advance.


Solution

  • surround.vim should do what you want:

    S<a href='/path/to/link'>