refactor: finish moving ssh-* scripts to own installers
[webi-installers/.git] / vim-gui / README.md
1 ---
2 title: vim-gui
3 homepage: https://webinstall.dev/vim-gui
4 tagline: |
5   vim-gui enables Vim's built-in support for mouse, clipboard, etc
6 ---
7
8 To update (replacing the current version) run `webi vim-gui`.
9
10 ## Cheat Sheet
11
12 Vim has built-in GUI support.
13
14 It is turned off by default and when turned on may not behave exactly as
15 expected.
16
17 This vim-gui plugin turns on mouse support with insert mode on click,
18 select-to-copy clipboard, and other GUI options.
19
20 ### How to configure manually
21
22 Create the file `~/.vim/plugins/gui.vim`. Add the same contents as
23 <https://github.com/webinstall/webi-installers/blob/master/vim-gui/gui.vim>.
24
25 That will look something like this:
26
27 ```vim
28 " turn on mouse support
29 set mouse=a
30
31 " keep copy-on-select and other GUI options
32 set clipboard+=autoselect guioptions+=a
33
34 " enter insert mode on left-click
35 nnoremap <LeftMouse> <LeftMouse>i
36 ```
37
38 You'll then need to update `~/.vimrc` to source that plugin:
39
40 ```vim
41 " Mouse Support: reasonable defaults from webinstall.dev/vim-gui
42 source ~/.vim/plugins/gui.vim
43 ```