-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
120 lines (102 loc) · 3.41 KB
/
vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
set shell=/bin/sh
set nocompatible " be iMproved, required
filetype off " required
" Yank to clipboard by default.
set clipboard=unnamed
set paste " Pasting into vim acts normal
""""""" PLUGINS """""""""
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
set runtimepath^=~/.vim/bundle/ctrlp.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 'VundleVim/Vundle.vim'
" Solarized colors
Plugin 'altercation/vim-colors-solarized'
" Vim surround
Plugin 'tpope/vim-surround'
" Vim fugitive for git
Plugin 'tpope/vim-fugitive'
" NERD Tree
Plugin 'scrooloose/nerdtree'
" NERD Commenter
Plugin 'scrooloose/nerdcommenter'
" JSON Syntax Highlighting
Plugin 'elzr/vim-json'
" Tabular alignment
Plugin 'godlygeek/tabular'
" Autocomplete
" Plugin 'Valloric/YouCompleteMe'
" Tmux Navigation
Plugin 'christoomey/vim-tmux-navigator'
" Tmux.conf highlighting
Plugin 'tmux-plugins/vim-tmux'
" Javascript highlighting & indention
Plugin 'pangloss/vim-javascript'
" Node navigation
Plugin 'moll/vim-node'
" Tagbar navigation for ctags
Plugin 'majutsushi/tagbar'
" Airline for pretty vim
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
" 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
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
""""""" OTHER TWEAKS """""""""
" Tell ctrlp fuzzy find plugin to ignore files in gitignore
let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard']
" Force Gdiff to use vertical splits
set diffopt+=vertical
" Use mouse in terminal
if has('mouse')
set mouse=a
set ttymouse=sgr
endif
" faster redrawing
set ttyfast
""""""" VISUAL ENHANCEMENTS """""""""
set number " Show relative line numbers
set relativenumber " Show line numbers
syntax enable " Use syntax highlighting
set background=dark
" let g:solarized_termcolors = 256 " Use to make even darker
colorscheme solarized
" size of a hard tabstop
set tabstop=2
" size of an "indent"
set shiftwidth=2
" a combination of spaces and tabs are used to simulate tab stops at a width
" other than the (hard)tabstop
set softtabstop=2
" make "tab" insert indents instead of tabs at the beginning of a line
set smarttab
" " always uses spaces instead of tab characters
set expandtab
" Airline
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#left_sep = ' '
let g:airline#extensions#tabline#left_alt_sep = '|'
" Show just the filename
let g:airline#extensions#tabline#fnamemod = ':t'
""""""" REMAPPINGS """""""""
" Toggle nerd tree side bar
map <C-n> :NERDTreeToggle<CR>
" Mappings to traverse vim's lists of buffers, from Tim Pope
nnoremap <silent> [b :bprevious<CR>
nnoremap <silent> ]b :bnext<CR>
nnoremap <silent> [B :bfirst<CR>
nnoremap <silent> ]B :blast<CR>