Vim can open a file under cursor using gf. For example, if I have the following under my cursor:
SensorManagementActivity.java
Hitting gf will open SensorManagementActivity.java.
The problem is that in Java, the references lack the java suffix, and often appear as SomeClass, SomeClass() or SomeClass.method().
- How do I open
SomeClass.javaand jump tosomeMethod()when the cursor is onSomeClass.someMethod()in another file? - Is there a way to open a new file without saving the current one, and going back to the current one without losing changes?