Re:What I Wish I Had Known About Developing C/C++ From Linux...
by barrkel on Tuesday April 21, 2009 @07:57PM
(#573246)
Of course, if you use an IDE, it can do all of this for you and much more, and more accurately than ctags.
[ Parent
| on HN ]
Re:What I Wish I Had Known About Developing C/C++ From Linux...
by silentbicycle on Tuesday April 21, 2009 @09:13PM
(#573318)
Of course, it's easier to write a program that generates tags for a new language than to build an IDE around it.
Re:What I Wish I Had Known About Developing C/C++ From Linux...
by ori_b on Tuesday April 21, 2009 @10:13PM
(#573396)
Ctags is just as accurate at scanning C declarations as an IDE, and with a bit of vim magic, it even auto-updates when you save files.
One thing to realize is that vim IS an IDE of sorts. Only, it's far more extensible for the same effort. (although, from my brief forays with emacs, emacs certainly beats vim for extensibility)
Re:What I Wish I Had Known About Developing C/C++ From Linux...
by ramchip on Tuesday April 21, 2009 @10:58PM
(#573430)
Emacs also supports ctags. I didn't find it very useful with C++ though, which is my usual language, since it didn't autocomplete member functions - I think it's supposed to work, though I couldn't be pushed to tweak it.
Cscope, as commented on the article's website, sounds quite interesting too.
Re:What I Wish I Had Known About Developing C/C++ From Linux...
by kingkongrevenge on Tuesday April 21, 2009 @11:37PM
(#573467)
ctags on C++:
ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .
Re:What I Wish I Had Known About Developing C/C++ From Linux...
by ori_b on Tuesday April 21, 2009 @11:41PM
(#573473)
ctags takes an environment variable for it's options, too:
export CTAGS='-R --c++-kinds=+p --fields=+iaS --extra=+q'
and then you can just run 'ctags .'
Re:What I Wish I Had Known About Developing C/C++ From Linux...
by barrkel on Tuesday April 21, 2009 @11:00PM
(#573436)
What about conditionally compiled code, based on preprocessor definitions? And what happens when you change one of those definitions in the editor? Visual Studio, for example, will re-scan the source in the background.
And what about tokens created using the token pasting operator ## from include files that are included multiple times (e.g. code generation hackery)? Visual Studio will at least locate the include file which introduced the token, and of course will be able to complete on the token, aware of its type etc.