![]() ![]() (up, down, left, right, forward-word, backward-word, kill-word, kill-backward-word, end-of-line, beginning-of-line, etc.) You'll always be able to sit at a "unix" computer and get things done. The same goes for any of the basic movement and editing keys. While you could bind "delete word" to a single unused key in Emacs and your shell, say C-o 4, I strongly recommend you don't. This is also something you don't want to overwrite for obvious reasons. The shell receives C-? 3 and this is bound to backward-delete-character. Generally, in your shell, when you press the backspace key, the shell does not receive a "backspace event" like Emacs does. Binding C-backspace in your shell isn't that simple, or simple of a conflict. In Emacs, rebinding backward-kill-word to C-w will step on the default binding of kill-region, which I don't recommend. Like in Emacs, you can rebind keys in your shell, but unifying your keybindings so you have a common "delete word" key in your shell and in Emacs isn't that simple. "Delete word" is one place where they differ. 2 Generally both bash and zsh have "emacs keybindngs" by default, so general movement and editing use the same keys. By default this is bound to C-w, in both bash and zsh. Now, when you have iTerm open in front of you, and you're at your shell command line, you can also "delete word". By default backward-kill-word is bound to C-backspace. This will delete the word 1 to the left of the point. Unfortunately there's not much you can do about that, so let's focus on what you want to do, "delete word".Īs you've discovered, Emacs has a "delete word" function, backward-kill-word. ![]() Long is correct, you have a conflict between iTerm and Emacs. At your shell command like use C-w to do the same. Use C-backspace in Emacs to delete the word to the left of the point. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |