-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
173 lines (144 loc) · 3.96 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
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
" rasca's .vimrc
" General "{{{
set nocompatible
set backspace=indent,eol,start " allow backspacing over everything in insert mode
set history=256
set ruler " show the cursor position all the time
set showcmd " display incomplete commands
if has('mouse')
set mouse=a
endif
if !exists(":DiffOrig")
command DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis
\ | wincmd p | diffthis
endif
set number
" Search
set incsearch " do incremental searching
set hlsearch " highlight last search term
set ignorecase " do case in sensitive matching with
set smartcase " be sensitive when there's a capital letter
" Command line
set wildmode=longest,list
let mapleader = ","
set wildignore='*~,*.swp,*.swo,*.pyc,.DS_Store,*.db'
let g:netrw_list_hide='.*\.swp$,.*\.swo$,.*\.pyc$,.*\.DS_Store$,.*\.db$'
" "}}}
" My mappings "{{{
map Q gq
" "}}}
" Formatting "{{{
syntax on
filetype off
" Put these in an autocmd group, so that we can delete them easily.
augroup vimrcEx
au!
" For all text files set 'textwidth' to 78 characters.
autocmd FileType text setlocal textwidth=78
" When editing a file, always jump to the last known cursor position.
" Don't do it when the position is invalid or when inside an event handler
" (happens when dropping a file on gvim).
" Also don't do it when the mark is in the first line, that is the default
" position when opening a file.
autocmd BufReadPost *
\ if line("'\"") > 1 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
augroup END
set tabstop=4 " set the default tabstop
set softtabstop=4
set shiftwidth=4 " set the default shift width for indents
set expandtab " make tabs into spaces (set by tabstop)
set smarttab " smarter tab levels
:autocmd Filetype typescript set softtabstop=2
:autocmd Filetype typescript set sw=2
:autocmd Filetype typescript set ts=2
:autocmd Filetype vue set softtabstop=2
:autocmd Filetype vue set sw=2
:autocmd Filetype vue set ts=2
" "}}}
" Plugins "{{{
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Bundle 'gmarik/vundle'
" Colorschemes
Bundle 'nanotech/jellybeans.vim'
Bundle 'cschlueter/vim-wombat'
Bundle 'wombat256.vim'
Bundle 'altercation/vim-colors-solarized'
Bundle 'ap/vim-css-color'
" Bundle 'git://git.wincent.com/command-t.git'
Bundle 'ctrlpvim/ctrlp.vim'
let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlPMixed'
" let g:ctrlp_user_command = 'git ls-files --recurse-submodules'
let g:ctrlp_working_path_mode = 'ra'
Bundle 'Lokaltog/vim-powerline'
set laststatus=2
let g:Powerline_symbols = 'fancy'
Bundle 'scrooloose/syntastic'
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_echo_current_error=1
let g:syntastic_enable_signs=1
let g:syntastic_auto_loc_list=1
let g:syntastic_mode_map = { 'mode': 'active' }
let g:syntastic_python_flake8_args = '--ignore=E501'
Bundle 'leafgarland/typescript-vim'
Bundle 'posva/vim-vue'
Bundle 'rust-lang/rust.vim'
Bundle 'Shougo/neocomplcache'
let g:neocomplcache_enable_at_startup = 1
Bundle 'tpope/vim-surround'
Bundle 'tpope/vim-repeat'
Bundle "SuperTab"
Bundle 'tpope/vim-fugitive'
Bundle 'grep.vim'
Bundle 'will133/vim-dirdiff'
"
" Try:
" vim-indent-guides
" vim-javascript
" vim-json
" vim-jquery
" nginx.vim
" Better-CSS-Syntac-for-Vim
" vim-markdown
" vim.tmux
" vimux
" gitv
" vim-pastie
" " trying this
" Bundle "YankRing.vim"
" Bundle "http://github.com/thinca/vim-quickrun.git"
" Bundle "http://github.com/thinca/vim-poslist.git"
" Bundle "http://github.com/mattn/gist-vim.git"
" Bundle "http://github.com/rstacruz/sparkup.git", {'rtp': 'vim/'}
"
" " Programming
" Bundle "jQuery"
"
" " Snippets
" Bundle "http://github.com/gmarik/snipmate.vim.git"
"
" " Syntax highlight
" Bundle "Markdown"
"
" " Git integration
" Bundle "git.zip"
"
" " (HT|X)ml tool
" Bundle "ragtag.vim"
"
" " Utility
" Bundle "file-line"
" Bundle "Align"
" "}}}
call vundle#end() " required
filetype plugin indent on " required
colorscheme jellybeans
set term=screen-256color
set t_ut=
" OSX stuff
set clipboard=unnamed