feature(delta): automagically set delta to default git diff
[webi-installers/.git] / _vim-example / README.md
1 ---
2 title: vim-example
3 homepage: https://github.com/CHANGEME/example
4 tagline: |
5   Vim Example: A template for webi vim plugins.
6 ---
7
8 To update (replacing the current version) run `webi vim-example`.
9
10 ## Cheat Sheet
11
12 ![](https://i.imgur.com/N2dVHJP.png)
13
14 > Replace this text with a nice summary, perhaps from the plugins documentation.
15
16 If there are some important key bindings, use a table like this:
17
18 | Key                     | Action                                               |
19 | ----------------------- | ---------------------------------------------------- |
20 | **Global Key Bindings** |                                                      |
21 | `<Leader>n`             | Move cursor to NERDTree                              |
22 | `ctrl+w`, w             | Rotate between open windows                          |
23 | `:e **/api.js<tab>`     | Open and edit file matching api.js, in any subfolder |
24
25 ### How to install and configure manually
26
27 1. Place EXAMPLE into your `~/.vim/pack/plugins/start`:
28
29    ```bash
30    mkdir -p ~/.vim/pack/plugins/start/
31    git clone --depth=1 https://github.com/CHANGEME/EXAMPLE.git ~/.vim/pack/plugins/start/example
32    ```
33
34 2. Create the file `~/.vim/plugins/example.vim`. Add the same contents as
35    <https://github.com/webinstall/webi-installers/blob/master/vim-example/example.vim>,
36    which will look something like this:
37
38    ```vim
39    " ~/.vim/plugins/example.vim
40
41    " default mappings for example
42    nnoremap <leader>x :EXAMPLE<CR>
43    ```
44
45 3. Update `~/.vimrc` to source that plugin:
46    ```vim
47    " example: reasonable defaults from webinstall.dev/vim-example
48    source ~/.vim/plugins/example.vim
49    ```