Cheat40 is a foldable extensible 40-column cheat sheet that you may open in Vim by pressing <leader>?
(the mapping is customizable, of course). Mappings and commands are organized like the menus of a GUI app: there is a File section, an Edit section, a View section, and so on. For each item the description comes first, because one typically wants to find how to execute a task, not what the meaning of a key sequence is (there is Vim's help for that). Syntax coloring and the use of conceal
keep the cheat sheet clutter-free and easy to read.
If your Vim supports packages (echo has('packages')
prints 1
), I strongly recommend that you use them. Just clone this repo inside pack/*/start
, e.g.,
cd ~/.vim
git clone https://github.com/lifepillar/vim-cheat40.git pack/bundle/start/cheat40
Otherwise, use your preferred installation method.
Extending the cheat sheetYou may extend the cheat sheet by putting one or more files called cheat40.txt
anywhere in your runtimepath
(e.g., in ~/.vim
). Cheat40 searches runtimepath
for such files and concatenates their content. This allows plugin developers to provide a cheat sheet for their plugins by putting a cheat40.txt
file in the top folder of their plugins.
If you do not want to use the default cheat sheet that comes with this plugin, set the following variable in your .vimrc
:
let g:cheat40_use_default = 0
In this case, I recommend that you copy cheat40.txt
into your .vim
folder and modify it to suit your needs.
You can also add filetype-specific cheats, by adding cheat40_<filetype>.txt
files in your runtimepath
. If such files are present, they'll be used instead of the builtin documentation and for that filetype, normal cheat40.txt
files will also be ignored.
The syntax of a cheat sheet is very simple:
{{{
and }}}
) (see :h fold-marker
);About … {{{ … }}}
are interpreted as block comments;#
are interpreted as line comments;N
for Normal mode, I
for Insert mode, and so on).See the cheat sheet inside the plugin for the details.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4