├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── autoload └── cheat.vim └── doc └── cheat.txt /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Contributing 2 | ============ 3 | If you would like to contribute to the development of this plugin, please fork 4 | its repository on Github and open a pull-request: 5 | 6 | https://github.com/chrisallenlane/vim-cheat 7 | 8 | If you would like to report a bug or make a feature request, please do so in 9 | the Github issue tracker: 10 | 11 | https://github.com/chrisallenlane/vim-cheat/issues 12 | 13 | Community cheatsheets may be contributed here: 14 | 15 | https://github.com/cheat/cheatsheets 16 | 17 | Community code snippets may be contributed here: 18 | 19 | https://github.com/cheat/snippets 20 | 21 | You may also contact the author of this plugin directly: 22 | 23 | Chris Allen Lane 24 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2020 Christopher Allen Lane 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | vim-cheat 2 | ========= 3 | `vim-cheat` is a natural-language snippet manager for `vim`, built atop 4 | [cheat][] and [fzf][]. 5 | 6 | While the goal of most snippet managers is to minimize keystrokes, `vim-cheat` 7 | aims to reduce the cognitive load associated with common programming tasks. It 8 | does so by providing a task-focused repository of snippets that can be 9 | queried with natural language. 10 | 11 | `vim-cheat` is context-aware, and can be configured to return only snippets 12 | that are relevant to the `filetype` of the current buffer. This makes 13 | "polyglot" work less mentally taxing by reducing the cost of context-switching 14 | among languages. 15 | 16 | Use `vim-cheat` in conjunction with [snippets][]. 17 | 18 | 19 | Example 20 | ------- 21 | `vim-cheat` works by leveraging `cheat`'s tagging mechanism: `vim-cheat` uses 22 | `fzf.vim` to filter and retrieve cheatsheets by tag. 23 | 24 | As a concrete example, imagine that we're writing a Go application that must 25 | connect to MySQL. Which method does this? 26 | 27 | Is it `mysql_connect`? Err, no - that's PHP. I think it's `mysql.createConnection`? 28 | Wait, no - that's Node. Is it `mysql.connector.connect`? Ah, no - that's 29 | Python. 30 | 31 | `vim-cheat` frees us from having to remember these details. Run `:Cheat` and 32 | type `connect database` into the prompt, and the appropriate Go snippet will 33 | be pasted into your buffer. (Snippets can be pasted from insert mode as well.) 34 | 35 | 36 | Installation 37 | ------------ 38 | `vim-cheat` can be installed as described in `:help packages`, or by using a 39 | package manager like Pathogen, Vundle, or Plug. 40 | 41 | `vim-cheat` additionally requires that the following dependencies be 42 | installed: 43 | 44 | - `cheat`: https://github.com/cheat/cheat 45 | - `fzf`: https://github.com/junegunn/fzf 46 | - `fzf.vim`: https://github.com/junegunn/fzf.vim 47 | 48 | You are encouraged cultivate a snippet collection that best serves your 49 | personal needs. With that said, the following repository serves as a starting 50 | point: 51 | 52 | https://github.com/cheat/snippets 53 | 54 | 55 | Functions 56 | --------- 57 | #### cheat#read_ft #### 58 | Read a snippet into the current buffer. The `fzf` selection menu will contain 59 | only cheatsheets that are tagged with the buffer's `filetype`. 60 | 61 | 62 | #### cheat#read_all #### 63 | 64 | Read a snippet into the current buffer. The `fzf` selection menu will contain 65 | all cheatsheets available on all cheatpaths. 66 | 67 | 68 | #### cheat#read_smart #### 69 | Read a snippet into the current buffer. If the buffer's `filetype` is known, 70 | the `fzf` selection menu will contain only cheatsheets that are tagged with 71 | the buffer's `filetype`. Otherwise, the selection menu will contain all 72 | cheatsheets available on all cheatpaths. 73 | 74 | 75 | #### cheat#edit_ft #### 76 | Open an existing cheatsheet for editing. The `fzf` selection menu will contain 77 | only cheatsheets that are tagged with the buffer's `filetype`. (Note that it 78 | is not currently possible to create a new cheatsheet using this function.) 79 | 80 | 81 | #### cheat#edit_all #### 82 | Open a cheatsheet for editing. The `fzf` selection menu will contain all 83 | cheatsheets available on all cheatpaths. (Note that it is not currently 84 | possible to create a new cheatsheet using this function.) 85 | 86 | 87 | #### cheat#edit_smart #### 88 | Open an existing cheatsheet for editing. If the buffer's `filetype` is known, 89 | the `fzf` selection menu will contain only cheatsheets that are tagged with 90 | the buffer's `filetype`. Otherwise, the selection menu will contain all 91 | cheatsheets available on all cheatpaths. (Note that it is not currently 92 | possible to create a new cheatsheet using this function.) 93 | 94 | 95 | #### cheat#dirs #### 96 | Display the configured cheatsheet directories. (This function simply wraps the 97 | `cheat -d` command.) 98 | 99 | 100 | #### cheat#tags #### 101 | Display the cheatsheet tags that are in use. (This function simply wraps the 102 | `cheat -T` command.) 103 | 104 | 105 | #### cheat#version #### 106 | Display the current `cheat` version. (This function simply wraps the `cheat -v` 107 | command.) 108 | 109 | 110 | Options 111 | ------- 112 | #### cheat_bin #### 113 | The path to the `cheat` executable. Defaults to `cheat`. 114 | 115 | 116 | #### cheat_fzf_options #### 117 | Options that will be passed to `fzf`. Defaults to the following: 118 | 119 | 120 | ```vim 121 | g:cheat_fzf_options = [ 122 | \ '--header-lines', 123 | \ '1', 124 | \ '--tiebreak', 125 | \ 'begin', 126 | \ '--preview-window', 127 | \ 'right:40%', 128 | \ '--preview', 129 | \ g:cheat_fzf_preview, 130 | \] 131 | ``` 132 | 133 | 134 | #### cheat_fzf_preview #### 135 | The command `fzf` will use for generating a cheatsheet preview. Defaults to the 136 | following: 137 | 138 | ```bash 139 | cheat --colorize `echo {} | cut -f1 -d" "` 140 | ``` 141 | 142 | 143 | ## Config ## 144 | You should map the functions exposed by this plugin to convenient wrappers in 145 | your `vimrc`. The following is an example configuration: 146 | 147 | ```vim 148 | " ex-mode commands: 149 | command Cheat call cheat#read_smart() 150 | command CheatDirs call cheat#dirs() 151 | command CheatEdit call cheat#edit_smart() 152 | command CheatVersion call cheat#version() 153 | 154 | " insert-mode: press Ctrl+s to open snippet selection menu: 155 | inoremap :call cheat#read_smart() 156 | ``` 157 | 158 | Because `vim-cheat` wraps the `cheat` executable, you must configure your 159 | `cheatpaths` as well. Example: 160 | 161 | ```yaml 162 | cheatpaths: 163 | - name: snippet-community 164 | path: ~/path/to/community/snippets 165 | tags: [ snippet ] 166 | readonly: true 167 | 168 | - name: snippet-personal 169 | path: ~/path/to/personal/snippets 170 | tags: [ snippet, personal ] 171 | readonly: false 172 | ``` 173 | 174 | See the `cheat` project documentation for more information on configuring 175 | `cheatpaths`: 176 | 177 | https://github.com/cheat/cheat/#cheatpaths 178 | 179 | See Also 180 | -------- 181 | `vim-cheat` pairs nicely with [vim-so][]. 182 | 183 | [cheat]: https://github.com/cheat/cheat 184 | [fzf.vim]: https://github.com/junegunn/fzf.vim 185 | [fzf]: https://github.com/junegunn/fzf 186 | [snippets]: https://github.com/cheat/snippets 187 | [vim-so]: https://github.com/cheat/vim-so 188 | -------------------------------------------------------------------------------- /autoload/cheat.vim: -------------------------------------------------------------------------------- 1 | " ============================================================================= 2 | " File: cheat.vim 3 | " Description: Vim integration for cheat 4 | " Mantainer: Chris Allen Lane (https://chris-allen-lane.com) 5 | " Url: https://github.com/cheat/vim-cheat 6 | " License: MIT 7 | " Version: 1.0.0 8 | " Last Changed: September 03, 2020 9 | " ============================================================================= 10 | 11 | let s:cpo_save = &cpo 12 | set cpo&vim 13 | 14 | 15 | " read all cheatsheets 16 | "{{{ 17 | function! cheat#read_all() 18 | " ensure that the plugin is properly configured 19 | if s:configured() == 0 20 | return 21 | endif 22 | 23 | call s:read(s:options('cheat_bin') . ' -l') 24 | endfunction 25 | "}}} 26 | 27 | 28 | " read cheatsheets that are tagged with the current filetype 29 | "{{{ 30 | function! cheat#read_ft() 31 | " ensure that the plugin is properly configured 32 | if s:configured() == 0 33 | return 34 | endif 35 | 36 | " ensure that the filetype is set 37 | if s:filetype() == 0 38 | return 39 | endif 40 | 41 | call s:read(s:options('cheat_bin') . ' -l -t' . &filetype) 42 | endfunction 43 | "}}} 44 | 45 | 46 | " read cheatsheets, filtering by filetype only if &filetype is set 47 | "{{{ 48 | function! cheat#read_smart() 49 | " ensure that the plugin is properly configured 50 | if s:configured() == 0 51 | return 52 | endif 53 | 54 | " display all cheatsheets only if filetype is unknown 55 | if &filetype == "" 56 | call s:read(s:options('cheat_bin') . ' -l') 57 | else 58 | call s:read(s:options('cheat_bin') . ' -l -t' . &filetype) 59 | endif 60 | endfunction 61 | "}}} 62 | 63 | 64 | " edit any cheatsheet 65 | "{{{ 66 | function! cheat#edit_all() 67 | " ensure that the plugin is properly configured 68 | if s:configured() == 0 69 | return 70 | endif 71 | 72 | call s:edit(s:options('cheat_bin') . ' -l') 73 | endfunction 74 | "}}} 75 | 76 | 77 | " edit a cheatsheet that is tagged with the current filetype 78 | "{{{ 79 | function! cheat#edit_ft(...) 80 | " ensure that the plugin is properly configured 81 | if s:configured() == 0 82 | return 83 | endif 84 | 85 | " ensure that the filetype is set 86 | if s:filetype() == 0 87 | return 88 | endif 89 | 90 | call s:edit(s:options('cheat_bin') . ' -l -t ' . &filetype) 91 | endfunction 92 | "}}} 93 | 94 | 95 | " edit cheatsheets, filtering by filetype only if &filetype is set 96 | "{{{ 97 | function! cheat#edit_smart() 98 | " ensure that the plugin is properly configured 99 | if s:configured() == 0 100 | return 101 | endif 102 | 103 | " display all cheatsheets only if filetype is unknown 104 | if &filetype == "" 105 | call s:edit(s:options('cheat_bin') . ' -l') 106 | else 107 | call s:edit(s:options('cheat_bin') . ' -l -t ' . &filetype) 108 | endif 109 | endfunction 110 | "}}} 111 | 112 | 113 | " show cheat directories 114 | "{{{ 115 | function! cheat#dirs() 116 | " ensure that the plugin is properly configured 117 | if s:configured() == 0 118 | return 119 | endif 120 | 121 | execute "!" s:options('cheat_bin') "-d" 122 | endfunction 123 | "}}} 124 | 125 | 126 | " show cheat tags 127 | "{{{ 128 | function! cheat#tags() 129 | " ensure that the plugin is properly configured 130 | if s:configured() == 0 131 | return 132 | endif 133 | 134 | execute "!" s:options('cheat_bin') "-T" 135 | endfunction 136 | "}}} 137 | 138 | 139 | " show cheat version 140 | "{{{ 141 | function! cheat#version() 142 | " ensure that the plugin is properly configured 143 | if s:configured() == 0 144 | return 145 | endif 146 | 147 | execute "!" s:options('cheat_bin') "-v" 148 | endfunction 149 | "}}} 150 | 151 | 152 | " helper: edit a cheatsheet 153 | "{{{ 154 | function! s:edit(fzf_source) 155 | call fzf#run(fzf#wrap({ 156 | \ 'source' : a:fzf_source, 157 | \ 'sink' : function('s:open'), 158 | \ 'options' : s:options('fzf_options'), 159 | \ })) 160 | endfunction 161 | "}}} 162 | 163 | 164 | " helper: load specified cheatsheets into fzf 165 | "{{{ 166 | function! s:read(fzf_source) 167 | " invoke fzf 168 | call fzf#run(fzf#wrap({ 169 | \ 'source' : a:fzf_source, 170 | \ 'sink' : function('s:get'), 171 | \ 'options' : s:options('fzf_options'), 172 | \})) 173 | endfunction 174 | "}}} 175 | 176 | 177 | " helper: get cheatsheet content 178 | "{{{ 179 | function! s:get(sheet) 180 | let text = system(s:options('cheat_bin') . " " . split(a:sheet)[0]) 181 | call s:paste(text) 182 | endfunction 183 | "}}} 184 | 185 | 186 | " helper: open cheatsheet for editing 187 | "{{{ 188 | function! s:open(sheet) 189 | execute 'edit' split(a:sheet)[1] 190 | endfunction 191 | "}}} 192 | 193 | 194 | " helper: return options 195 | "{{{ 196 | function! s:options(key) 197 | " get the cheat binary path 198 | let cheat_bin = get(g:, 'cheat_bin', 'cheat') 199 | 200 | " assemble the preview command 201 | let preview = printf('%s --colorize `echo {} | cut -f1 -d" "`', cheat_bin) 202 | let preview = get(g:, 'cheat_fzf_preview', preview) 203 | 204 | " assemble the default fzf options 205 | let fzf_def_opts = [ 206 | \ '--header-lines', 207 | \ '1', 208 | \ '--tiebreak', 209 | \ 'begin', 210 | \ '--preview-window', 211 | \ 'right:40%', 212 | \ '--preview', 213 | \ preview, 214 | \] 215 | 216 | " create a dictionary of options 217 | let opts = { 218 | \ 'cheat_bin' : cheat_bin, 219 | \ 'fzf_options' : get(g:, 'cheat_fzf_options', fzf_def_opts), 220 | \} 221 | 222 | " return the requested options 223 | return opts[a:key] 224 | endfunction 225 | "}}} 226 | 227 | 228 | " helper: ensure that the plugin has been properly configured 229 | "{{{ 230 | function! s:configured() 231 | " ensure that `cheat` is available on the `$PATH` 232 | if executable(s:options('cheat_bin')) == 0 233 | call s:fail('could not locate cheat executable on $PATH') 234 | return 0 235 | endif 236 | 237 | " ensure that the fzf plugin has been installed 238 | if !exists("*fzf#run") 239 | call s:fail('could not locate fzf.vim') 240 | return 0 241 | endif 242 | 243 | " if we make it here, we're properly configured 244 | return 1 245 | endfunction 246 | "}}} 247 | 248 | 249 | " helper: fail if &filetype is not set 250 | "{{{ 251 | function! s:filetype() 252 | if &filetype == "" 253 | call s:fail('filetype is unset') 254 | return 0 255 | endif 256 | 257 | return 1 258 | endfunction 259 | "}}} 260 | 261 | 262 | " helper: paste text into the buffer 263 | "{{{ 264 | function! s:paste(text) 265 | " paste the text 266 | silent put = a:text 267 | 268 | " indent the pasted text and return the cursor to its original location 269 | norm! ='[ 270 | 271 | " delete the unwanted newline inserted before the paste 272 | norm! kdd 273 | endfunction 274 | "}}} 275 | 276 | 277 | " helper: display an error message 278 | "{{{ 279 | function! s:fail(...) 280 | echoerr 'vim-cheat:' join(a:000) 281 | endfunction 282 | "}}} 283 | 284 | 285 | let &cpo = s:cpo_save 286 | unlet s:cpo_save 287 | -------------------------------------------------------------------------------- /doc/cheat.txt: -------------------------------------------------------------------------------- 1 | *vim-cheat.txt* A natural-language snippet manager for vim 2 | 3 | vim-cheat 4 | ~ 5 | Reference Manual 6 | 7 | 8 | ============================================================================== 9 | CONTENTS *vim-cheat-contents* 10 | 11 | 1. Overview ....................................|vim-cheat-overview| 12 | 2. Example .....................................|vim-cheat-example| 13 | 3. Installation ................................|vim-cheat-installation| 14 | 4. Functions ...................................|vim-cheat-functions| 15 | 5. Options .....................................|vim-cheat-options| 16 | 6. Config ......................................|vim-cheat-config| 17 | 7. Changelog ...................................|vim-cheat-changelog| 18 | 8. Contributing ................................|vim-cheat-contributing| 19 | 20 | 21 | ============================================================================== 22 | 1. Overview *vim-cheat-overview* 23 | 24 | 25 | 26 | `vim-cheat` is a natural-language snippet manager for `vim`, built atop 27 | `cheat` and `fzf`. 28 | 29 | While the goal of most snippet managers is to minimize keystrokes, `vim-cheat` 30 | aims to reduce the cognitive load associated with common programming tasks. It 31 | does so by providing a task-focused repository of snippets that can be 32 | queried with natural language. 33 | 34 | `vim-cheat` is context-aware, and can be configured to return only snippets 35 | that are relevant to the |filetype| of the current buffer. This makes 36 | "polyglot" work less mentally taxing by reducing the cost of context-switching 37 | among languages. 38 | 39 | 40 | ============================================================================== 41 | 2. Example *vim-cheat-example* 42 | 43 | 44 | 45 | `vim-cheat` works by leveraging `cheat`'s tagging mechanism: `vim-cheat` uses 46 | `fzf.vim` to filter and retrieve cheatsheets by tag. 47 | 48 | As a concrete example, imagine that we're writing a Go application that must 49 | connect to MySQL. Which method does this? 50 | 51 | Is it `mysql_connect`? Err, no - that's PHP. I think it's `mysql.createConnection`? 52 | Wait, no - that's Node. Is it `mysql.connector.connect`? Ah, no - that's 53 | Python. 54 | 55 | `vim-cheat` frees us from having to remember these details. Run `:Cheat` and 56 | type `connect database` into the prompt, and the appropriate Go snippet will 57 | be pasted into your buffer. (Snippets can be pasted from insert mode as well. 58 | See |vim-cheat-config|.) 59 | 60 | 61 | ============================================================================== 62 | 3. Installation *vim-cheat-installation* 63 | 64 | 65 | 66 | `vim-cheat` can be installed as described in |packages|, or by using a package 67 | manager like Pathogen, Vundle, or Plug. 68 | 69 | `vim-cheat` additionally requires that the following dependencies be 70 | installed: 71 | 72 | - `cheat`: https://github.com/cheat/cheat 73 | - `fzf`: https://github.com/junegunn/fzf 74 | - `fzf.vim`: https://github.com/junegunn/fzf.vim 75 | 76 | You are encouraged cultivate a snippet collection that best serves your 77 | personal needs. With that said, the following repository serves as a starting 78 | point: 79 | 80 | https://github.com/cheat/snippets 81 | 82 | 83 | ============================================================================== 84 | 4. Functions *vim-cheat-functions* 85 | 86 | 87 | 88 | `cheat#read_ft` *cheat#read_ft* 89 | 90 | Read a snippet into the current buffer. The `fzf` selection menu will contain 91 | only cheatsheets that are tagged with the buffer's `filetype`. 92 | 93 | 94 | `cheat#read_all` *cheat#read_all* 95 | 96 | Read a snippet into the current buffer. The `fzf` selection menu will contain 97 | all cheatsheets available on all cheatpaths. 98 | 99 | 100 | `cheat#read_smart` *cheat#read_smart* 101 | 102 | Read a snippet into the current buffer. If the buffer's `filetype` is known, 103 | the `fzf` selection menu will contain only cheatsheets that are tagged with 104 | the buffer's `filetype`. Otherwise, the selection menu will contain all 105 | cheatsheets available on all cheatpaths. 106 | 107 | 108 | `cheat#edit_ft` *cheat#edit_ft* 109 | 110 | Open an existing cheatsheet for editing. The `fzf` selection menu will contain 111 | only cheatsheets that are tagged with the buffer's `filetype`. (Note that it 112 | is not currently possible to create a new cheatsheet using this function.) 113 | 114 | 115 | `cheat#edit_all` *cheat#edit_all* 116 | 117 | Open a cheatsheet for editing. The `fzf` selection menu will contain all 118 | cheatsheets available on all cheatpaths. (Note that it is not currently 119 | possible to create a new cheatsheet using this function.) 120 | 121 | 122 | `cheat#edit_smart` *cheat#edit_smart* 123 | 124 | Open an existing cheatsheet for editing. If the buffer's `filetype` is known, 125 | the `fzf` selection menu will contain only cheatsheets that are tagged with 126 | the buffer's `filetype`. Otherwise, the selection menu will contain all 127 | cheatsheets available on all cheatpaths. (Note that it is not currently 128 | possible to create a new cheatsheet using this function.) 129 | 130 | 131 | `cheat#dirs` *cheat#dirs* 132 | 133 | Display the configured cheatsheet directories. (This function simply wraps the 134 | `cheat -d` command.) 135 | 136 | 137 | `cheat#tags` *cheat#tags* 138 | 139 | Display the cheatsheet tags that are in use. (This function simply wraps the 140 | `cheat -T` command.) 141 | 142 | 143 | `cheat#version` *cheat#version* 144 | 145 | Display the current `cheat` version. (This function simply wraps the `cheat -v` 146 | command.) 147 | 148 | 149 | 150 | ============================================================================== 151 | 5. Options *vim-cheat-options* 152 | 153 | 154 | 155 | `cheat_bin` *g:cheat_bin* 156 | 157 | The path to the `cheat` executable. Defaults to `cheat`. 158 | 159 | 160 | `cheat_fzf_options` *g:cheat_fzf_options* 161 | 162 | Options that will be passed to `fzf`. Defaults to the following: 163 | 164 | `g:cheat_fzf_options = [` 165 | `\ '--header-lines',` 166 | `\ '1',` 167 | `\ '--tiebreak',` 168 | `\ 'begin',` 169 | `\ '--preview-window',` 170 | `\ 'right:40%',` 171 | `\ '--preview',` 172 | `\ g:cheat_fzf_preview,` 173 | `\]` 174 | 175 | 176 | `cheat_fzf_preview` *g:cheat_fzf_preview* 177 | 178 | The command `fzf` will use for generating a cheatsheet preview. Defaults to the 179 | following: 180 | 181 | cheat --colorize ``echo {} | cut -f1 -d" "`` 182 | 183 | 184 | ============================================================================== 185 | 6. Config *vim-cheat-config* 186 | 187 | 188 | 189 | You should map the functions exposed by this plugin to convenient wrappers in 190 | your |vimrc|. The following is an example configuration: 191 | 192 | `" ex-mode commands:` 193 | `command Cheat call cheat#read_smart()` 194 | `command CheatDirs call cheat#dirs()` 195 | `command CheatEdit call cheat#edit_smart()` 196 | `command CheatVersion call cheat#version()` 197 | 198 | `" insert-mode: press Ctrl+s to open snippet selection menu:` 199 | `inoremap :call cheat#read_smart()` 200 | 201 | Because `vim-cheat` wraps the `cheat` executable, you must configure your 202 | `cheatpaths` as well. Example: 203 | 204 | `cheatpaths:` 205 | `- name: snippet-community` 206 | `path: ~/path/to/community/snippets` 207 | `tags: [ snippet ]` 208 | `readonly: true` 209 | 210 | `- name: snippet-personal` 211 | `path: ~/path/to/personal/snippets` 212 | `tags: [ snippet, personal ]` 213 | `readonly: false` 214 | 215 | See the `cheat` project documentation for more information on configuring 216 | `cheatpaths`: 217 | 218 | https://github.com/cheat/cheat/#cheatpaths 219 | 220 | 221 | ============================================================================== 222 | 7. Changelog *vim-cheat-changelog* 223 | 224 | 225 | 226 | * v1.0.0: Initial release 227 | 228 | 229 | ============================================================================== 230 | 8. Contributing *vim-cheat-contributing* 231 | 232 | 233 | 234 | If you would like to contribute to the development of this plugin, please fork 235 | its repository on Github and open a pull-request: 236 | 237 | https://github.com/chrisallenlane/vim-cheat 238 | 239 | If you would like to report a bug or make a feature request, please do so in 240 | the Github issue tracker: 241 | 242 | https://github.com/chrisallenlane/vim-cheat/issues 243 | 244 | Community cheatsheets may be contributed here: 245 | 246 | https://github.com/cheat/cheatsheets 247 | 248 | Community code snippets may be contributed here: 249 | 250 | https://github.com/cheat/snippets 251 | 252 | You may also contact the author of this plugin directly: 253 | 254 | Chris Allen Lane 255 | 256 | vim:tw=78:ts=8:noet:ft=help:norl: 257 | --------------------------------------------------------------------------------