《vim source insight srcexpl (source explorer)》由会员分享,可在线阅读,更多相关《vim source insight srcexpl (source explorer)(4页珍藏版)》请在金锄头文库上搜索。
1、SrcExplSrcExpl (Source Explorer) is a source code explorer that provides context for the currently selected keyword by displaying the function or type definition or declaration in a separate window. This plugin aims to recreate the context window available in the IDE known as “Source Insight“.Vim Ho
2、mepage: http:/www.vim.org/scripts/script.php?script_id=2179Github Repository: https:/ definitions and declarations of various languages supported by ctags and various types including functions, macros, structures, arrays, methods, classes, and variables.Jump to the displayed context in the Source Ex
3、plorer window using the mouse or your own key mapping.Jump back from the context location with the mouse context menu or your own key mapping.Automatically list all definitions if multiple definitions for a keyword is found.Automatically create and update the tags file. Installation1.Ensure ctags is
4、 installed on your system and that VIM can use it.2.Place the Source Explorer files in your Vim directory (such as /.vim) or have it installed by a bundle manager like Vundle or NeoBundle.3.Open the Source Explorer window with :SrcExpl or :SrcExplToggle or map these commands to keys in your .vimrc.R
5、equirementsSource Explorer requires:Vim 7.0 or higherctags ScreenshotsOne Declaration FoundMultiple Declarations FoundLocal Declaration FoundSettings Example“ / The switch of the Source Explorer nmap :SrcExplToggle “ / Set the height of Source Explorer window let g:SrcExpl_winHeight = 8 “ / Set 100
6、ms for refreshing the Source Explorer let g:SrcExpl_refreshTime = 100 “ / Set “Enter“ key to jump into the exact definition context “ let g:SrcExpl_jumpKey = “ “ / Set “Space“ key for back from the definition context let g:SrcExpl_gobackKey = “ “ / In order to Avoid conflicts, the Source Explorer sh
7、ould know what plugins “ / are using buffers. And you need add their bufname into the list below “ / according to the command “:buffers!“ let g:SrcExpl_pluginList = “_Tag_List_“, “_NERD_tree_“, “Source_Explorer“ “ / Enable/Disable the local definition searching, and note that this is not “ / guarant
8、eed to work, the Source Explorer doesnt check the syntax for now. “ / It only searches for a match with the keyword according to command gd let g:SrcExpl_searchLocalDef = 1 “ / Do not let the Source Explorer update the tags file when opening let g:SrcExpl_isUpdateTags = 0 “ / Use Exuberant Ctags wit
9、h -sort=foldcase -R . or -L cscope.files to “ / create/update a tags file let g:SrcExpl_updateTagsCmd = “ctags -sort=foldcase -R .“ “ / Set “ key for updating the tags file artificially let g:SrcExpl_updateTagsKey = “ Changelog5.0Replaced use of preview window with a named buffer.Moved to github.Add
10、ed documentation.5.1Added two APIs for serving other plugins:1.SrcExpl_GetWin(), getting the Source Explorer window number for those plugins based on multiple windows.2.SrcExpl_GetVer(), getting the Source Explorer version for the forward compatibility.Added debug/logging functions for the internal development.