-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathhdevtools.vim
More file actions
43 lines (34 loc) · 1.14 KB
/
hdevtools.vim
File metadata and controls
43 lines (34 loc) · 1.14 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
if exists('b:did_ftplugin_hdevtools') && b:did_ftplugin_hdevtools
finish
endif
let b:did_ftplugin_hdevtools = 1
if !exists('s:has_hdevtools')
let s:has_hdevtools = 0
if !executable('hdevtools')
call hdevtools#print_error('hdevtools: hdevtools is not executable!')
finish
endif
let s:has_hdevtools = 1
endif
if !s:has_hdevtools
finish
endif
call hdevtools#prepare_shutdown()
if exists('b:undo_ftplugin')
let b:undo_ftplugin .= ' | '
else
let b:undo_ftplugin = ''
endif
nnoremap <buffer> <silent> gf :call hdevtools#go_file("e")<CR>
nnoremap <buffer> <silent> <C-W><C-F> :call hdevtools#go_file("sp")<CR>
command! -buffer -nargs=0 HdevtoolsType echo hdevtools#type()[1]
command! -buffer -nargs=0 HdevtoolsClear call hdevtools#type_clear()
command! -buffer -nargs=? HdevtoolsInfo call hdevtools#info(<q-args>)
command! -buffer -nargs=1 HdevtoolsFindsymbol call hdevtools#findsymbol(<q-args>, [])
let b:undo_ftplugin .= join(map([
\ 'HdevtoolsType',
\ 'HdevtoolsClear',
\ 'HdevtoolsInfo',
\ 'HdevtoolsFindsymbol'
\ ], '"delcommand " . v:val'), ' | ')
let b:undo_ftplugin .= ' | unlet b:did_ftplugin_hdevtools'