-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathvimrc
More file actions
155 lines (123 loc) · 3.86 KB
/
vimrc
File metadata and controls
155 lines (123 loc) · 3.86 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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.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 'gmarik/Vundle.vim'
" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
Plugin 'tpope/vim-fugitive'
Plugin 'elixir-lang/vim-elixir'
Plugin 'mattreduce/vim-mix'
Plugin 'bling/vim-airline'
Plugin 'altercation/vim-colors-solarized'
Plugin 'kien/ctrlp.vim'
Plugin 'tpope/vim-surround'
Plugin 'tomasr/molokai'
Plugin 'ervandew/supertab'
Plugin 'mileszs/ack.vim'
Plugin 'Lokaltog/vim-easymotion'
Plugin 'scrooloose/nerdtree'
Plugin 'jistr/vim-nerdtree-tabs'
Plugin 'tomtom/tcomment_vim'
Plugin 'groenewege/vim-less'
Plugin 'kchmck/vim-coffee-script'
Plugin 'fatih/vim-go'
Plugin 'othree/yajs'
Plugin 'SirVer/ultisnips'
Plugin 'lambdatoast/elm.vim'
set iskeyword-=.
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - list configured plugins
" :PluginInstall(!) - install (update) plugins
" :PluginSearch(!) foo - search (or refresh cache first) for foo
" :PluginClean(!) - confirm (or auto-approve) removal of unused plugins
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
autocmd BufWritePost .vimrc source %
let mapleader = ","
au BufRead,BufNewFile *.md set filetype=markdown
nmap <leader>v :tabedit $MYVIMRC<CR>
nmap <leader>n :NERDTreeTabsToggle<CR>
nmap <leader>N :NERDTreeFind<CR>
nmap <leader>b :CtrlPBuffer<CR>
set splitbelow
set splitright
set showmatch
set t_Co=256
syntax enable
" set background=light
" colorscheme solarized
set background=dark
colorscheme molokai
set number
set cursorline
set linebreak
set scrolloff=4
set scrolljump=5
set laststatus=2
let g:airline_powerline_fonts = 1
set encoding=utf-8
set guifont=Inconsolata\ for\ Powerline:h15
set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*.pyc " MacOSX/Linux
let g:ctrlp_custom_ignore = '\v[\/](node_modules|vendor\/ruby|(\.(git|hg|svn)))$'
let g:ctrlp_max_files=0
" Tabs and spaces {{{1
" -----------------------------------------------------------------
" General
set softtabstop=2
set shiftwidth=2
set shiftround
set expandtab
set tabstop=4
" Lookbook
" set noexpandtab
" set copyindent
" set preserveindent
" set softtabstop=0
" set shiftwidth=4
" set tabstop=4
" Auto indent?
" set smartindent
" set autoindent
if has("autocmd")
filetype plugin indent on
endif
" set cindent
" Call strip trailing whitespaces as a command
command! StripTrailingWhitespace call s:StripTrailingWhitespace()
function! s:StripTrailingWhitespace()
" Save last search and cursor position
let _s=@/
let l = line(".")
let c = col(".")
" Do it!
%s/\s\+$//e
" Clean up by restoring the saved search and cursor
let @/=_s
call cursor(l, c)
endfunction
map <leader>w :StripTrailingWhitespace<CR>
autocmd BufWritePre * :StripTrailingWhitespace
au BufRead,BufNewFile *.ino set filetype=cpp
au BufRead,BufNewFile *.rabl set filetype=ruby
au BufRead,BufNewFile *.iced set filetype=coffee
au BufRead,BufNewFile *.sbt set filetype=scala
au BufRead,BufNewFile *.ejs set filetype=html
au BufRead,BufNewFile *.gss set filetype=css
autocmd Filetype go setlocal noexpandtab tabstop=4 shiftwidth=4 softtabstop=4
" autocmd Filetype javascript setlocal noexpandtab tabstop=4 shiftwidth=4 softtabstop=4
" autocmd Filetype jsx setlocal noexpandtab tabstop=4 shiftwidth=4 softtabstop=4
" Vagrantfile
autocmd BufRead,BufNewFile Vagrantfile set filetype=ruby
set spell