Skip to content

Instantly share code, notes, and snippets.

@jasonngpt
Created October 26, 2013 02:14
Show Gist options
  • Save jasonngpt/7164544 to your computer and use it in GitHub Desktop.
Save jasonngpt/7164544 to your computer and use it in GitHub Desktop.
Vim F key
If you press the "f" key in normal mode, Vim will move the cursor forward to whatever character you input after "f" is pressed. As an example, consider the following line:
a quick brown fox
If the cursor was at the absolute beginning of the line, and you pressed "fb" in normal mode, Vim would move the cursor so that it was positioned over the "b" in "brown".
If you press "F", Vim will move the cursor backwards instead of forward. Given the previous sentence, if pressed "Fq", and the cursor was at the end of the line, it would move to the "q" in "quick".
Copy link

ghost commented Nov 28, 2022

is there a way suppose i go with f but I want to go 1 character past that
a quick brown fox
my cursor is on a and if I press f and then k
I want my cursor to be on c
is it possible ?

@ssent1
Copy link

ssent1 commented Jul 16, 2023

fc to jump directly from 'a' to 'c'.
fkh if you jump past 'c' to 'k'.
h moves the cursor back by a single character, or <n>h to jump backwards by n characters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment