I am trying to bind a shortcut to perform
cut command in iTerm2. Obviously,
cut is bound to Cmd + x, but I would also like it to be bound to Ctrl + w.
I did this easily for
paste by going to
iTerm2 → Preferences → Profiles → keys and setting the action to
But there is no
So how can I achieve this?
For some other actions which don't appear listed, I have used their escape code or hex code representation as shown in answers to the question iTerm - going one word backwards and forwards.
I wonder where can I find a list of these representations and their actions?
Ideally, I would like to have Ctrl + w cut the selected text, or if there is no selection, then the entire line. Is this possible?
My goal is to make iTerm2 work more like Emacs.