How I use neovim for note-taking | Day 8 of 100
In my previous post I've spoken about my note-taking system, which strives to be minimalistic, simple, funny and (hopefully) functional.
To write on it, I use Neovim. Neovim is a reborn Vim editor which is fully compatible with its parent. This means all the guides for Neovim and Vim will be almost certainly compatible, as well as the hotkeys.
This post will not cover Neovim basic hotkeys, nor will talk about how to build your own
.vimrc. Instead, I will focus on the plugins I use for my notes system.
vimwiki/vimwiki (github page) to transform my plain-text/markdown note into a powerful Wiki system.
It will automatically do the syntaxing for those lines where the cursor is not present, and enable many useful things such as “diaries” for your notes, perform search, follow links, and many many other stuff.
If you write in markdown, links are made this way,
[Note description](/CUSTOM/PATH/another-note-to-link.md). To open it, put your cursor on the link and press Enter. Another tab with the note you clicked on will be opened. You can put there web URLs as well, they will be opened with your default browser by pressing Enter. This is the same as pressing
gg to follow a path with Vim, and
gx to open that path with an eXternal resource (such as a browser to open an URL).
I use kind of 2% of Vimwiki features, because that's all I need, and I don't want my system to be too complex or too feature-rich. That said, I often look for new, unexpected features. Vimwiki is a powerful Vim plugin, and I'm discovering new things each time I read the manual page at
I really like what
ctrlpvim/ctrlp.vim does. By pressing CTRL+P you open a fuzzy-finder that lets you open another file by searching its name on the list, then pressing Enter. That's it, it's all it does, with the exception of a few commands to improve your search experience. I use it to quickly find notes inside a neovim buffer.
Never heard of figlet? It's a command-line tool to create ASCII-text from text.
For example, with
figlet "I Love Notes" you will get the following output
___ _ _ _ _ |_ _| | | _____ _____ | \ | | ___ | |_ ___ ___ | | | | / _ \ \ / / _ \ | \| |/ _ \| __/ _ \/ __| | | | |__| (_) \ V / __/ | |\ | (_) | || __/\__ \ |___| |_____\___/ \_/ \___| |_| \_|\___/ \__\___||___/
How is this related to notes?
Well, I use it to beautify a little my notes with cool titles on top of them.
figlet as a requirement, I installed the
fadein/vim-figlet plugin. To get an awesome title, this is what I do.
On the top of a note, I write
``` Awesome Title ```
and hover my cursor above the title. Then I simply run
:FIGlet and the text over my cursor will be transformed in a big ASCII title!
The three accents ` which toggle code-snippets mode are necessary, otherwise your big ASCII title will see syntax highlighting applied on itself, which is not what we truly want.
If you don't like the ASCII font in use, you can try different flavours with
:FIGlet -f <font_name>, I extensively use
:FIGlet -f small because I find it elegant and not too space consuming.
The result will be like
``` _ _____ _ _ _ /_\__ __ _____ ___ ___ _ __ ___ |_ _(_) |_| |___ / _ \ V V / -_|_-</ _ \ ' \/ -_) | | | | _| / -_) /_/ \_\_/\_/\___/__/\___/_|_|_\___| |_| |_|\__|_\___| ``` # Insert small title Let's write the note now! [...]
If the previous plugin wasn't really necessary, neither is this one.
vim-airline/vim-airline-themes will just make your Vim/Neovim cooler, showing a cooler status-bar and a cooler tab-bar. What I really like of this plugin (apart from the appearance) is that it clearly shows open tabs and open buffers. I also add
set noshowmode (Airline will handle it by itself) and a bunch of configurations:
let g:airline_powerline_fonts = 1 let g:airline#extensions#tabline#enabled = 1 let g:airline#extensions#tabline#show_tabs = 1 let g:airline#extensions#tabline#show_tab_count = 1
The first one, of course, will be supported only if you have powerline fonts installed.
A last (but optional) configuration is to select your default Airline theme, if it can't match the theme you're using.
I'm testing fzf for Vim, which is
junegunn/fzf.vim. This plugin will quite surely improve my workflow and let me waste less time jumping from file to file.
I'm also testing Goyo+Limelight, from the same author as well. Those plugins aim to make your experience even more minimalistic and distractionless by hiding everything but text!
I'll make further articles about these plugins and other stuff I use to take notes.
This is post #8 of #100DaystoOffload challenge. My mastodon profile: @email@example.com