Skip to content

Finn10111/vim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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>

About

.vim configuration and packages

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published