How does one enter (and view) italic text in vim?
I am interested in a keymap by which I can toggle to "italic mode" and back.
Example from the infopage of a certain vim plugin: see the text under the heading Text Styles
Vi and Vim Stack Exchange is a question and answer site for people using the vi and Vim families of text editors. It only takes a minute to sign up.Sign up to join this community
TLDR: There is no such thing. Vim edits plain text, and there is no "italic mode" or anything like that.
To be more specific: Vim is not a word processor. You are confusing file formats and how they render in typical WYSIWYG interfaces (like Microsoft Word) with a text editor, like Vim, Emacs, Notepad, etc. The latter, including Vim, only edits plain text regardless of the file format.
To be more nuanced: There are different file formats, and in some file formats, Vim uses syntax highlighting to show formatted text in e.g. italics. As an example, if you use Vim to edit a file in the Markdown format, you could (with the right setup) make text between pairs of
* appear italized.
The question was updated with an example that indicates more about what is wanted. Here is a general remark: With a plugin like vim-notes, syntax highlighting is used to provide italics in Vim. To make this work, one either has to use a terminal that supports italics (and bold font and so on), or to use a gui variant such as gvim. Further, one has to have the
conceal feature. Most Vim's tend to have this nowadays. Finally, to get the italized font, you need to use the specified syntax, which is
_text in italics_ for this particular plugin.