-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc_typescript
194 lines (162 loc) · 6.75 KB
/
vimrc_typescript
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
set nocompatible " be iMproved, required
filetype off " required
" NOTE: you will need to perform the manual steps within the instructions on
" the following pages when setting up VIM using this .vimrc
"
" First install Vundle:
" git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
"
" Optionally include a DLL for fullscreen in Windows:
" https://www.vim.org/scripts/script.php?script_id=2596
"
" Also, download vimproc_win32.dll from the following page:
" https://github.com/Shougo/vimproc.vim/releases
" and copy it into the following folder:
" ~/.vim/bundle/vimproc.vim/lib
"
" In order to use Ags, you'll need to install silver searcher:
" https://github.com/ggreer/the_silver_searcher
"
" The easier way is to download a build, extract, and add to PATH:
" https://github.com/k-takata/the_silver_searcher-win32/releases
"
" Download binaries for ctags and add to PATH:
" http://ctags.sourceforge.net/
"
" Also install tstags globally:
" https://github.com/majutsushi/tagbar/wiki
" https://github.com/Perlence/tstags
" 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 'VundleVim/Vundle.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'scrooloose/syntastic'
Plugin 'pangloss/vim-javascript'
Plugin 'mxw/vim-jsx'
Plugin 'kien/ctrlp.vim'
Plugin 'altercation/vim-colors-solarized'
Plugin 'leafgarland/typescript-vim'
Plugin 'Shougo/vimproc.vim'
Plugin 'Quramy/tsuquyomi'
Plugin 'majutsushi/tagbar'
Plugin 'gabesoft/vim-ags'
Plugin 'itchyny/lightline.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'Shougo/vimshell.vim'
" Plugin 'w0rp/ale'
" 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 - 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
let g:lightline = {
\ 'colorscheme': 'solarized'
\ }
let g:tagbar_type_typescript = {
\ 'ctagsbin' : 'tstags',
\ 'ctagsargs' : '-f-',
\ 'kinds': [
\ 'e:enums:0:1',
\ 'f:function:0:1',
\ 't:typealias:0:1',
\ 'M:Module:0:1',
\ 'I:import:0:1',
\ 'i:interface:0:1',
\ 'C:class:0:1',
\ 'm:method:0:1',
\ 'p:property:0:1',
\ 'v:variable:0:1',
\ 'c:const:0:1',
\ ],
\ 'sort' : 0
\ }
let g:ctrlp_custom_ignore = {
\ 'dir': '\v[\/](\.git|node_modules|reports|target|\.settings|webapp|\.sass-cache|bower_components|build)$',
\ 'file': '\v\.(exe|so|dll)$',
\ 'link': 'some_bad_symbolic_links',
\ }
set statusline=%t "tail of the filename
" set statusline+=[%{strlen(&fenc)?&fenc:'none'}, "file encoding
" set statusline+=%{&ff}] "file format
set statusline+=%h "help file flag
set statusline+=%r "read only flag
set statusline+=%y "filetype
set statusline+=%m "modified flag
set statusline+=%= "left/right separator
set statusline+=%c, "cursor column
set statusline+=%l/%L "cursor line/total lines
set statusline+=\ %P "percent through file
let g:syntastic_enable_signs = 1
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_loc_list_height = 5
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
" let g:syntastic_javascript_checkers = ['eslint']
let g:syntastic_javascript_checkers = ['tsuquyomi']
let g:syntastic_error_symbol = 'x'
let g:syntastic_style_error_symbol = 'x'
let g:syntastic_warning_symbol = '!'
let g:syntastic_style_warning_symbol = 'o'
highlight link SyntasticErrorSign SignColumn
highlight link SyntasticWarningSign SignColumn
highlight link SyntasticStyleErrorSign SignColumn
highlight link SyntasticStyleWarningSign SignColumn
syntax on
set mouse=a
set nowrap
set ruler
set number
set hlsearch
set expandtab
set shiftwidth=2
set softtabstop=2
set background=dark
set smartindent
:iabbrev </ </<C-X><C-O>
if has("gui_running")
colorscheme solarized
set guifont=Consolas:h10:cANSI:qDRAFT
set guioptions=egmrLt
set guioptions-=m
set guioptions-=r "remove right-hand scroll bar
set guioptions-=L "remove left-hand scroll bar
set sessionoptions+=resize,winpos
autocmd VIMEnter * :source C:\Users\[username]\session.vim
autocmd VIMLeave * :mksession! C:\Users\[username]\session.vim
autocmd FileType typescript setlocal balloonexpr=tsuquyomi#balloonexpr()
autocmd VimEnter * NERDTree [bookmarkname]
let g:NERDTreeWinSize=40
endif
" for putty console vim
hi StatusLine ctermfg=238 ctermbg=16
hi StatusLineNC ctermfg=grey ctermbg=black
hi VertSplit ctermfg=244 ctermbg=232 cterm=bold
set dir=$HOME/.vim/tmp/swap
if !isdirectory(&dir) | call mkdir(&dir, 'p', 0700) | endif
" autocmd FileType typescript nmap <buffer> <Leader>t : <C-u>echo tsuquyomi#hint()<CR>
:map <F3> :set ballooneval<CR>
nmap <F8> :TagbarToggle<CR>
" enter fullscreen (needs to be on main monitor, and also needs to the following installed:
" https://www.vim.org/scripts/script.php?script_id=2596
map <F11> <Esc>:call libcallnr("gvimfullscreen.dll", "ToggleFullScreen", 0)<CR>
" make sure quickfix window always wraps contents
augroup quickfix
autocmd!
autocmd FileType qf setlocal wrap
augroup END
" ensure quickfix window always appears at bottom of screen and full-width
:autocmd FileType qf wincmd J