forked from skywind3000/vim
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathskywind.vim
More file actions
186 lines (143 loc) · 6.35 KB
/
skywind.vim
File metadata and controls
186 lines (143 loc) · 6.35 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
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
"----------------------------------------------------------------------
" system detection
"----------------------------------------------------------------------
if has('win32') || has('win64') || has('win95') || has('win16')
let g:asc_uname = 'windows'
elseif has('win32unix')
let g:asc_uname = 'cygwin'
elseif has('unix') && (has('mac') || has('macunix'))
let g:asc_uname = 'darwin'
elseif has('unix')
let s:uname = substitute(system("uname"), '\s*\n$', '', 'g')
if v:shell_error == 0 && match(s:uname, 'Linux') >= 0
let g:asc_uname = 'linux'
elseif v:shell_error == 0 && match(s:uname, 'FreeBSD') >= 0
let g:asc_uname = 'freebsd'
elseif v:shell_error == 0 && match(s:uname, 'Darwin') >= 0
let g:asc_uname = 'darwin'
else
let g:asc_uname = 'posix'
endif
else
let g:asc_uname = 'posix'
endif
"----------------------------------------------------------------------
"- OptImport
"----------------------------------------------------------------------
IncScript site/opt/argtextobj.vim
IncScript site/opt/indent-object.vim
IncScript site/opt/apc.vim
if has('gui_running')
IncScript site/opt/hexhigh.vim
endif
runtime! macros/matchit.vim
"----------------------------------------------------------------------
"- Global Settings
"----------------------------------------------------------------------
let g:asyncrun_msys = 'd:/software/msys32'
if has('patch-8.0.0')
set shortmess+=c
endif
set cpt=.,w,k
"----------------------------------------------------------------------
"- FileType Preference
"----------------------------------------------------------------------
augroup SkywindGroup
au!
" au FileType python setlocal shiftwidth=4 tabstop=4 noexpandtab omnifunc=pythoncomplete#Complete
au FileType python setlocal shiftwidth=4 tabstop=4 et omnifunc=python3complete#Complete
au FileType cpp setlocal commentstring=//\ %s
augroup END
"----------------------------------------------------------------------
" config
"----------------------------------------------------------------------
let s:settings = {
\ 'cygwin': 'd:/linux',
\ 'zeal': 'D:\Program Files\zeal-portable\zeal.exe',
\ }
let s:settings_win = {
\ 'emacs': 'd:/dev/emacs/bin/runemacs.exe',
\ 'gdb' : 'd:/dev/mingw32/bin/gdb.exe',
\ }
call asclib#setting#update(s:settings)
if has('win32') || has('win64') || has('win16') || has('win95')
call asclib#setting#update(s:settings_win)
if has('gui_running')
endif
endif
"----------------------------------------------------------------------
" QuickMenu
"----------------------------------------------------------------------
call quickmenu#current(2)
if has('win32') || has('win64') || has('win16') || has('win95')
call quickmenu#append('# Help', '')
call quickmenu#append('Win32 Help', 'call menu#WinHelp("d:/dev/help/win32.hlp")', 'Looking up Win32 API')
call quickmenu#append('MSDN of VC6', 'call menu#WinHelp("d:/dev/help/chm/vc.chm")', 'MSDN')
call quickmenu#append('Python2 Help', 'call menu#WinHelp("d:/dev/help/chm/python2713.chm")', 'Python 2 Document')
call quickmenu#append('Python3 Help', 'call menu#WinHelp("d:/dev/help/chm/python362.chm")', 'Python 3 Document')
call quickmenu#append('Open Cygwin', 'call asclib#utils#terminal("mintty", "bash -i", 0)', 'open cygwin in current directoy')
call quickmenu#append('Open Bash', 'call asclib#wsl_bash("")', 'open bash for windows 10 in current directory')
call quickmenu#append('Open PowerShell', '!start powershell', 'open bash for windows 10 in current directory')
call quickmenu#append('Switch color', 'call SkywindSwitchColor()', 'switch current color scheme')
endif
"----------------------------------------------------------------------
" keymaps
"----------------------------------------------------------------------
if has('win32') || has('win16') || has('win64') || has('win95')
noremap <space>hw :FileSwitch tabe e:/svn/doc/linwei/GTD.otl<cr>
endif
"----------------------------------------------------------------------
"- miscs
"----------------------------------------------------------------------
let g:cppman_open_mode = '<auto>'
command! -bang -nargs=* -complete=file Make AsyncRun -program=make @ <args>
" let g:terminal_shell='cmd /s /k "c:\drivers\clink\clink.cmd inject"'
"----------------------------------------------------------------------
"- OmniCpp
"----------------------------------------------------------------------
let OmniCpp_NamespaceSearch = 1
let OmniCpp_GlobalScopeSearch = 1
let OmniCpp_ShowAccess = 1
let OmniCpp_ShowPrototypeInAbbr = 1
let OmniCpp_MayCompleteDot = 1
let OmniCpp_MayCompleteArrow = 1
let OmniCpp_MayCompleteScope = 1
let OmniCpp_DefaultNamespaces = ["std", "_GLIBCXX_STD"]
"----------------------------------------------------------------------
"- bufferhint
"----------------------------------------------------------------------
if has('patch-8.2.1') || has('nvim-0.4')
nnoremap <silent>+ :call quickui#tools#list_buffer('FileSwitch tabe')<cr>
else
nnoremap + :call bufferhint#Popup()<CR>
endif
let g:bufferhint_CustomHighlight = 1
hi! default link KeyHint Statement
hi! default link AtHint Identifier
"----------------------------------------------------------------------
" color scheme
"----------------------------------------------------------------------
map <leader><F3> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<'
\ . synIDattr(synID(line("."),col("."),0),"name") . "> lo<"
\ . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>
let g:solarized_termcolors=256
nnoremap <leader><F1> :call Tools_ProfileStart('~/.vim/profile.log')<cr>
nnoremap <leader><F2> :call Tools_ProfileStop()<cr>
"----------------------------------------------------------------------
" color scheme
"----------------------------------------------------------------------
let s:colors = ['biogoo', 'calmbreeze', 'dawn', 'dejavu', 'eclipse2', 'paradox', 'gaea', 'github', 'greyhouse', 'habiLight', 'imperial']
let s:colors += ['mayansmoke', 'mickeysoft', 'newspaper', 'nuvola', 'oceanlight', 'peaksea', 'pyte', 'summerfruit256', 'tomorrow']
let s:colors += ['monokai-vim']
function! SkywindSwitchColor()
call asclib#color_switch(s:colors)
endfunc
"----------------------------------------------------------------------
" quickui
"----------------------------------------------------------------------
let g:quickui_tags_list = {
\ 'python': '--python-kinds=fmc --language-force=Python',
\ }
let g:quickui_tags_indent = {
\ 'm': ' ',
\ }