3

I am new in VIM. I am writing some files using VIM. I did enough research but didn't get the answer anywhere! I just wanted to know how can I Bold, Italic and Underline a word in VIM. Also I want to create anchor text external links from my file. But after digging in Google I really didn't find enough info. Can anybody tell me how can I create anchor text links in my VIM files like this one.. Super User.

1
  • vim is a text editor, not a word processor, so i think it's impossible at least on a console level
    – user373230
    Oct 14, 2014 at 6:26

3 Answers 3

3

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...

2

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).

1

You can use the TxtFmt plugin to allow for visually highlighting of certain regions.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .