Reminders about what's in your vim config.
Have you ever come across a really cool trick in vim in some online discussion, then try to add it to your config, only to find you had already put it in your config months ago?
A nice little reminder system is what I needed to keep track of the awesome tips, maps, commands, and plugins I've absorbed into my configuration over the years.
Document your .vimrc
with helpful comments you'd like reminders about every time you open Vim. For
example:
"" PLUGINS
call plug#begin(expand('~/.vim/plugged'))
Plug 'https://github.com/tpope/vim-fugitive' " Fugitive: The Ultimate `:Git` plugin <>
Plug 'https://github.com/rhysd/conflict-marker.vim' " Highlight and resolve git conflicts (`co`/`ct`) <>
call plug#end()
"" MAPPINGS
" gS : Sort motion in normal mode and operation in visual mode <>
nmap <silent> gS :set opfunc=functions#Sort<CR>g@
vmap <silent> gS :sort<CR>
" @@d : Insert current date in insert mode <>
iabbrev <expr> @@d strftime('%Y-%m-%d')
Note the <>
token at the end of the comment, sage.vim
will collect these marked comments and
randomly echo
one of them when you start vim
.
By default, searches for marked comments in
$MYVIMRC
$MYVIMDIR/*.vim
$MYVIMDIR/plugin/**/*.vim
$MYVIMDIR/ftplugin/**/*.vim
$MYVIMDIR/after/**/*.vim
where $MYVIMDIR
is either $HOME/.vim
, $HOME/.config/vim
, or $HOME/vimfiles
.
Use vim's built-in package support or your favourite package manager.
My suggested method is vim-plug
Plug 'BlakeJC94/vim-sage'
If any errors are encountered (or you would like to make a feature request), raise an issue on the repository so we can discuss. Pull requests are also welcomed
The main
branch is reserved for releases and should be considered stable. Changes should occur in
the dev
branch, which will periodically be merged into main
.
Distributed under the same terms as Vim itself. See :help license
.