Using "wysiwyg editors" such as entering markup in vim

When adding markup to raw text to turn it into html, wysiwyg editors let you select a piece of text to which you want to apply markup, and then click on something like <Cb> and get the <strong> markup above it. It is very fast and useful.

I would like to know what parameters I need to make using the Vim visual mode, and possibly make it suitable only for html / jsp / php files. I have been looking for this for a long time. Does anyone have anything nice to say about this? Thanks in advance.

+4
source share
2 answers

surround.vim should do what you want:

 S<a href='/path/to/link'> 
+2
source

Surround would be my choice because it is universally useful; not just for html.

Zencoding can also be used for this with <Cy>, ,.

+1
source

Source: https://habr.com/ru/post/1446180/


All Articles