3 ms·
No, you still need ctags to jump to sources outside of your current file. But within the same file, it works fine without it. C doesn't have a defined director
by falcolas 4y ago
No, you still need ctags to jump to sources outside of your current file. But within the same file, it works fine without it.
C doesn't have a defined directory structure, and a lot of the source/header files you'd use are stored in places like /usr/lib and such.
- aidenn0 4y agoNote that cscope is significantly better than ctags and also built into vim.
- pjmlp 4y agoYeah, but that is the thing, an IDE works with more than one file.
- falcolas 4y agoI feel like you're taking my words in bad faith. Vim works perfectly fine with multiple files out of the box, it just wants a tag file for jumping between multiple files and letting autocomplete work with those tags. This is hardly unique to vim (and emacs) - you can't work on a project in IntelliJ without first setting up a workspace and letting IntelliJ index all those files. The only difference is how the index is generated. Oh, and `:help cscope` (again, thanks aidenn0). In vim >=9.0 a tagging tool is now incorporated into the base vim install.
- pjmlp 4y agoNope, just making the point that vim has lots of things to catch up with a proper C IDE in a default install. ctags was just the first example of many things I can refer to. For example any basic C IDE on a default install is expected to have debugging integration, project management, among other stuff.
- qu4z-2 4y agoI'm so confused. Vim has ctags, and it works, across multiple files. Granted I don't think vim is an IDE, but you'd demonstrate that better by pointing to the IDE stuff it doesn't do (like debugging, I think, but I debug with printf and only rarely fire up gdb so for all I know it does support it).