Skip to content

Instantly share code, notes, and snippets.

@bcatubig
Created February 4, 2016 03:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bcatubig/a9549c53777892b962ea to your computer and use it in GitHub Desktop.
Save bcatubig/a9549c53777892b962ea to your computer and use it in GitHub Desktop.
A fucking awesome vimrc
execute pathogen#infect()
syntax on
filetype plugin indent on
colorscheme spacegray
set t_Co=256
set tabstop=4 " number of visual spaces per TAB
set softtabstop=4 " number of spaces in tab when editing
set shiftwidth=4
set shiftround
set expandtab " tabs are spaces
set number " show line numbers
set showcmd
set cursorline " highlight current line
set wildmenu " visual autocomplete for command menu
set lazyredraw " redraw only when we need to.
set showmatch " highlight matching [{()}]
set incsearch " search as characters are entered
set hlsearch " highlight matches
" turn off search highlight
nnoremap <leader><space> :nohlsearch<CR>
set foldenable " enable folding
set foldlevelstart=10 " open most folds by default
set foldnestmax=10 " 10 nested fold max
" space open/closes folds
nnoremap <space> za
set foldmethod=indent " fold based on indent level
" move vertically by visual line
nnoremap j gj
nnoremap k gk
" move to beginning/end of line
nnoremap B ^
nnoremap E $
"
" " $/^ doesn't do anything
nnoremap $ <nop>
nnoremap ^ <nop>
" highlight last inserted text
nnoremap gV `[v`]
let mapleader="," " leader is comma
" jk is escape
inoremap jk <esc>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment