sometimes I have to switch between 2 lines. To do this, I have to pass line number. Are there shortcuts to moving between 2 last 'visited' list. Something similar to '.
(it moves to last edited line)
If we are in the vim editor, then simply do this, “Press the ENTER key, write the Line number, and press Shift+ g”: Again the output is the same.
Ctrl-W w to switch between open windows, and Ctrl-W h (or j or k or l ) to navigate through open windows. Ctrl-W c to close the current window, and Ctrl-W o to close all windows except the current one. Starting vim with a -o or -O flag opens each file in its own split.
Press 0 to go to the beginning of a line, or ^ to go to the first non-blank character in a line. Save this answer.
You can use bookmarks, something like ma to mark a bookmark named a
, and then 'a to go to it. Naming boomarks a
and b
for example, you can switch between them with 'a and 'b.
There is a command that will bounce to the last location you jumped away from. If repeated, it will then return to the jump destination you were just on. If repeated further it will bounce you back and forth between the two locations.
The command has two forms:
``
or
''
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