Skip to content

Instantly share code, notes, and snippets.

@milesrout
Last active August 29, 2015 14:14
Show Gist options
  • Save milesrout/40a0b5cce776a8a54136 to your computer and use it in GitHub Desktop.
Save milesrout/40a0b5cce776a8a54136 to your computer and use it in GitHub Desktop.
set nocompatible
set number
set tildeop
" Windows GUI options
set guioptions-=m
set guioptions-=T
set guioptions-=r
set guioptions-=L
set guifont=Source_Code_Pro_Bold:h11b
let maplocalleader="|"
let mapleader="\\"
colorscheme badwolf
syntax on
" Mappings
nnoremap ; :
nnoremap : ;
vnoremap ; :
vnoremap : ;
inoremap <leader>U <esc>maviwU`ali
nnoremap <leader>U maviwU`a
inoremap <leader>u <esc>maviwgu`ali
nnoremap <leader>u maviwgu`a
map <left> <nop>
map <right> <nop>
map <up> <nop>
map <down> <nop>
nnoremap <leader>w :w<cr>
vmap <leader>y "+y
vmap <leader>d "+d
nmap <leader>p "+p
vmap <leader>p "+p
nmap <leader>P "+P
vmap <leader>P "+P
nnoremap <leader>ev :vsplit $MYVIMRC<cr>
set tabstop=4
set shiftwidth=4
set expandtab
" non-typo abbreviations
iabbrev myemail [email protected]
iabbrev mysig Miles Rout <[email protected]>
iabbrev wkemail [email protected]
iabbrev wksig Miles Rout <[email protected]>
" typo abbreviations
" e.g. iabbrev teh the
cd ~/
noremap <f11> :call libcallnr("gvimfullscreen.dll", "ToggleFullScreen", 0)<cr>
" General autocmds
augroup reload_vimrc
autocmd!
autocmd BufWritePost $MYVIMRC source $MYVIMRC
augroup END
" Language-specific autocmds
augroup javascript
autocmd!
augroup END
set conceallevel=2
" Fix stupid things about vim
set wildmode=list:longest,longest
set autochdir
set splitbelow
set splitright
set backspace=indent,eol,start
" Align break with case code, not case label.
set cino=b0
" Align public:, protected:, etc. with enclosing braces.
set cino=g0
" Don't indent inside namespace in C++
set cino=N-s
" Indent C++ base class declarations and initializer lists,
" if they start in a new line, this many characters.
set cino=i4
" A list of keys that, when typed in Insert mode, cause reindenting
" of the current line.
set cinkeys=0{,0},0),:,0#,!^F,o,O,e,0=break
set autoindent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment