⌃Control A Ctrl A Ctrl A
Jump to the start of the lineIn a multiline prompt, the current logical line.In a multiline prompt, the current logical line.In a multiline prompt, the current logical line.
⌃Control E Ctrl E Ctrl E
Jump to the end of the lineIn a multiline prompt, the current logical line.In a multiline prompt, the current logical line.In a multiline prompt, the current logical line.
⌥Option B Alt B Alt B
Move back one wordOn mac, needs Option as Meta in the terminal. Punctuation like _ . / separates words: in src/utils/foo.ts it stops at ts, foo, utils, src.On mac, needs Option as Meta in the terminal. Punctuation like _ . / separates words: in src/utils/foo.ts it stops at ts, foo, utils, src.On mac, needs Option as Meta in the terminal. Punctuation like _ . / separates words: in src/utils/foo.ts it stops at ts, foo, utils, src.
⌥Option F Alt F Alt F
Move forward one wordOn mac, needs Option as Meta in the terminal.On mac, needs Option as Meta in the terminal.On mac, needs Option as Meta in the terminal.
⌃Control K Ctrl K Ctrl K
Delete to the end of the lineKeeps the text for Ctrl+Y.Keeps the text for Ctrl+Y.Keeps the text for Ctrl+Y.
⌃Control U Ctrl U Ctrl U
Delete everything before the cursorKeeps the text for Ctrl+Y. Repeat to clear earlier lines of a multiline prompt.also⌘Command ⌫Backspace iTerm2 and Terminal.app map it to Ctrl+U.Keeps the text for Ctrl+Y. Repeat to clear earlier lines of a multiline prompt.Keeps the text for Ctrl+Y. Repeat to clear earlier lines of a multiline prompt.
⌃Control W Ctrl W Ctrl W
Delete back to the previous spaceOne press removes a whole path or --flag=value. To delete only a word, use Option+Delete on mac or Ctrl+Backspace on Windows.One press removes a whole path or --flag=value. To delete only a word, use Option+Delete on mac or Ctrl+Backspace on Windows.One press removes a whole path or --flag=value. To delete only a word, use Option+Delete on mac or Ctrl+Backspace on Windows.
⌥Option D Alt D Alt D
Delete to the end of the wordOn mac, needs Option as Meta in the terminal. Keeps the text for Ctrl+Y.On mac, needs Option as Meta in the terminal. Keeps the text for Ctrl+Y.On mac, needs Option as Meta in the terminal. Keeps the text for Ctrl+Y.
⌃Control Y Ctrl Y Ctrl Y
Paste the text you just deletedWhatever Ctrl+K, Ctrl+U, Ctrl+W or Alt+D removed last.Whatever Ctrl+K, Ctrl+U, Ctrl+W or Alt+D removed last.Whatever Ctrl+K, Ctrl+U, Ctrl+W or Alt+D removed last.
⌥Option Y Alt Y Alt Y
right after Ctrl+YCycle through earlier deleted textOn mac, needs Option as Meta in the terminal.On mac, needs Option as Meta in the terminal.On mac, needs Option as Meta in the terminal.
⌃Control _ Ctrl _ Ctrl _
Undo the last edit to the promptBrings back the previous text and cursor position.also⌃Control ⇧Shift - Brings back the previous text and cursor position.alsoCtrl Shift - Brings back the previous text and cursor position.alsoCtrl Shift -