Skip to content

Instantly share code, notes, and snippets.

@kdungs
Last active July 31, 2019 08:09
Show Gist options
  • Save kdungs/b84eb4b2fdad11f9d878ed49fbe1448b to your computer and use it in GitHub Desktop.
Save kdungs/b84eb4b2fdad11f9d878ed49fbe1448b to your computer and use it in GitHub Desktop.
<50 line minimal Vim configuration.
" .vimrc
"
" Kevin Dungs <[email protected]>
" 2016-07-16
filetype plugin on
set enc=utf-8
" Defaults
set autoread
set backspace=indent,eol,start
set clipboard=unnamed
set complete-=i
set hidden
set hlsearch
set ignorecase
set incsearch
set lazyredraw
set magic
set mouse=a
set number
set ruler
set showmatch
set smartcase
set spell
" Whitespace
set autoindent
set expandtab
set shiftwidth=2
set smarttab
set tabstop=4
set wrap
" Colours
syntax enable
set background=dark
" Bindings
let mapleader=","
nnoremap <leader>, :let@='' <return>
nnoremap <leader>w :w <return>
nnoremap <leader>r :so ~/.vimrc <return>
" Plugins
"" Clang-format
map <C-f> :pyf ~/.vim/clang-format/clang-format.py<return>
map <leader>f <C-f>
imap <C-f> <escape>:pyf ~/.vim/clang-format/clang-format.py<return>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment