No description
Find a file
2025-06-13 22:34:09 +02:00
pack update 2025-06-13 22:34:09 +02:00
.gitignore added vim-gitgutter and vim-gutentags 2022-09-20 20:34:28 +02:00
.gitmodules add Rainbow Parentheses Improved 2022-09-20 20:38:55 +02:00
.vimrc add key bindings to toggle buffers 2025-06-13 22:28:11 +02:00
.vimrc.local map YouCompleteMe GoToDefinition 2023-04-24 22:43:02 +02:00
README.md Fix typo 2024-03-14 22:19:50 +01:00

Vim configuration

My simple vim configuration based on vim's native package support and git (Vim 8+ required).

Install

git clone --recursive https://github.com/Finn10111/vim.git ~/.vim
ln -s ~/.vim/.vimrc ~/

Optionally you can use YouCompleteMe or set other custom configurations:

cp ~/.vim/.vimrc.local .
cd ~/.vim/pack/syntax/opt/YouCompleteMe/
python3 install.py --all

Optional dependencies for ALE linters/fixers

ALE supports a huge list of languages with associated fixers and linters: https://github.com/dense-analysis/ale/blob/master/supported-tools.md Execute the following commands to help you to find available fixers or linters:

:ALEFixSuggest
:ALEInfo

Linters are enabled by default and available if their program is installed.

For ALE's python support you need to install for example flake8, eslint for Javascript or for html/htmldjango files use js-beautify:

# Debian/Ubuntu
apt-get install flake8 eslint node-js-beautify python3-autopep8 yamllint php-codesniffer yamllint

# Arch Linux
yay -S flake8 eslint js-beautify autopep8 yamllint php-codesniffer yamllint yamllint

# others (e.g. yamlfix is not available via apt)
pip install yamlfix

ALE's fixers need to be enabled, some are already enabled in .vimrc but you can modify it to suit your needs and put it in the .vimrc.local file.

Update

git pull --recurse-submodules origin master

Included plugins

Please have a look at each plugin for detailed information.

Some shortcuts and commands to remember

General

Save and quit :-)

:wq

Search

/foobar

Jump to next seach result

n

Search and replace

 :%s/search/replace/g

ctrlp.vim

Open CtrlP (just type for easy searching)

<c-p>

Toggle modes (buffer, MRU, files - while CtrlP is open)

<c-f>

NERDTree

Toggle NERDTree

<c-t>

NERD Commenter

Toggle comment state of line or selected lines (I've mapped leader to , with let mapleader=",")

<leader>c<space>

fugitive.vim

Commit

:Git commit

vim-gitmoji

While in insert mode (wrting commit message):

<c-x><c-u>

ALE

Fix file

:ALEFix

Go to previous or next error

<C-k> (previous)
<C-j> (next)

YouCompleteMe

Force auto completion suggestion

<C-Space>

Close preview windows

<c-w>z

GoToDefinition

<C-g>

Jump back/forward after going to definition using vim's jumplist

<C-O>
<C-I>