this post was submitted on 14 Jul 2023
865 points (95.4% liked)

Programmer Humor

31812 readers
592 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] abraham_linksys 83 points 1 year ago* (last edited 1 year ago) (3 children)

Ctrl+a - go to beginning of line (alpha? I dunno)

ctrl+e - go to (e)nd of the line

alt+f - (f)orward one word

alt+b - (b)ack one word

You might already know these but no one else has posted them on this thread yet. I work in both Linux and Mac a lot and this works for them. No idea about Windows I'm no longer forced to use it at work ๐Ÿ™‚

[โ€“] [email protected] 15 points 1 year ago* (last edited 1 year ago) (1 children)

Also Ctrl + w to delete one word backwards (which is what OP wants to do).

Edit: Nvm I misread the post, deleting is not what OP wants to do. Still gonna keep this because Ctrl + w is easily the readline shortcut I use the most.

[โ€“] [email protected] 5 points 1 year ago

While we're at it: Alt+d deletes the next word.

[โ€“] [email protected] 11 points 1 year ago (1 children)

If you use WSL (which you should), you have a normal Bash, so it works

[โ€“] abraham_linksys 23 points 1 year ago (1 children)

The best part of Windows is the part that isn't Windows lmao lawd I'm glad I don't work for the federal government (exclusively Microsoft) anymore

[โ€“] darcy 3 points 1 year ago