vim-f-motion is an extension for vscode which allows the use of the f motion. To use the f motion the default keybinding is alt+f. After entering listen mode with alt+f the next key press will move the cursor to the position of the pressed character within the same line.
Features
Jump to any character by pressing alt+f and then inputing the desired key.
- alt+f +
char- Jump cursor to the next occurance of a typedcharon the line. - alt+shift+f +
char- Jump cursor to the previous occurance of a typedcharon the line. - alt+; - Repeat last alt+f +
charcommand. - alt+, - Repeat last alt+shift+f +
charcommand.
TODO: add gif
Logo is generated with chatgpt
Extension Settings
There are keybindings you can set, if you want different keys. The defaults are as above.
Known Issues
You cannot do a selection as part of the jump. If you want to select all withing a range you can't do it using the motion. I might add a visual block mode so that it's possible to still make the selection, but it doesn't seem very ergonomic to have to press alt+v and then alt+f.
Release Notes
1.0.0
Initial release, basic f, shift+f, ; , , functionality.
Future
Might add a visual select block with alt+v or some other stuff too.
Enjoy!