Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
100644 77 lines (50 sloc) 4.116 kb
1210fd7 @wesleyche Version 1.0: Initial upload
wesleyche authored
1 This is a mirror of
87620e1 @wesleyche Version 5.1
wesleyche authored
3 [GitHub]
5 The latest dev version of Source Explorer and screenshots can be downloaded from GitHub Homepage:
1210fd7 @wesleyche Version 1.0: Initial upload
wesleyche authored
9 [Introduction]
11 The plugin (srcexpl.vim) is a source code explorer based on tags and it provides an overview of the function and type definitions.It has such a mechannism that works like the context window component of "Source Insight" software.
13 If you have used Source Insight for browseing C/C++/Java project before, you may find that you can browse the definitions with the Source Explorer as well as the context window of "Source Insight".
15 For example, you put the cursor on a function name in the Normal mode, its definition will show on the Source Explorer window a moment later. As soon as you do the 'double-click' operation using your mouse onto the Source Explorer window which had appeared on the bottom of (G)Vim, the definition and its context will be shown on the editor window.(Just like Source Insight does). Besides, multi-definitions' listing and jumping works like the Source Insight too. In srcexpl v1.2 and above, the function key which users mapped will play a important role that you can not only use mouse but also use keyboard in order to exploring source code in both GUI and cterm VIM.
17 The Source Explorer can work with 'Taglist' and 'NERD tree' very well. Both of them make (G)Vim looks like the "Source Insight" in Unix/Windows/Mac enviroment.
19 [Features]
21 1\ Go insight the definitions of functions and various types of C/C++/Java language project, including function, marcos, structure, array, method, class, global variable, local variable etc.
22 2\ Double click using left mouse and your own map key (such as: <ENTER>) onto the Source Explorer window can go forward to the preview context.
23 3\ Popup menu and Your own map key (such as <A-,> in Source Insight) to go back from the preview context.
24 4\ Auto create and update the 'tags' file intelligently.
26 [Tips]
28 1\ Ensure that there is only one 'tags' file in your project PATH, or it would make VIM load all of them on the same time. For example: There are two tags file in the 'your_project' directory, so we will delete the excess 'tags' file in the 'sub_directory'.
30 ... ...
32 [chewenlong@localhost ~]$ cd your_project/
33 [chewenlong@localhost your_project]$ pwd
34 /home/chewenlong/your_project
35 [chewenlong@localhost your_project]$ ls
36 bar.c sub_directory tags
37 [chewenlong@localhost your_project]$ cd sub_directory/
38 [chewenlong@localhost sub_directory]$ ls
39 foo.c tags
40 [chewenlong@localhost sub_directory]$ rm -rf tags
41 [chewenlong@localhost sub_directory]$ ls
42 foo.c
43 [chewenlong@localhost sub_directory]$ cd ..
44 [chewenlong@localhost your_project]$ ls
45 bar.c sub_directory tags
46 [chewenlong@localhost your_project]$ vim bar.c
48 ... ...
50 2\ Make sure the files you are exploring is unix-format, that is, there is no '\r'(displayed as '^M') at the end of each line. Because the plugin would make a jump mistake when executing EX-commands.
52 3\ If you want your VIM works like the Source Insight, just try a VIM plugin named 'Trinity (trinity.vim)':
56 This simple plugin can manage 'Source Explorer', 'Taglist' and 'NERD Tree' work together very well.
2ea34f7 @wesleyche Version 4.4
wesleyche authored
58 If you want to use VIM with Source Explorer in the UNIXs-console, I suggest map the keys below to jump from one window to another.
1210fd7 @wesleyche Version 1.0: Initial upload
wesleyche authored
60 nmap <C-H> <C-W>h
61 nmap <C-J> <C-W>j
62 nmap <C-K> <C-W>k
63 nmap <C-L> <C-W>l
2ea34f7 @wesleyche Version 4.4
wesleyche authored
65 Below key mappings can replace the Vim feature for jumping to previously visited locations via jump list.
67 nmap <C-I> <C-W>j:call g:SrcExpl_Jump()<CR>
68 nmap <C-O> :call g:SrcExpl_GoBack()<CR>
1210fd7 @wesleyche Version 1.0: Initial upload
wesleyche authored
70 The typical actions using srcexpl.vim are:
72 a\ Move the cursor onto a symbol word.
73 b\ As soon as the definition of the word is displayed on the preview window, we type <Ctrl-j> to jump into the previw window.
74 c\ Type the SrcExpl_jumpKey(<ENTER> as default) to jump to the exact context of its definition.
75 d\ Type the SrcExpl_gobackKey(<SPACE> as default) to go back to the previous position of the symbol word.
Something went wrong with that request. Please try again.