Skip to content

Instantly share code, notes, and snippets.

@fabi1cazenave
Created December 10, 2012 20:51
Show Gist options
  • Save fabi1cazenave/4253297 to your computer and use it in GitHub Desktop.
Save fabi1cazenave/4253297 to your computer and use it in GitHub Desktop.
Vim — beginner’s config
" auto-source this configuration file when updated
autocmd! BufWritePost .vimrc source ~/.vimrc
" Modern / standard / Notepad-like behavior:
source $VIMRUNTIME/mswin.vim
set nocompatible " required for a multi-level undo/redo stack
set mouse=a " enable mouse selection
" gVim handles Ctrl-* shortcuts a bit better than Vim
set guifont=Monospace\ 9
set go=
" UI settings
set ruler " show line,column + %
set number " show line numbers
set showcmd " show command line
set showmatch " show matching brackets/parenthesis
" search settings
set hlsearch " highlight search results
set incsearch " incremental search: find as you type
set ignorecase " search is case-insensitive...
set smartcase " ... except if the search pattern contains upper-case chars
" syntax highlighting
syntax on
colorscheme desert
" use 'kj' to escape insert mode
inoremap kj <C-[>
" lazy scrolling
noremap <BS> <PageUp>
noremap <Space> <PageDown>
noremap <Return> zz
" lazy code folding / unfolding
noremap <Tab> za
noremap <S-Tab> zA
set foldmethod=indent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment