Intellisense - C++ Plug-in
Intellisense - C++ plug-in brings in Intellisense details to the C++ developer
in VIM. The following keys pops up the Intellisense window,
the methods and variables of the class on whose object . is pressed
the methods and variables of the class on whose object -> is pressed
the static members of the class.
List types and functions defined under the namespace
functions and types of global namespace. Note:
only first 200 entries are listed. See TODO
the tool tips for the function or method on which ( is typed.
all the header files from the all folders set in the system variable INCLUDE
is invoked from insen.exe to list the context specific contents. The input
parameter is specified in the %TEMP%/VimHelperParam.txt
cppft.dll uses perl and ctags to generate the listings for the object on which
insen was invoked.
ActivePerl 5.8 and
above should have been installed on the system and perl.exe should be in path.
Active Perl can be freely downloaded from www.activestate.com.
variable should be set with the correct paths.
TEMP folder should
be defined with a temporary folder name.
How does it work?
- The plug-in collects all the
included files (recursively) and generates a tag file using ctags.exe
(shipped along with insen). This is generated one time per session and per
file. The tag file is generated in %TEMP% folder as InsenVimAllTags.tag.
This file is cached for further usage. Also see caching.
- The include files list is
collected starting from #included files of the current file and then in
the files that are read using the #include. This continues until there are
no new #include files found while doing this recursive
- For . and
-> it parses the current file and then the included files to find the
class of the object and lists the members of that class.
- For :: the symbol before :: is
taken as type and the static members of the type is listed.
- For ( the
tool tip of the method or function is listed.
InsenVimAllTags.tag is generated each time a session is changed. For e.g. if you open a VIM and started A.cpp. Now first time
insen is required the tags file is generated for the include files starting
root from the #included files of A.cpp.
on as long as you are in A.cpp the same tag file is used to list the members.
you open another c++ file B.cpp (in the same Vim window or another window) and
invoked insen the cache is cleared and the InsenVimAllTags.tag file is
generated for the new set of include files.
to remove the cache manually in the following cases,
- A new header file is
#included in the current file
- A new function/type is added
to one of #included file
- a new type is added to the
the caching manually you have to invoke vim method IN_VisReload().
i.e. Type :call
IN_VimReload() from the command of VIM. Alternatively you can delete the InsenVimAllTags.tag
in the %TEMP% folder.
files listing cache….
header files present in all the folders of the INCLUDE path. This is generated
for the first time you invoke this listing and cached in the file VimHelper.txt_CACHE
in the %TEMP% folder. So if are
adding a new path to INCLUDE you have to delete this file so that the header
files in the new path is added to the list.
When the insen is not
listed you can use information in this section to trouble shoot yourself.
1. Check %TEMP% folder
for VimHelperParam.txt is generated. Check if the contents make sense to what
you have typed in C++ file.
2. Check if the
VimHelper.txt is generated and if the listing in that file is proper.
3. If this file is not
generated check the below things,
a. You have #included the
header file which contains the definition of the class for which you are
expecting the Intellisense.
b. You have added the
path of the include file to the INCLUDE path.
c. Perl.exe is in path
and it is the ActivePerl5.8 version.
d. Remove the cache and
4. Also check insen_cppft.log is generated in the %TEMP% folder. Check if there
are any error reports in this file.
5. To generate the trace
messages set a system variable INSENVIM_CPPFT_INFO_LOG to 1
and try again. Now the insen_cppft.log file will hold the trace message. Read
it and see if can fix the problem.
Mail me madhan.ganesh AT siemens DOT com or
sravishankar AT gmail DOT com the problem
along with the log file. We will help you run insen with our best efforts.
Typedefs have to be understood
by insen plug-in.
COM components have to taken care.
CTRL-SPACE should complete the insen.
:: should list all the elements of global
Insen should be made to work even in the middle of the line
Templates should be differentiated from classes.
Help of the types and methods should be brought.