Skip to content

Simple syntax highlighting for plain text notetaking

Notifications You must be signed in to change notification settings

timss/notes.vim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

notes.vim

Simple syntax highlighting for plain text notetaking.

  • TODO, NOTE etc.
  • Numbers, but tries to be "smart" and not too noisy about what to highlight
  • Issue references for GitHub, Jira etc.
  • Assignments, k=v for variables or similar stuff
  • Strings enclosed in quotes, backticks or starting with > like Markdown
  • # commented lines
  • URLs, emails and UNIX paths (credits to xolox/vim-notes)

For anything more complex probably use something like Markdown instead, or perhaps check out xolox/vim-notes

Installation

Use whatever plugin manager you prefer. I like vim-plug:

Plug 'timss/notes.vim'

Can also be manually installed to ~/.vim/syntax/notes.vim.

Usage

This plugin does not automatically apply its syntax to any specific file extension.
Instead, add something like this to your ~/.vimrc, or issue :set ft=notes manually or using a Vim modeline.

augroup LocalFileTypeRules
    autocmd!
    autocmd BufNewFile,BufRead *.txt set ft=notes tw=120
augroup END

Example

Example screenshot

Why

For years I used Vim's default sh syntax highlighting when taking quick and dirty .txt notes where something like Markdown felt too restrictive, while also wanting some highlighting to help structure the text.

At some point the highlighting of shell keywords such as for or if, words like don't being treated as unenclosed strings and the lack of other common highlighting suitable for notes became too much of a nuisance to keep up with, and notes.vim was born.

About

Simple syntax highlighting for plain text notetaking

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published