Skip to content
Advertisement

Cannot go to the line of the reference

I recently installed cscope Vim plugin to make it easier to jump through code, but the main functionality – go to line, does not work. I have F2 key mapped to “Find all references”. When I select a function call for example, and press F2, I get the list of all the references, and the first reference is usually the function definition. When I type the line number and press Enter, nothing happens, and it is supposed to jump to the line I typed in. What could possibly be the problem here? Do I need to make some additional changes to my vimrc file to make the jumping possible?

Advertisement

Answer

When I type the line number and press Enter, nothing happens, and it is supposed to jump to the line I typed in

You actually should type the number that appears on the first column. The cscope usage is explained in detail at :help cscope-commands. It also provides the following example:

JavaScript

You are supposed to type a number between 1 and 15; any other just cancel the command.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement