A modern, well-documented Vim configuration with popular plugins for enhanced productivity
Features β’ Installation β’ Plugins β’ Keybindings β’ Customization
πͺπΈ VersiΓ³n en EspaΓ±ol β’ π Detailed Plugin Guide
- Overview
- Features
- Screenshots
- Requirements
- Installation
- Plugins
- Keybindings
- Customization
- Troubleshooting
- Contributing
- License
This Vim configuration provides a powerful, modern development environment while maintaining the traditional Vim experience. It includes carefully selected plugins for file navigation, Git integration, syntax highlighting, and intelligent code completion.
- Non-invasive: Respects traditional Vim workflows
- Well-documented: Every setting is explained
- Modular: Easy to enable/disable plugins
- Performance-focused: Lazy loading and optimized settings
- π¨ Beautiful UI - Gruvbox theme with Airline status bar
- π File Navigation - NERDTree sidebar and FZF fuzzy finder
- π Smart Search - Fast file and content search with ripgrep integration
- π― Code Intelligence - LSP-powered autocompletion via CoC.nvim
- π§ Auto-formatting - Format on save with ALE
- π Git Integration - Fugitive and GitGutter for Git workflows
- π Syntax Highlighting - Enhanced support for JS, TS, Python, Go, Rust
- β‘ Fast - Optimized for performance with lazy loading
- πΉ Intuitive Keybindings - Spacebar as leader key
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β NORMAL ~/.vim/vimrc 80% β° 1:1 β β Airline
ββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββ€
ββΎ .vim/ β 1 " Vim Configuration β
β βΎ pluggedβ 2 set number β
β ale β 3 set relativenumber β
β fzf β 4 β
β autoload β 5 " Leader key = Space β
β vimrc β 6 let mapleader = " " β
β README.mdβ 7 β
β β 8 " Fast file search: <Space>ff β
ββββββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββ
NERDTree Main Editor Area
- Vim 9.0+ (or Neovim 0.5+)
- Git - For vim-plug and plugins
- Node.js 14+ - For CoC.nvim
# macOS
brew install fzf ripgrep universal-ctags
# Ubuntu/Debian
sudo apt install fzf ripgrep universal-ctags
# Arch Linux
sudo pacman -S fzf ripgrep universal-ctags# macOS
brew tap homebrew/cask-fonts
brew install --cask font-hack-nerd-font
# Then configure your terminal to use "Hack Nerd Font"# Backup existing config
mv ~/.vim ~/.vim.backup 2>/dev/null
mv ~/.vimrc ~/.vimrc.backup 2>/dev/null
# Clone this repo
git clone https://github.com/yourusername/vim-config.git ~/.vim
# Install vim-plug
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
# Install plugins
vim +PlugInstall +qall
# Install CoC extensions
vim -c 'CocInstall -sync coc-json coc-tsserver coc-python coc-go|q'-
Install vim-plug
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim -
Copy vimrc
cp vimrc ~/.vim/vimrc # Or symlink: ln -s ~/.vim/vimrc ~/.vimrc
-
Open Vim and install plugins
:PlugInstall
-
Install language servers (optional)
:CocInstall coc-json coc-tsserver coc-python coc-go coc-rust-analyzer
| Plugin | Description | Keybinding |
|---|---|---|
| vim-airline | Elegant status bar | Auto |
| gruvbox | Retro color scheme | Auto |
| vim-devicons | File icons | Auto |
| nerdtree | File explorer sidebar | Ctrl+n |
| Plugin | Description | Keybinding |
|---|---|---|
| fzf.vim | Fuzzy file finder | <Space>ff |
| tagbar | Code structure viewer | F8 |
| vim-easymotion | Fast cursor movement | <Space>s |
| Plugin | Description | Keybinding |
|---|---|---|
| vim-fugitive | Git commands in Vim | <Space>gs |
| vim-gitgutter | Show git diff in gutter | Auto |
| Plugin | Description | Keybinding |
|---|---|---|
| vim-surround | Manipulate brackets/quotes | cs"' |
| vim-commentary | Toggle comments | gcc |
| auto-pairs | Auto-close brackets | Auto |
| Plugin | Description | Keybinding |
|---|---|---|
| coc.nvim | LSP-based completion | Tab |
| ale | Async linting/fixing | Auto |
| Plugin | Languages |
|---|---|
| vim-javascript | JavaScript |
| vim-jsx-pretty | React/JSX |
| typescript-vim | TypeScript |
| vim-go | Go |
| rust.vim | Rust |
| python-syntax | Python |
The leader key is set to Space for easy access.
let mapleader = " "| Key | Action |
|---|---|
<Space>w |
Save file |
<Space>q |
Quit |
<Space>x |
Save and quit |
<Space>h |
Clear search highlight |
| Key | Action |
|---|---|
Ctrl+h |
Move to left window |
Ctrl+j |
Move to bottom window |
Ctrl+k |
Move to top window |
Ctrl+l |
Move to right window |
| Key | Action |
|---|---|
<Space>bn |
Next buffer |
<Space>bp |
Previous buffer |
<Space>bd |
Delete buffer |
<Space>bl |
List buffers |
| Key | Action |
|---|---|
Ctrl+n |
Toggle NERDTree |
<Space>nf |
Find current file in NERDTree |
<Space>ff |
Fuzzy find files |
<Space>fg |
Fuzzy find git files |
<Space>fb |
Fuzzy find buffers |
<Space>fl |
Fuzzy find lines |
F8 |
Toggle Tagbar |
| Key | Action |
|---|---|
<Space>gs |
Git status |
<Space>gc |
Git commit |
<Space>gp |
Git push |
<Space>gl |
Git log |
<Space>gd |
Git diff |
<Space>hp |
Preview git hunk |
<Space>hs |
Stage git hunk |
<Space>hu |
Undo git hunk |
| Key | Action |
|---|---|
gcc |
Toggle comment line |
gc (visual) |
Toggle comment selection |
cs"' |
Change surrounding " to ' |
ds" |
Delete surrounding " |
ysiw" |
Add surrounding " around word |
| Key | Action |
|---|---|
Tab |
Next completion |
Shift+Tab |
Previous completion |
Enter |
Confirm completion |
Ctrl+Space |
Trigger completion |
gd |
Go to definition |
gy |
Go to type definition |
gi |
Go to implementation |
gr |
Show references |
K |
Show documentation |
<Space>rn |
Rename symbol |
| Key | Action |
|---|---|
<Space>s + char |
EasyMotion jump to char |
<Space>j |
EasyMotion jump down |
<Space>k |
EasyMotion jump up |
If you prefer traditional Vim (no mouse):
set mouse= " Already disabled by defaultComment out plugins you don't want in vimrc:
" Disable auto-pairs
" Plug 'jiangmiao/auto-pairs'
" Disable CoC (use native completion)
" Plug 'neoclide/coc.nvim', {'branch': 'release'}Then run :PlugClean in Vim.
" Options: gruvbox, solarized, molokai, dracula
colorscheme gruvbox
set background=dark " or 'light'set tabstop=2 " Tab size (default: 4)
set shiftwidth=2 " Indent size (default: 4)
set expandtab " Use spaces (noexpandtab for tabs)" In ALE section (~line 169)
let g:ale_fix_on_save = 0 " Change from 1 to 0let mapleader = "," " Use comma instead of spaceProblem: Squares or missing icons in NERDTree
Solution: Install a Nerd Font and configure your terminal
brew install --cask font-hack-nerd-font
# Set terminal font to "Hack Nerd Font"Problem: [coc.nvim] CoC server process not initialized
Solution: Install Node.js
# macOS
brew install node
# Ubuntu
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejsProblem: :Files command not working
Solution: Install FZF
brew install fzf # macOS
sudo apt install fzf # UbuntuProblem: Vim takes long to start
Solution: Disable language servers you don't need
:CocUninstall coc-go # If you don't use GoProblem: Code formatted incorrectly
Solution: Configure formatter for your language
let g:ale_fixers = {
\ 'javascript': ['prettier'],
\ 'python': ['black'],
\}- OpenVim Tutorial
- Vim Adventures (Game)
:help user-manual- Built-in manual
:help nerdtree- NERDTree help:help fzf-vim- FZF help:help coc-nvim- CoC help
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing) - Open a Pull Request
- Document new plugins in README
- Add comments for non-obvious settings
- Test with clean Vim installation
- Update keybinding table if needed
Some plugins are commented out to maintain traditional Vim behavior:
vim-multiple-cursors- Conflicts with NERDTreeCtrl+n
To enable, uncomment in vimrc and run :PlugInstall.
Auto-indent is configured per language:
- Python: 4 spaces
- JavaScript/TypeScript: 2 spaces
- Go: tabs (no expansion)
- vim-plug - Minimalist plugin manager
- Gruvbox - Beautiful color scheme
- All plugin authors for their amazing work
MIT License - Feel free to use and modify!
If you find this configuration useful, please star the repository!
Made with β€οΈ for the Vim community