Skip to content

Instantly share code, notes, and snippets.

@bndw
Created August 14, 2015 20:02
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 bndw/13c6fd896755e97a1fdb to your computer and use it in GitHub Desktop.
Save bndw/13c6fd896755e97a1fdb to your computer and use it in GitHub Desktop.
" run :help <command> for more information
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
Plugin 'kevinw/pyflakes-vim'
Plugin 'Lokaltog/vim-powerline'
Plugin 'kien/ctrlp.vim'
Plugin 'pangloss/vim-javascript'
Plugin 'mustache/vim-mustache-handlebars'
Plugin 'nathanaelkane/vim-indent-guides'
Plugin 'Raimondi/delimitMate'
Plugin 'ryanss/vim-hackernews'
set t_Co=256
set background=light
colorscheme solarized
filetype on " enable filetype detection
filetype plugin on " load plugin files
filetype indent on " load indent file
let mapleader="," " change mapleader
syntax on " highlight syntax
set backspace=indent,eol,start " intuitive backspacing in insert mode
set encoding=utf-8 nobomb " use utf-8 without bom
set esckeys " allow cursor keys in insert mode
set ignorecase " ignore case when searching
set incsearch " dymanic pattern highlighting
set nocompatible " make vim more useful
set ttyfast " optimize for fast terminal connections
set gdefault " use g flag to search/replace
set noeol " no newline at eof
set backupdir=~/.vim/backups " centralized backups
set directory=~/.vim/swaps " centralized swaps
set undodir=~/.vim/undo " centralized undo history
set number " enable line numbers
set tabstop=2 " make tabs as wide as two spaces
set expandtab " use spaces instead of tabs
set shiftwidth=2 " set > tab to 2 spaces
set hlsearch " highlight searches
set laststatus=2 " always show status line
set noerrorbells " disable error bells
set nostartofline " don't reset cursor to line start when moving
set scrolloff=5 " scroll 5 lines before horizontal window border
set shortmess=atI " mute intro message
set showcmd " show partial command as it's typed
set showmatch " show matching brackets
set showmode " show current mode
set relativenumber " use line numbers relative to cursor
set wildmenu " enhance cli completion
" custom functions
"
" save a file as root (,W)
noremap <leader>W :w !sudo tee % > /dev/null<CR>
" All of your Plugins must be added before the following line
call vundle#end() " required
" " To ignore plugin indent changes, instead use:
" "filetype plugin on
" "
" " Brief help
" " :PluginList - lists configured plugins
" " :PluginInstall - installs plugins; append `!` to update or just
" :PluginUpdate
" " :PluginSearch foo - searches for foo; append `!` to refresh local cache
" " :PluginClean - confirms removal of unused plugins; append `!` to
" auto-approve removal
" "
" " see :h vundle for more details or wiki for FAQ
" " Put your non-Plugin stuff after this line
" Fix for hbs syntax highlighting
au BufReadPost *.hbs set syntax=mustache
" Map Ctrl+C to the line splitting command while in insert mode
imap <C-n> <CR><Esc>O
" hjkl to navigate buffers
nmap <C-j> <C-W>j
nmap <C-k> <C-W>k
nmap <C-h> <C-W>h
nmap <C-l> <C-W>l
nore ; :
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment