Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gko/vimio
🎩 easy to install/use vim settings
https://github.com/gko/vimio
distribution dotfiles neovim nvim vim vim-javascript vim-ruby vim-settings viml vimrc
Last synced: 4 days ago
JSON representation
🎩 easy to install/use vim settings
- Host: GitHub
- URL: https://github.com/gko/vimio
- Owner: gko
- License: mit
- Created: 2012-10-07T13:37:36.000Z (about 12 years ago)
- Default Branch: main
- Last Pushed: 2024-09-15T20:02:44.000Z (about 2 months ago)
- Last Synced: 2024-09-16T20:45:56.290Z (about 2 months ago)
- Topics: distribution, dotfiles, neovim, nvim, vim, vim-javascript, vim-ruby, vim-settings, viml, vimrc
- Language: Vim Script
- Homepage: https://dev.to/konstantin/configuring-a-perfect-editor-for-frontend-development-1pe5
- Size: 3.98 MB
- Stars: 47
- Watchers: 7
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Vim Settings
![screenshot](/screenshot.png)
An [article](https://dev.to/konstantin/configuring-a-perfect-editor-for-frontend-development-1pe5) describing key features of this config.
## Prerequisites
In order to get all features you might want to install following packages:
- [fzf](https://github.com/junegunn/fzf#installation)
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation)
- [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)## Installation
On unix and windows(with bash which can be installed with [git](http://msysgit.github.io/)):
```shell
curl -L https://raw.github.com/gko/vimio/main/install.sh | bash
```### macOS
In macOS terminal.app don't forget to check the «Use option as meta key»:
![terminal](/terminal.png)
And «Esc+» option in iterm2:
![iterm2](/iterm2.png)
## Shortcuts
Some of shortcuts(Leader key is comma):
- Ctrl + s saves current file
- Leader + s in both `select` and `normal` mode initiates search and replace
- Alt + Up/Down moves line or selection above
or below current line(see [upside-down](https://github.com/gko/upside-down) for more info)
- Alt + Left/Right moves character or
selection to left or to the right
- Leader + n toggles NERDTree
- Leader + m shows current file in NERDTree
- when in select mode ', ", ( wraps selection accordingly
- y + m yanks found matches(see
[yankmatches.vim](https://github.com/gko/vimio/blob/main/after/plugin/yankmatches.vim)
for more info)### Plugin shortcuts
- [vim-bookmarks](https://github.com/MattesGroeger/vim-bookmarks#usage)
- [vim-emmet](https://github.com/mattn/emmet-vim#quick-tutorial)
- [vim-checkbox](https://github.com/jkramer/vim-checkbox#usage)
- [vim-gh-line](https://github.com/ruanyl/vim-gh-line#how-to-use)
- [vim-jsdoc](https://github.com/heavenshell/vim-jsdoc#usage)
- [md-img-paste.vim](https://github.com/ferrine/md-img-paste.vim#usage)
- [vim-doge](https://github.com/kkoomen/vim-doge#gdoge_mapping)#### vim-surround
For general instructions see
[README](https://github.com/tpope/vim-surround#surroundvim)See [this issue](https://github.com/tpope/vim-surround/issues/220) for visual mode
#### Coc.nvim
For vim I use Coc.nvim, in their repository you can find their [example vim configuration](https://github.com/neoclide/coc.nvim#example-vim-configuration) for shortcuts.
#### nvim-lspconfig
For nvim I use native nvim lsp config. You can find the example config here: [example lsp config](https://github.com/neovim/nvim-lspconfig#suggested-configuration)
##### Language servers installation
###### Typescript/Javascript
https://github.com/typescript-language-server/typescript-language-server#installing
###### Go
https://github.com/golang/tools/tree/master/gopls#installation
###### Rust
https://rust-analyzer.github.io/manual.html#installation
you may need to install:
- rustup https://github.com/rust-lang/rustup#installation
- rust-src `rustup component add rust-src`###### Zig
https://github.com/zigtools/zls/wiki/Installation#install-zls
###### Scala
https://scalameta.org/metals/docs/editors/vim/#using-an-alternative-lsp-client
###### PHP
https://github.com/bmewburn/intelephense-docs/blob/master/installation.md
## List of all plugins and commands
You can find the list of plugins as well as commands that they provide in the [init.vim](https://github.com/gko/vimio/blob/main/init.vim) file.
## Your config
If you create `~/.vimrc.local` it will be loaded before the end of `vim-plug`.
So you can add a custom config + vim plugins of your choice there.Example [.vimrc.local](/.vimrc.local).
### Color scheme
You can have a `~/.vimrc_background` file, where you keep custom colorscheme
settings.Example can be found [here](/.vimrc_background). And you can symlink it as
following:
```shell
ln -sf ~/.vim/.vimrc_background ~/
```
### Taking notes and TODOs- Leader + w + w opens `~/Documents/Notes/index.md`
- :Todo opens `~/Documents/Notes/todo.md` in a vertical split and fills in current datesee more info in this article: https://dev.to/konstantin/taking-notes-in-vim-revisited-558k
you can find the code here:
https://github.com/gko/vimio/blob/de73a9272c29acc6f2ce6d5be7f24cbe113a85b4/after/plugin/shortcuts.vim#L225-L229and here
https://github.com/gko/vimio/blob/de73a9272c29acc6f2ce6d5be7f24cbe113a85b4/after/plugin/filetypes.vim#L28-L32
#### Checkboxes
For checkboxes [vim-checkbox](https://github.com/jkramer/vim-checkbox#usage) plugin is installed
#### Pasting images
With help of [md-img-paste.vim](https://github.com/ferrine/md-img-paste.vim#usage) you can paste images by using Leader + p (it would store in the same folder as the markdown document in `img` folder)
## Benchmark
Not that it matters, but I get the following startup time:
```
$ hyperfine "nvim --headless +qa" --warmup 5
Benchmark 1: nvim --headless +qa
Time (mean ± σ): 200.1 ms ± 6.9 ms [User: 123.9 ms, System: 63.2 ms]
Range (min … max): 191.9 ms … 210.9 ms 14 runs
```## License
[MIT](http://opensource.org/licenses/MIT)
Copyright (c) 2012-2024 Konstantin Gorodinskiy