Giter Site home page Giter Site logo

vim-cheat40's Introduction

Cheat40: a cheat sheet for Vim

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.

Installation

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 sheet

You 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.

The syntax of a cheat sheet is very simple:

  • foldable sections use Vim's default markers ({{{ and }}}) (see :h fold-marker);
  • sections of the form About … {{{ … }}} are interpreted as block comments;
  • lines starting with a # are interpreted as line comments;
  • each line, except for comments and section markers, should be 40 columns wide (comments and section markers may be shorter than that);
  • each item consists of a description, a key sequence, and a label;
  • the description must fit in columns 1–25 (long descriptions may be split into several lines);
  • the key sequence and the label must fit in columns 26–40 (long key sequences should be split into several lines);
  • the label is a right-justified sequence of one or more characters (e.g., N for Normal mode, I for Insert mode, and so on).

See the cheat sheet inside the plugin for the details.

vim-cheat40's People

Contributors

lifepillar avatar drgo avatar sudormrfbin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.