-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.vim
157 lines (128 loc) · 4.12 KB
/
default.vim
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
set number
set autoread
set showtabline=2
set laststatus=2
set hlsearch
set incsearch
set nocompatible
set tabstop=3
set shiftwidth=3
set expandtab
filetype off
color desert
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" Your Vundle plugins go here.
Plugin 'scrooloose/nerdtree'
Plugin 'scrooloose/nerdcommenter'
Plugin 'bronson/vim-trailing-whitespace'
Plugin 'terryma/vim-multiple-cursors'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'xolox/vim-misc'
Plugin 'xolox/vim-session'
Plugin 'easymotion/vim-easymotion'
Plugin 'Shougo/vimproc.vim' " Force install a dependency of tsuquyomi.
Plugin 'leafgarland/typescript-vim' " enables TypeScript syntax-highlighting.
"Plugin 'Quramy/tsuquyomi' " enables TypeScript auto-completion.
Plugin 'kshenoy/vim-signature'
Plugin 'dart-lang/dart-vim-plugin'
Plugin 'cakebaker/scss-syntax.vim'
Plugin 'tpope/vim-haml'
Plugin 'dsawardekar/wordpress.vim'
Plugin 'shawncplus/phpcomplete.vim'
Plugin 'SirVer/ultisnips'
Plugin 'StanAngeloff/php.vim'
Plugin 'tpope/vim-markdown'
call vundle#end()
augroup autoformat_settings
autocmd FileType dart AutoFormatBuffer dartfmt
autocmd FileType scss setlocal ts=2 sts=2 sw=2
augroup END
filetype plugin indent on
syntax on
if $COLORTERM == 'gnome-terminal'
set t_Co=256
endif
" Set color column to 121 for html, and 81 for everything else
set colorcolumn=81
autocmd FileType html setlocal colorcolumn=121
autocmd FileType java setlocal colorcolumn=101
highlight ColorColumn ctermbg=Red guibg=Red1
" Vim
let mapleader = ","
" Vim-Session
let g:session_autosave = 'no'
let g:session_autoload= 'no'
let g:session_autosave_periodic = 1
" CtrlP
let g:ctrlp_root_markers = ['*.blueprint']
" YouCompleteMe
let g:ycm_filetype_blacklist = {'cpp': 1, 'c': 1}
" Airline
let g:airline_theme='simple'
let g:airline_powerline_fonts = 1
let g:Powerline_symbols = 'fancy'
" Remap keys
nmap <Leader>n :NERDTreeFind <CR>
nmap <Leader>w :w! <CR>
nmap <Leader>vp :VimwikiAll2HTML <CR>
nmap <leader>et :tabe <C-R>=expand('%:h').'/'<cr>
" Search for selected text, forwards or backwards.
vnoremap <silent> * :<C-U>
\let old_reg=getreg('"')<Bar>let old_regtype=getregtype('"')<CR>
\gvy/<C-R><C-R>=substitute(
\escape(@", '/\.*$^~['), '\_s\+', '\\_s\\+', 'g')<CR><CR>
\gV:call setreg('"', old_reg, old_regtype)<CR>
vnoremap <silent> # :<C-U>
\let old_reg=getreg('"')<Bar>let old_regtype=getregtype('"')<CR>
\gvy?<C-R><C-R>=substitute(
\escape(@", '?\.*$^~['), '\_s\+', '\\_s\\+', 'g')<CR><CR>
\gV:call setreg('"', old_reg, old_regtype)<CR>
" You Complete Me config
nnoremap <leader>jd :YcmCompleter GoToDefinition<CR>
if !exists("g:ycm_semantic_triggers")
let g:ycm_semantic_triggers = {}
endif
let g:ycm_semantic_triggers['typescript'] = ['.']
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:
" Refer to |:NeoBundle-examples|.
" Note: You don't set neobundle setting in .gvimrc!
NeoBundle 'Shougo/vimproc.vim', {
\ 'build' : {
\ 'windows' : 'tools\\update-dll-mingw',
\ 'cygwin' : 'make -f make_cygwin.mak',
\ 'mac' : 'make -f make_mac.mak',
\ 'linux' : 'make',
\ 'unix' : 'gmake',
\ },
\ }
NeoBundle 'leafgarland/typescript-vim'
"NeoBundle 'Quramy/tsuquyomi'
NeoBundle 'Shougo/unite.vim'
NeoBundle 'Shougo/unite-outline'
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
autocmd FileType typescript nmap <buffer> <Leader>t : <C-u>echo tsuquyomi#hint()<CR>
autocmd FileType typescript setlocal completeopt+=menu,preview
" If you are using syntastic, you need to include this line in order for for it to work with
" your tsconfig settings.
let g:syntastic_typescript_tsc_fname = ''