VIM - How to Bold, Italic, Underline and Hypertext Specific Words?
The Txtfmt plugin offers bold, italic, underline, and colors too...
Txtfmt (The Vim Highlighter)
Txtfmt provides a sort of "rich text" capability for plain text in Vim. The highlighting is accomplished via hidden marker characters inserted directly into the buffer, so the highlighting is made persistent without the need to store metadata apart from the file.
Txtfmt is highly configurable. The default settings support 8 (configurable) foreground colors, 8 (configurable) background colors, and all combinations of bold, underline and italic attributes (e.g., bold, bold-italic, bold-underline, etc...). A non-default configuration supports the following additional attributes: standout, reverse and undercurl.
There is a very extensive help file, and the author is more than happy to answer usage questions...
Vim is a text editor with syntax highlighting; it's not a word processor. That said, you can indeed edit common markup text formats like HTML, Markdown, Textile, Mediawiki, etc., and Vim will highlight marked-up text (according to the formatting capabilities of Vim and the used environment; i.e. GVIM allows more styles and colors than the terminal version).
For that to work, you need
:syntax on
in your ~/.vimrc
, and ensure that the right 'filetype'
is detected / set (e.g. :edit +setf\ html foo.html
).