March 17, 2019 · VIM
jj - The missing simple daily snippet tool for your vim
Do you want a dead simple vim snippet tool that you can modify, edit, save & even use a git to manage it?
Read the following function. It is dead simple and easy to use. I call it jj , or you can rename the function to any as you want.
~/.bashrc
Append the following function
function jj() {
if [ "$1" != "" ]
then
vim ~/snippets/$1
else
vim ~/snippets/$(date +%F)
fi
}
and run this:
source ~/.bashrc & mkdir -p ~/snippets
Daily usage:
jj #and you can start snipping, it will create a snippet in daily order manner. 10x recommeneded.