Wikia

Vim Tips Wiki

Changes: Have Intellisense search current directory

Edit

Back to page

(Standard category names + minor manual clean.)
(Change <tt> to <code>, perhaps also minor tweak.)
 
Line 11: Line 11:
 
|category1=Automated Text Insertion
 
|category1=Automated Text Insertion
 
|category2=C++
 
|category2=C++
|category3=
 
 
}}
 
}}
 
This tip is relevant to those who use the "Intellisense" functionality for vim (http://insenvim.sourceforge.net) for C++. This requires, as a part of its setup, that the paths for all the included header files in a C++ file be present in the $INCLUDE variable. This is fine so long as all your header files are in one (invariant) location (say the MSVC's include directory). However, if your C++ file includes header files in locations relative to the current file, updating the INCLUDE environment variable is not an option.
 
This tip is relevant to those who use the "Intellisense" functionality for vim (http://insenvim.sourceforge.net) for C++. This requires, as a part of its setup, that the paths for all the included header files in a C++ file be present in the $INCLUDE variable. This is fine so long as all your header files are in one (invariant) location (say the MSVC's include directory). However, if your C++ file includes header files in locations relative to the current file, updating the INCLUDE environment variable is not an option.

Latest revision as of 07:53, July 11, 2012

Tip 835 Printable Monobook Previous Next

created 2004 · complexity intermediate · author Anand Hariharan · version 6.0


This tip is relevant to those who use the "Intellisense" functionality for vim (http://insenvim.sourceforge.net) for C++. This requires, as a part of its setup, that the paths for all the included header files in a C++ file be present in the $INCLUDE variable. This is fine so long as all your header files are in one (invariant) location (say the MSVC's include directory). However, if your C++ file includes header files in locations relative to the current file, updating the INCLUDE environment variable is not an option.

For example, if your header files are in the same directory as your source file, simply add the following line to the cpp_vis.vim file that is delivered to the vimfiles\ftplugin location:

let $INCLUDE = expand("%:p:h") . ";" . $INCLUDE

To include other relative paths, simply tweak the argument to expand(). See :help filename-modifiers.

CommentsEdit

Around Wikia's network

Random Wiki