Categories
How-To WebApps

Ctags and Code Completion in Vim 7.2

At work we switched the whole dev team over to using Eclipse. I still haven’t gotten used to all the point and click crap on it, but really admire the use of code completion and ctags.

When I saw that Vim had these, I’ve upgraded and now use ctags and code completion from Vim.

To get code completion, I type out the little bit I know and then type ctrl-o and ctrl-x:

pic of code completion in vim

To get ctags working, I installed it using sudo apt-get install ctags and then at the root of all my php files I typed:

ctags -R .

This generated a tags file.

Now when I open any file and have the cursor over a function or class, I just type ctrl-] and the file containing the class or function opens up.

One reply on “Ctags and Code Completion in Vim 7.2”

Leave a Reply

Your email address will not be published. Required fields are marked *