Created
July 1, 2015 02:58
-
-
Save bebound/93fdf711d19f0f88fcc5 to your computer and use it in GitHub Desktop.
This file contains 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
" Base Configuration | |
set t_Co=256 | |
let mapleader = "," | |
set timeoutlen=400 "mapping timeout | |
set ttimeoutlen=50 "keycode timeout | |
set mouse=a "enable mouse | |
set mousehide "hide when characters are typed | |
set history=1000 "number of command lines to remember | |
set ttyfast "assume fast terminal connection | |
set viewoptions=folds,options,cursor,unix,slash "unix/windows compatibility | |
set encoding=utf-8 "set encoding for text | |
if exists('$TMUX') | |
set clipboard= | |
else | |
set clipboard=unnamed "sync with OS clipboard | |
endif | |
set hidden "allow buffer switching without saving | |
set autoread "auto reload if file saved externally | |
set fileformats+=mac "add mac to auto-detection of file format line endings | |
set nrformats-=octal "always assume decimal numbers | |
set showcmd | |
set tags=tags;/ | |
set showfulltag | |
set modeline | |
set modelines=5 | |
set noshelltemp "use pipes | |
" whitespace | |
set backspace=indent,eol,start "allow backspacing everything in insert mode | |
set autoindent "automatically indent to match adjacent lines | |
set expandtab "spaces instead of tabs | |
set smarttab "use shiftwidth to enter tabs | |
set tabstop=4 "number of spaces per tab for display | |
set softtabstop=4 "number of spaces per tab in insert mode | |
set shiftwidth=4 "number of spaces when indenting | |
set list "highlight whitespace | |
set listchars=tab:│\ ,trail:•,extends:❯,precedes:❮ | |
set shiftround | |
set linebreak | |
set scrolloff=1 "always show content after scroll | |
set scrolljump=5 "minimum number of lines to scroll | |
set display+=lastline | |
set wildmenu "show list for autocomplete | |
set wildmode=list:full | |
set splitbelow | |
set splitright | |
" Disable Sounds | |
set noerrorbells | |
set novisualbell | |
" Searching | |
set hlsearch "highlight searches | |
set incsearch "incremental searching | |
set ignorecase "ignore case for searching | |
set smartcase "do case-sensitive if there's a capital letter | |
" UI Configuration | |
set showmatch "automatically highlight matching braces/brackets/etc. | |
set matchtime=2 "tens of a second to show matching parentheses | |
set number | |
set lazyredraw | |
set laststatus=2 | |
set noshowmode | |
set foldenable "enable folds by default | |
set foldmethod=syntax "fold via syntax of files | |
set foldlevelstart=99 "open all folds by default | |
set cursorline | |
" NeoBundle | |
" Note: Skip initialization for vim-tiny or vim-small. | |
if 0 | endif | |
if has('vim_starting') | |
if &compatible | |
set nocompatible "Be iMproved | |
endif | |
" Required: | |
set runtimepath+=~/.vim/bundle/neobundle.vim/ | |
endif | |
" Required: | |
call neobundle#begin(expand('~/.vim/bundle/')) | |
" Let NeoBundle manage NeoBundle | |
" Required: | |
NeoBundleFetch 'Shougo/neobundle.vim' | |
" My Bundles here: | |
NeoBundle 'tpope/vim-dispatch' | |
NeoBundle 'terryma/vim-expand-region' | |
" Edit | |
NeoBundle 'jiangmiao/auto-pairs' | |
NeoBundle 'tpope/vim-surround' | |
NeoBundle 'tpope/vim-repeat' | |
NeoBundle 'tpope/vim-eunuch' | |
NeoBundle 'tomtom/tcomment_vim' | |
NeoBundle 'tpope/vim-unimpaired' | |
nmap <c-up> [e | |
nmap <c-down> ]e | |
vmap <c-up> [egv | |
vmap <c-down> ]egv | |
" Search | |
NeoBundle 'thinca/vim-visualstar' | |
NeoBundle 'justinmk/vim-sneak' | |
let g:sneak#streak = 1 | |
" Replace 'f' with 1-char Sneak | |
nmap f <Plug>Sneak_f | |
nmap F <Plug>Sneak_F | |
xmap f <Plug>Sneak_f | |
xmap F <Plug>Sneak_F | |
omap f <Plug>Sneak_f | |
omap F <Plug>Sneak_F | |
" Replace 't' with 1-char Sneak | |
nmap t <Plug>Sneak_t | |
nmap T <Plug>Sneak_T | |
xmap t <Plug>Sneak_t | |
xmap T <Plug>Sneak_T | |
omap t <Plug>Sneak_t | |
omap T <Plug>Sneak_T | |
" UI | |
NeoBundle 'tomasr/molokai' | |
NeoBundle 'mhinz/vim-startify' | |
NeoBundle 'nathanaelkane/vim-indent-guides' | |
let g:indent_guides_start_level=1 | |
let g:indent_guides_guide_size=1 | |
let g:indent_guides_enable_on_vim_startup=0 | |
let g:indent_guides_color_change_percent=3 | |
if !has('gui_running') | |
hi IndentGuidesOdd ctermbg=233 | |
hi IndentGuidesEven ctermbg=234 | |
endif | |
NeoBundle 'bling/vim-airline' | |
let g:airline#extensions#tabline#enabled = 1 | |
let g:airline_powerline_fonts = 1 | |
let g:airline#extensions#tabline#buffer_idx_mode = 1 | |
nmap <leader>1 <Plug>AirlineSelectTab1 | |
nmap <leader>2 <Plug>AirlineSelectTab2 | |
nmap <leader>3 <Plug>AirlineSelectTab3 | |
nmap <leader>4 <Plug>AirlineSelectTab4 | |
nmap <leader>5 <Plug>AirlineSelectTab5 | |
nmap <leader>6 <Plug>AirlineSelectTab6 | |
nmap <leader>7 <Plug>AirlineSelectTab7 | |
nmap <leader>8 <Plug>AirlineSelectTab8 | |
nmap <leader>9 <Plug>AirlineSelectTab9 | |
NeoBundleLazy 'scrooloose/nerdtree', {'autoload':{'commands':['NERDTreeToggle','NERDTreeFind']}} | |
let NERDTreeShowHidden=1 | |
let NERDTreeQuitOnOpen=0 | |
let NERDTreeShowLineNumbers=1 | |
let NERDTreeChDirMode=0 | |
let NERDTreeShowBookmarks=1 | |
let NERDTreeIgnore=['\.git','\.hg'] | |
nnoremap <F2> :NERDTreeToggle<CR> | |
nnoremap <F3> :NERDTreeFind<CR> | |
call neobundle#end() | |
" Required: | |
filetype plugin indent on | |
" If there are uninstalled bundles found on startup, | |
" this will conveniently prompt you to install them. | |
NeoBundleCheck | |
colorscheme molokai | |
" Mappings | |
inoremap <C-h> <left> | |
inoremap <C-l> <right> | |
cnoreabbrev W w !sudo tee % | |
cnoreabbrev Q q! | |
nnoremap <leader>w :w<cr> | |
" remap arrow keys | |
nnoremap <left> :bprev<CR> | |
nnoremap <right> :bnext<CR> | |
nnoremap <up> :tabnext<CR> | |
nnoremap <down> :tabprev<CR> | |
" shortcuts for windows | |
nnoremap <leader>v <C-w>v<C-w>l | |
nnoremap <leader>s <C-w>s | |
nnoremap <leader>vsa :vert sba<cr> | |
nnoremap <C-h> <C-w>h | |
nnoremap <C-j> <C-w>j | |
nnoremap <C-k> <C-w>k | |
nnoremap <C-l> <C-w>l | |
" reselect visual block after indent | |
vnoremap < <gv | |
vnoremap > >gv | |
" tab shortcuts | |
map <leader>tn :tabnew<CR> | |
map <leader>tc :tabclose<CR> | |
" make Y consistent with C and D. See :help Y. | |
nnoremap Y y$ | |
" MacVim | |
let macvim_skip_colorscheme=1 | |
set guifont=Source\ Code\ Pro\ for\ Powerline:h12 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment