forked from ryanb/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
executable file
·140 lines (112 loc) · 3.12 KB
/
vimrc
File metadata and controls
executable file
·140 lines (112 loc) · 3.12 KB
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
" based on http://github.com/jferris/config_files/blob/master/vimrc
" enhanced based on https://github.com/jdavis/dotfiles/blob/master/.vimrc
" Use Vim settings, rather then Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible
" allow backspacing over everything in insert mode
set backspace=indent,eol,start
set nobackup
set nowritebackup
set history=50 " keep 50 lines of command line history
set ruler " show the cursor position all the time
set showcmd " display incomplete commands
set incsearch " do incremental searching
" Softtabs, 2 spaces
set tabstop=2
set shiftwidth=2
set expandtab
" Use smarter defaults
set smartindent
set smarttab
" Use autoindenting
set autoindent
" Always display the status line
set laststatus=2
" Always show the last line
set display+=lastline
" \ is the leader character
let mapleader = ","
" Make it obvious where 08 characters is
set textwidth=80
set colorcolumn=+1
" Numbers
set number
" case only matters with mixed case expressions
set ignorecase
set smartcase
" Buffer stuff
set hidden
nmap <leader>T :enew<cr>
nmap <leader>l :bnext<cr>
nmap <leader>h :bprevious<cr>
nmap <leader>bq :bp <BAR> bd #<cr>
nmap <leader>bl :ls<cr>
" Open new split panes to the right and bottom, which feels more natural
set splitbelow
set splitright
" Easier split navigations
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
" get our vundle on
filetype off " required by vundle
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Plugin 'gmarik/vundle'
Plugin 'tpope/vim-git'
Plugin 'airblade/vim-gitgutter'
Plugin 'tpope/vim-fugitive'
Plugin 'scrooloose/nerdtree'
Plugin 'bling/vim-airline'
Plugin 'kien/ctrlp.vim'
Plugin 'tpope/vim-rails'
Plugin 'altercation/vim-colors-solarized'
Plugin 'terryma/vim-multiple-cursors'
Plugin 'mileszs/ack.vim'
Plugin 'bitc/vim-bad-whitespace'
Plugin 'tpope/vim-cucumber'
Plugin 'kchmck/vim-coffee-script'
" plugin configgy stuff
" Airline
let g:airline_enable_branch = 1
let g:airline_theme = 'solarized'
let g:airline#extensions#tabline#enabled = 1
" NERDtree
let g:NERDTreeDirArrows=0
let NERDTreeIgnore = ['\.py[co]$', '\.sw[po]$', '\.class$', '\.aux$']
nmap <leader>tb :NERDTreeToggle<cr>
" CtrlP
let g:ctrlp_custom_ignore = {
\ 'dir': '\v[\/](\.(git|hg|svn)|\_site)$',
\ 'file': '\v\.(exe|so|dll|class|png|jpg|jpeg)$',
\}
nmap <leader>p :CtrlP<cr>
" Ack
let g:ackpreview = 2
let g:ackhighlight = 1
nmap <leader>/ :Ack!<space>
" Multiple cursors
let g:multi_cursor_use_default_mapping = 0
let g:multi_cursor_next_key = '<C-j>'
let g:multi_cursor_prev_key = '<C-k>'
let g:multi_cursor_skip_key = '<C-x>'
let g:multi_cursor_quit_key = '<Esc>'
set list listchars=tab:▸\ ,trail:.
set list
fun! ToggleWhitespace()
ToggleBadWhitespace
if &list
set nolist
else
set list listchars=tab:▸\ ,trail:.
set list
endif
endfun
nmap <leader>tw :cal ToggleWhitespace()<cr>
" All of your Plugins must be added before the following line
filetype plugin indent on " required by vundle
" pretty colors
syntax enable
set background=dark
colorscheme solarized