Skip to content

How do I change the word boundaries of forward-word and backward-word? #543

Answered by chrisant996
whitesnakeftw asked this question in Q&A
Discussion options

You must be logged in to vote

@whitesnakeftw I went to add commands, but then I realized commands already exist for this! I never use vi mode, so it hadn't occurred to me to look at the vi mode commands.

Adding the following key bindings to your .inputrc file will make Ctrl- Left and Right move the same way as they do in plain CMD.exe.

"\e[1;5D":    vi-backward-bigword
"\e[1;5C":    vi-forward-bigword

None of the vi commands in Readline are documented, so it wouldn't have been easy to find them.

I'll look into either documenting some of them (but that's kind of weird), or adding new documented command names that aren't vi-specific.

Replies: 2 comments 10 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
10 replies
@whitesnakeftw
Comment options

@whitesnakeftw
Comment options

@chrisant996
Comment options

@whitesnakeftw
Comment options

@chrisant996
Comment options

Answer selected by chrisant996
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Question about something
2 participants