If I'm in command-line mode in vim, and I have the current command line entered (cursor position shown with |
):
:somecommand somefilename.txt|
I'd like to navigate backwards so that the cursor is behind the .
:
:somecommand somefilename|.txt
Is there a way I can do this with a single command? In normal mode, I could use bb
to move back two words, but it seems that the only keybinding I can find in command line mode that's relevant to words is Shift-Left, and this moves by WORDS, not words (i.e. it ignores all punctuation and only looks at whitespace), so the cursor ends up here:
:somecommand |somefilename.txt
If it's relevant, I would like to use this as part of a mapping, so it doesn't matter if it's a bit fiddly to type.