mhinz/vim-galore

40 column cheatsheet

lifepillar opened this issue · 3 comments

Cool guide! I maintain a textual cheatsheet in my .vim folder. If a text-only cheatsheet fits, feel free to add it to your cheatsheet section (or do whatever you want):

https://github.com/lifepillar/vimrc/blob/master/cheatsheet.txt

I use it like this:

fun! s:Cheatsheet()
  botright vert 40sview ${HOME}/.vim/cheatsheet.txt
  setlocal bufhidden=wipe nobuflisted noswapfile nowrap
  nnoremap <silent> <buffer> <tab> <c-w><c-w>
  nnoremap <silent> <buffer> q <c-w>c
endf
nnoremap <silent> <leader>? :<c-u>call <sid>Cheatsheet()<cr>

Items are organized more or less after TextWrangler menus (plus Vim-specific stuff). There are several user-defined mappings, but being text-only, they are easily removed :)

mhinz commented

Hey,

linking to a file from a Vim config repo is a bit strange. How about making an own repo for it?

I have turned it into a plugin: https://github.com/lifepillar/vim-cheat40.

mhinz commented

Merged, thanks!