Skip to main content
Bumped by Community user
added 246 characters in body
Source Link
Cezar
  • 283
  • 2
  • 7

Say I'm doing a grep for something and in the results I have a bunch of files? How can I quickly open one of those files in vim without using the mouse and without or typing the name by hand?

For example, with my mouse I can CMD-Click the name of the file and it opens in vim. But I would like to have the same speed without using the mouse.

UPDATE: grep is just one example, I would like to know if there's a universal way to would work for any command. Something like a bash variable that holds the last file name or whatever. And also, it should open just the one file that I want.

Thanks.

Say I'm doing a grep for something and in the results I have a bunch of files? How can I quickly open one of those files in vim without using the mouse and without or typing the name by hand?

For example, with my mouse I can CMD-Click the name of the file and it opens in vim. But I would like to have the same speed without using the mouse.

Thanks.

Say I'm doing a grep for something and in the results I have a bunch of files? How can I quickly open one of those files in vim without using the mouse and without or typing the name by hand?

For example, with my mouse I can CMD-Click the name of the file and it opens in vim. But I would like to have the same speed without using the mouse.

UPDATE: grep is just one example, I would like to know if there's a universal way to would work for any command. Something like a bash variable that holds the last file name or whatever. And also, it should open just the one file that I want.

Thanks.

Source Link
Cezar
  • 283
  • 2
  • 7

How do you open a file in vim from the terminal (osx)

Say I'm doing a grep for something and in the results I have a bunch of files? How can I quickly open one of those files in vim without using the mouse and without or typing the name by hand?

For example, with my mouse I can CMD-Click the name of the file and it opens in vim. But I would like to have the same speed without using the mouse.

Thanks.