I've just download sublime text 2 beta 2182 under ubuntu 10.10 with Exuberant Ctags 5.8
I want to use it for c++ coding and I need some auto completition and code navigation. (I was used to eclipse with cdt)
I googled and I found ctags a cool tool that can do it, and there is a plugin support for sublime text here.
The problem is that I want create tag file from:
c++ standard lib (std::vector
std::map etc
)
all classes of the framework i'm using.
Point 1 is (i think) the same of point 2, I just only have to create a tag list of std lib in my /usr/include/c++/4.4.5/
so I've downloaded the plugin and installed it, I made a taglist in this way:
$ cd /absolute_path_of_my_cpp_framework/ $ ctags -R *
I modified /home/me/.config/sublime-text-2/Packages/CTagss/CTags.sublime-settings
with this line:
"extra_tag_files" : [".gemtags", "/absolute_path_of_my_cpp_framework/tags"]
Now I open a cpp file, point the cursor on a class name of my framework and used the key binding ctrl+t ctrl+t
and nothing happened. Only this message in the bar in the bottom:
can't find "class_name"
Can someone help me?
Ctags is a tool that generates a tag file of names found in source files. In Moodle, it can be used to index PHP functions, variables, classes and so on. These tags allow definitions to be quickly and easily located by a text editor such as vim.
ctags creates a file named tags in the current directory. It summarizes the locations of various objects in the C source files named on the command line. All files with a . c or . h suffix are treated as C source files.
Go to the following website and download the latest package labeled Source and binary for Windows: http://ctags.sourceforge.net. If the latest binary package is not available for download, go to the Download section and download the binary package for the previous version of Ctags.
I don't personally use Sublime Text, but assuming it uses tag files in a similar manner to vim, you need to generate additional info for C++ completion.
Use ctags with the following options:
ctags -R --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++
Info was taken from this article, which also supplies copies of the standard library headers that you can use to generate tags.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With