> For the complete documentation index, see [llms.txt](https://garden.famiclone.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://garden.famiclone.dev/development/text-editors/vim.md).

# Vim

Vim is the powerful highly configurable text editor with extensible plugin system and great documentation.

## Notes

### Plugin system

#### Install plugins

Vim 8+ has built-in plugin system. `:help packages`

1. Make dir and clone plugin repository

```
mkdir ~/.vim/pack/plugins/start/

git clone https://github.com/prettier/vim-prettier ~/.vim/pack/plugins/start/vim-prettier
```

1. Enable auto load plugins at vim starts. In `.vimrc` add following command:

```
packloadall
```

#### Resize window

`:res +25`

#### Surround

`:%s/target/{\0} # {target}`

![vim cheatsheet](https://2702803712-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MF9agby69Z2WkO7NyV9%2Fsync%2F6b285e66e19b84f46cfb23a52a8c58c4a3e9898b.png?generation=1608368819707936\&alt=media)

## Links

* [Vim Conf 2020](https://www.vimconf.live)
* [Check my .vimrc file](https://github.com/famiclone/dotfiles/blob/master/.vimrc)
* <https://www.vim.org> - Official
* <https://www.vimgolf.com/> - Vim challenges
* <https://vim.fandom.com/wiki/Vim_Tips_Wiki> - Vim tips wiki
* [pintovim.dev](https://pintovim.dev) - Vim color scheme generator
* [Vim Colors](https://vimcolors.org) - Another color scheme generator
