Is there a substitute in emacs for the vi "gf" command? meaning try to open the file which is under the cursor right now if a real file name is in fact there.
Thanks
To go to a specific line: Type M-x goto-line <Enter>, then type the line number followed by <Enter>. There are also shortcuts. Type the command "help -q emacs goto" in a local window to find out about it. (Local shortcut is M-x #).
To find a file in Emacs, you use the C-x C-f ( find-file ) command.
How do I move to the beginning of the file in emacs (i.e. the effect of Ctrl + Home in windowed text editors)? Mashing pageup does not move the cursor to the beginning (nor does Ctrl+Home , ofc). Here the shortcut for the desired result is described as: M-< : Move to the top of the buffer (beginning-of-buffer).
Type C-M-v to scroll the bottom window. (If you don't have a real Meta key, type ESC C-v.) >> Type C-x o ("o" for "other") to move the cursor to the bottom window.
You want the find-file-at-point
function (which is also aliased to ffap
). It's not bound to a key by default, but you can use
M-x ffap
Or, you can put in your .emacs
file:
(ffap-bindings)
This will replace many of the normal find-file
key bindings (like C-x C-f
) with ffap
-based versions. See the commentary in ffap.el
for details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With