Spiderman shortcuts for working with commandline

After typing a huge command, wondered how to go at start or end or delete from in the middle or jump to another command itself?

Let say, we have a huge command, typed in or reverse serached like this:

pylint pkg1/push.py pkg2/pkg_email/email.py package3/innerpackage/myfile.py --rcfile=/path/to/.ylintrc

  1. what if my cursor is at end and I want to reach to start

  2. what if i'm in the middle of the command and want to delete everything in right or left.

Command Editing Shortcuts

  • Ctrl + a – go to the start of the command line (Alternatively can also use function key with arrow keys)

  • Ctrl + e – go to the end of the command line

  • Ctrl + w - Cut the word before the cursor, adding it to the clipboard.

  • Ctrl + k - Cut the part of the line after the cursor, adding it to the clipboard.

  • Ctrl + u - Cut the part of the line before the cursor, adding it to the clipboard

  • Ctrl + y – Paste the last thing you cut from the clipboard (such as the one above). The y here stands for “yank”

Command Recall Shortcuts

  • Ctrl + r – search the history backwards

  • Ctrl + g – escape from history searching mode

  • Ctrl + p – previous command in history (i.e. walk back through the command history)

  • Ctrl + n – next command in history (i.e. walk forward through the command history)

Amazed by the speed you got now?

Last updated