Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

For example, I open a file which includes

FATAL ERROR: Simulation failed. Please read /path/to/the/error/file.error

What I want to do is copy the path of the error file, which I've already done that by "v" into the visual mode and "y" to copy it, and open that file by splitting the window by ":sp /path/to/the/error/file.error".

My problem is: how to paste the copied path in command mode?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
276 views
Welcome To Ask or Share your Answers For Others

1 Answer

Vim also has a feature to open the filename under the cursor directly.

If you want to open it in a new split, then you can use Ctrl+W, f (or the equivalent Ctrl+W, Ctrl+F).

See :help CTRL-W_f for more details.

The mapping to open the file under the cursor in the current window (not in a new split) is gf.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...