Skip to content

BlakeJC94/vim-sage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

sage.vim

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.

Usage

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.

Installation

Use vim's built-in package support or your favourite package manager.

My suggested method is vim-plug

Plug 'BlakeJC94/vim-sage'

Issues

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

Development

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.

Licence

Distributed under the same terms as Vim itself. See :help license.

About

Reminders about what's in your vim config

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published