From 9d92aff9474cd8541c816ecf2233409bbb4352f4 Mon Sep 17 00:00:00 2001 From: Igor Chubin Date: Sun, 24 Jun 2018 19:55:57 +0000 Subject: [PATCH] added vim plugin demo --- README.md | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 99a7c30..fd9b10c 100644 --- a/README.md +++ b/README.md @@ -362,11 +362,52 @@ your question (or replace you question using `KR`). If you want the answer without the comments, `KC` replays the last query toggling them. +If you use some static analysis plugin such as *syntastic* (for Vim), you can use +its warning and error messages as cheat.sh queries: place the cursor on the problem line +and press `KE`: explandation for the warning will opened in a new buffer. + ### Vim * [cheat.sh-vim](https://github.com/dbeniamine/cheat.sh-vim) — Vim support -[![asciicast](https://asciinema.org/a/c6QRIhus7np2OOQzmQ2RNXzRZ.png)](https://asciinema.org/a/c6QRIhus7np2OOQzmQ2RNXzRZ) +Here is Vim configuration example: + +``` +" some configuration above ... + +let mapleader=" " + +call vundle#begin() +Bundle 'gmarik/vundle' +Bundle 'scrooloose/syntastic' +Bundle 'dbeniamine/cheat.sh-vim' +call vundle#end() + +let g:syntastic_javascript_checkers = [ 'jshint' ] +let g:syntastic_ocaml_checkers = ['merlin'] +let g:syntastic_python_checkers = ['pylint'] +let g:syntastic_shell_checkers = ['shellcheck'] + +" some configuration below ... +``` + +In this example, several Vim plugins are used: + +* [gmarik/vundle](https://github.com/VundleVim/Vundle.vim) — Vim plugin manager +* [scrooloose/syntastic](https://github.com/vim-syntastic/syntastic) — Syntax checking plugin +* [cheat.sh-vim](https://github.com/dbeniamine/cheat.sh-vim) — Vim support + +Syntastic shows warnings and errors (found by code analysys tools: `jshint`, `merlin`, `pylint`, `shellcheckt etc.), +and `cheat.sh-vim` shows you explanations for the errors and warnings +and answers on programming languages queries written in the editor. + +Watch a demo, where the most important features of the cheat.sh Vim plugin are shown (5 Min): + +

+ +

+ + ### Emacs