- Edit, search and read notes in Vim
- Quick and simple with minimal workflow impact
- SQLite format
Vim >= 8.1.0875 or Neovim >= 0.4.4
SQLite (e.g. apt install sqlite3
on a Debian based system)
Add Plug 'hwblx/vsnt'
to your .vimrc
.
Install with :PlugInstall
.
git clone https://github.com/hwblx/vsnt ~/.vim/pack/plugins/start/vsnt
git clone https://github.com/hwblx/vsnt ~/.local/share/nvim/site/pack/plugins/start/vsnt
Open a new buffer and start with :Snt
.
Actions are called up via the insert or command line mode.
Submit with <Enter>
or <Shift-F3>
, e.g.
E: s python #html or
S: r 2
R: n
Prefix all commands with Snt
, e.g.
:Snt n
:Snt s *
:Snt tl vsnt_peers
n edit new note
e {number} edit note id=number
s {words|#tags} search words and/or #tags
s {*|number|#} show all notes (id >=number) or #tags
r {number} read note id=number
{e|r|s} show mode last view
h help
db * list all databases
db {path|number} select database
tl * list all tables
tl {name|number} select table
The vsnt
default database comes with two sample tables, vsnt_snippets
and vsnt_peers
.
Experiment with the commands, then start creating your own database with custom tables and personal notes.
{number} edit note id=number
w write new note
w {number} overwrite note id=number
u update recent note
cb {path} create database
ct {name} create table
Note templates define a set of table column names.
Column names are enclosed by angled brackets, e.g. like <Title>
.
Optionally, include a <Tags>
column for searching #tags.
{words|#tags|or} search words and/or #tags
{*|number|#} show all notes (id >=number) or #tags
Words are searched for in the first column of the table (the top note item).
#Tags are searched in <Tags>
if present, otherwise in the first column.
Search phrases are concatenated with "and" by default.
Toggle "or" concatenation like
S: html #python or
E: s debian or git
:Snt s or #javascript #html
{number} read note id=number
E edit note
Insert the paths of your database files into the vsnt_config
table to easily navigate between different databases.
Change the title color to another highlight group (:hi
) under <Highlight>
.