campvorti.blogg.se

Hotkey for command prompt
Hotkey for command prompt











CTRL-Y: Paste the characters previously cut.CTRL-D/ DELETE/ FN DELETE (MACOS): Delete one character to the right.CTRL-H/ BACKSPACE/ DELETE (MACOS): Delete one character to the left.CTRL-K: Cut the characters to the right of the cursor.CTRL-XX: Hold CTRL and press X twice to move the cursor to the beginning of the line, and hold CTRL and press X twice again to move the cursor back.ALT-F/ CTRL-RIGHT: Move right one word.CTRL-F/ RIGHT: Move right one character.CTRL-E/ END: Move to the end of a line.CTRL-A/ HOME: Move to the beginning of a line.To list all the current key bindings, run: # zsh bindkey # bash bind -Pīoth Zsh and Bash support keymaps, so you can have a different set of key bindings active at different times. rc file): # zsh bindkey -v # bash set -o vi To switch to vi mode, run (or add to your. rc file): # zsh bindkey -e # bash set -o emacs To switch to Emacs mode, run (or add to your. Switching modesĪlthough Emacs mode is the default, if you have your $EDITOR set to vi (or any editor that contain “vi” such as vim), vi mode will be enabled.

hotkey for command prompt

I won’t get down to the nitty-gritty of how line editors work, if you are interested, you can find more information about zle (Zsh line editor) and about Readline (used by Bash).

hotkey for command prompt

I recommend starting with Emacs mode, mastering it, and later trying the vi mode. There are two modes of operation available to the Zsh (and Bash) line editor, one (the default) based on Emacs, and the other based on vi. It’s the first part of the shell you probably interacted with, as it handles all the commands you type.Įvery shell provides some kind of line editing capabilities, including entering and deleting characters, word navigation, deleting lines, etc. A line editor is a text editor that allows users to edit lines that represent commands.













Hotkey for command prompt