Skip to content

Instantly share code, notes, and snippets.

@aaronmu
Last active October 14, 2015 01:47
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 aaronmu/4288381 to your computer and use it in GitHub Desktop.
Save aaronmu/4288381 to your computer and use it in GitHub Desktop.
_vimrc
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" Bundles
" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'
" Markdown Vim Mode
Bundle 'tpope/vim-markdown'
" Working with variants of a word.
" I primarily use this to do multiple substitutions with one command.
Bundle 'tpope/vim-abolish'
" Surround.vim is all about surroundings: parentheses, brackets, quotes, XML tags, and more.
" The plugin provides mappings to easily delete, change and add such surroundings in pairs.
Bundle 'tpope/vim-surround'
Bundle 'mileszs/ack.vim'
" Autoclose (,{,[,...
Bundle 'Townk/vim-autoclose'
" Solarized colorscheme.
Bundle 'altercation/vim-colors-solarized'
Bundle 'tomasr/molokai'
" PHP Integration environment for VIM
Bundle 'spf13/PIV'
Bundle 'SirVer/ultisnips'
Bundle 'bling/vim-airline'
Bundle 'kien/ctrlp.vim'
" Enable filetype detection, the use of filetype plugin files and using indent
" files
filetype plugin indent on " required!
filetype on
set wildignore+=*\\tmp\\*,*.swp,*.zip,*\\cache\\*,*~
set noswapfile
set backupdir=C:\Temp
" Modelines are lines that can be added to a text file that tell vim how it
" should behave when started.
set modelines=0
set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab
set encoding=utf-8
set scrolloff=3
set autoindent
set showmode
set showcmd
set wildmenu
set wildmode=list:longest
set cursorline
set ttyfast
set ruler
set backspace=indent,eol,start
set relativenumber
set number
set undofile
set undodir=C:\Temp
set rnu
" searching & moving
let mapleader = ","
set ignorecase
set smartcase
set incsearch
set hlsearch
nnoremap <leader><space> :noh<cr>
set colorcolumn=85
nnoremap j gj
nnoremap k gk
" remap escape to jj, who wants to hit escape everytime
inoremap jj <ESC>
" Move around windows using <ctrl> hjkl
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
" Use solarized colorscheme.
syntax on
colorscheme molokai
let g:molokai_original = 1
" Font
set guifont=consolas:h9
:nnoremap <leader>ev :vsplit $MYVIMRC<cr>
:nnoremap <leader>sv :source $MYVIMRC<cr>
" UltiSnips
let g:UltiSnipsEditSplit = "vertical"
if (has('gui_running'))
set guioptions=
endif
" Remove trailing whitespace on write.
autocmd BufWritePre * :%s/\s\+$//e
" Use javascript highlighting for in json files.
autocmd BufNewFile,BufRead *.json set ft=javascript
let g:airline_enable_branch=1
let g:ctrlp_working_path_mode = 'r'
let g:ctrlp_max_files = 0
au BufRead,BufNewFile *.twig set filetype=htmljinja
let g:ackprg = 'ack'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment