Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I am attempting to move from IntelliJ IDEA to vim, primarily for C development. What are the equivalent of the following common IntelliJ features/tasks in vim (and what plugin is required if any)?

Source Navigation

1) Find file in project by name (Ctrl + Shift + N)

2) Navigate to [Function] Declaration (Ctrl + B / Ctrl + Right Click)

3) File Structure Pop-up (Ctrl + F12)

4) "Forward" (Ctrl + Alt + Right)

5) "Back" (Ctrl + Alt + Left)


Note that for the following, I don't want just "find/replace." If I change a single function definition, I want all occurrences of that function updated in the project (as a single command).

6) Rename File / Function / Variable (Shift + F6)

7) Change Function Signature (Ctrl + F6)

8) Inline Function (Ctrl + Alt + N)

9) "Safe Delete" (Alt + Delete)

Safe Delete helps you delete a file / function / variable without breaking your compile. So, (for C) you could delete a *.h file from your project, with the operation listing the other files that import functions defined in that header and giving you the chance to cancel the delete.


10) Show Usages (Ctrl + Alt + F7)

This is different from just "grep" as it gives you the option to exclude matches in comments, documentation, etc.

11) Surround with... (Ctrl + Alt + T)

In IntelliJ, I most commonly use this to surround method calls with "try/catch/finally." Perhaps not something that is needed much in C development?

12) Quick Documentation (Ctrl + Q)

IntelliJ pops up the JavaDoc in a tiny window, giving you the option to select from possible matches (if more than one). Here, I would expect equivalent except in a newly-opened split buffer.

13) Using Control-Space for keyword completion.

share|improve this question

closed as off topic by MichaelT, Dynamic, Kilian Foth, Bart van Ingen Schenau, GlenH7 May 20 '13 at 11:26

Questions on Programmers Stack Exchange are expected to relate to software development within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

Short lazy tips: Look at the shift+K command, the command-t plugin, and ropevim. The Supertab and surround plugins should help too. ctags is also useful. –  Daenyth May 1 '12 at 21:18

2 Answers 2

Refactoring is done via replace expressions (%s/old_name/newName/g). Usages, calls and definitions can be seen by using ctags or cscope.

There are plugins for project structure. I don't seem to find one right now but I'll edit the answer when I remember.

And a good vimrc does wonders (mine is sufficient for what I use right now but it can be extended).

To conclude, try to learn a few shortcuts from Vim itself. I find this tutorial very entertaining.

share|improve this answer
Awesome tutorial, thanks. I am planning my own answers here once I get up to speed. –  noahz May 4 '12 at 14:38

I am in the process of answering my own question for posterity as a "community wiki." Probably deriving many answers from here: Use vim like an IDE

1) Find file in project by name

2) Navigate to [Function] Declaration

3) File Structure Pop-up

4) "Forward"

5) "Back"

Answer: How do I go back to where I was before a search?

6) Rename File / Function / Variable

7) Change Function Signature

8) Inline Function

9) "Safe Delete"

10) Show Usages

11) Surround with...

12) Quick Documentation

13) Using Control-Space for keyword completion.

Answer: Ctrl+Space for omni and keyword completion in vim

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.