Skip to content
/ rich.vim Public

visual rich text formatting for plain text files

Notifications You must be signed in to change notification settings

jocap/rich.vim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

rich.vim adds visual rich text formatting to plain text files. It is very useful for vim-based note taking.

Screenshot of rich.vim

Installation

To install rich.vim, copy the file syntax/rich.vim to the syntax directory in your vim folder. On Unix-like systems, it would be something like the following:

$ curl -o ~/.vim/syntax/rich.vim https://raw.githubusercontent.com/jocap/rich.vim/master/syntax/rich.vim

To activate rich.vim, issue set ft=rich inside vim.

Supported formatting

Text is formatted using one of three formatting marks:

*Bold text*
/Italic text/
_Underlined text_

These are concealed when the cursor moves to another line.

In order to avoid false positives, there are some limitations on what type of characters are allowed inside and outside formatted text:

  • The first and last character must be alphanumerical:

    *123*, *abc*    (treated as formatted text)
    *()-!*, _a._    (treated as unformatted text)
    
  • Between the first and last character, anything goes except the formatting mark:

    /a *"(("= b/    (treated as formatted text)
    /a/b/, _a_b_    (treated as plain text)
    
  • Outside the formatting marks, only certain characters are allowed:

    *text*.         (treated as formatted text)
    *text*/         (treated as unformatted text)
    
    • Before: ( [ " ' (and whitespace)
    • After: . , ; : ? ! ) ] " ' (and whitespace)

About

visual rich text formatting for plain text files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published