Skip to content

eparreno/vimfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vimfiles

My personal Vim configuration

Installation

git clone https://github.com/eparreno/vimfiles.git ~/.vim

That's it. Really. You don't even need to link .vimrc

The setup will automatically install vim-plug on first run. If curl is not available, bootstrap is skipped and a warning is shown.

Neovim

This repo is shared between Vim and Neovim.

Create a symlink so Neovim loads this config:

mkdir -p ~/.config/nvim
ln -sfn ~/.vim/init.vim ~/.config/nvim/init.vim

~/.vim/init.vim sets runtime paths and sources ~/.vim/vimrc.

Base Customizations

  • Leader key: <space>
  • Line numbers: enabled
  • Indentation: 2-space soft tabs (expandtab)
  • Search: case-insensitive (unless uppercase letters present), with gdefault flag
  • Splitting: vertical splits go right, horizontal splits go below
  • Clipboard: uses unnamedplus when available, otherwise unnamed
  • Color scheme: Kanagawa (Neovim), Rusty (Vim)
  • Encoding: UTF-8
  • Auto-deletion: trailing whitespaces removed on save (except Markdown and diff)
  • Undo history: persistent undo enabled with a dedicated undo directory
  • No backup/swap files

You can customize whitespace-trim exclusions in ~/.vimrc.local:

let g:trim_ws_exclude = ['markdown', 'diff', 'gitcommit']

Disable trimming for a specific buffer with:

let b:trim_ws_disable = 1

Mappings

Leader Key

  • <space> - Leader key

Normal Mode

  • ; - Enter command mode (mapped to :)
  • H - Go to beginning of line
  • L - Go to end of line
  • Y - Yank until end of line (like D and C)
  • Q - Format text (gq)
  • ! - Execute shell command
  • <C-h/j/k/l> - Switch between splits (no need to prepend <C-w>)
  • <leader><space> - Clear search highlight
  • <leader>e - Edit command with current file path
  • <leader>c - Comment/uncomment line or selection
  • <leader>w - Save file
  • <leader>q - Quit
  • <leader>v - New vertical split
  • <leader>s - New horizontal split
  • <leader>0 - Toggle NERDTree
  • <leader>t - Recursively toggle fold (zA)
  • <Tab> - Previous buffer (BufSurf)
  • <S-Tab> - Next buffer (BufSurf)
  • <C-c> - Close current buffer
  • <C-p> - Open FZF file finder (:Files)
  • Arrow keys in normal mode are disabled (for training)
  • <C-Up/Down/Left/Right> - Resize splits

If BufSurf is unavailable, <Tab> and <S-Tab> fall back to built-in buffer navigation. If NERDTree is unavailable, <leader>0 falls back to :Lexplore. If FZF is unavailable, <C-p> is left unbound.

Insert Mode

  • jj or kk - Exit to normal mode

Visual Mode

  • < and > - Keep visual selection after indenting
  • H - Go to beginning of line
  • L - Go to end of line

Plugins

The configuration uses vim-plug for plugin management. Colorscheme selection includes fallback order so startup does not fail when a theme is missing.

Installed Plugins

Linting note: ALE is configured as the primary async linter/fixer. Lightline is configured independently of external linter plugins.

Language-Specific

File Structure

~/.vim/
├── init.vim         # Neovim entrypoint (sources vimrc)
├── vimrc           # Main configuration file
├── config.vim      # General settings and options
├── plugins.vim     # Plugin definitions and configurations
├── mappings.vim    # Key mappings
├── autoload/       # vim-plug bootstrap
└── colors/         # Color schemes (nord, monochrome, flattened, etc.)

Customization

Create ~/.vimrc.local for any personal customizations that you don't want to commit to the repository.

About

vim configuration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors