Last active
December 11, 2015 16:19
-
-
Save wesrog/4627061 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible | |
call pathogen#infect('~/src/vim/bundle/{}') | |
call pathogen#helptags() | |
syntax on | |
filetype on | |
filetype plugin on | |
filetype indent on | |
set exrc " enable per-directory .vimrc files | |
set secure " disable unsafe commands in local .vimrc files | |
set expandtab | |
set shiftwidth=4 | |
set tabstop=4 | |
set smarttab | |
set ai "Auto indent | |
set nosmartindent | |
set nowrap | |
set ruler | |
" highlight tabs and trailing spaces | |
set listchars=tab:>-,trail:- | |
set list | |
set encoding=utf-8 fileencoding=utf-8 | |
set nobackup nowritebackup noswapfile autoread | |
set number hlsearch incsearch ignorecase smartcase | |
set ignorecase incsearch smartcase showmatch showcmd hidden | |
"set statusline=%t[%{strlen(&fenc)?&fenc:'none'},%{&ff}]%h%m%r%y%=%c,%l/%L\ %P%{fugitive#statusline()} | |
set mouse=a | |
"let g:pymode_folding=0 | |
set wildmenu | |
set wildmode=longest:full,full | |
set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,.pyc | |
" FILE TYPES | |
" ================================================== | |
" jinja/html | |
au BufNewFile,BufRead *.html setlocal ft=htmljinja | |
au BufNewFile,BufRead *.mail setlocal ft=htmljinja | |
au FileType html setlocal foldmethod=manual | |
" For xml, xhtml and html let's use 2 spaces of indentation | |
"autocmd FileType html,xhtml,xml setlocal expandtab shiftwidth=2 tabstop=2 softtabstop=2 | |
" MAPPINGS | |
" ================================================== | |
let mapleader="," | |
nnoremap <leader>w :set wrap<CR> | |
nnoremap <leader>nw :set nowrap<CR> | |
nnoremap <leader>d :NERDTreeToggle<cr> | |
nnoremap <leader>f :NERDTreeFind<CR> | |
nnoremap <leader>l :nohlsearch<CR> | |
nnoremap <leader>o :CtrlPMRUFiles<CR> | |
nnoremap <leader>, :CtrlP<CR> | |
nmap <space><space> :w<cr> | |
"map <leader>ba :1,300 bd!<cr> # clears all buffers | |
" Smart way to move between windows | |
map <C-j> <C-W>j | |
map <C-k> <C-W>k | |
map <C-h> <C-W>h | |
map <C-l> <C-W>l | |
" move one line at a time regardless | |
" of wrapping | |
nnoremap j gj | |
nnoremap k gk | |
" move between top-level functions/classes | |
nmap } ]] | |
nmap { [[ | |
" who wants to look up man pages from vim? | |
nmap K k | |
" It is so much fun to nuke these ones | |
" that I am adding them back. No arrow keys! | |
nnoremap <down> <nop> | |
nnoremap <left> <nop> | |
nnoremap <right> <nop> | |
nnoremap <up> <nop> | |
inoremap <up> <nop> | |
inoremap <down> <nop> | |
inoremap <left> <nop> | |
inoremap <right> <nop> | |
"set clipboard=unnamed " copies y, yy, d, D, dd and other to the | |
" system clipboard | |
" Let Ack highlight when I search | |
let g:ackhighlight=1 | |
let g:ackprg='ag --nogroup --nocolor --column' | |
" NERDTREE | |
" ================================================== | |
let NERDTreeIgnore=['\.pyc$'] | |
let NERDTreeMinimalUI=1 | |
let NERDTreeDirArrows=1 | |
let NERDTreeShowHidden=1 | |
" CTRLP | |
" ================================================== | |
let g:ctrlp_custom_ignore = 'node_modules\|.bower\|static/dst\|static/dev\|.pyc' | |
let g:ctrlp_working_path_mode=0 | |
let g:ctrlp_mruf_last_entered=1 | |
let g:ctrlp_dont_split='NERD_tree_2' | |
" Relative number awesomeness | |
:au FocusLost * :set number | |
:au FocusGained * :set relativenumber | |
autocmd InsertEnter * :set number | |
autocmd InsertLeave * :set relativenumber | |
" COLORS | |
" ================================================== | |
let g:solarized_contrast='high' | |
"let g:solarized_termcolors=16 | |
let g:solarized_termcolors=256 | |
let g:solarized_termtrans = 1 | |
set background=light | |
colorscheme solarized |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment