Saturday 10 March 2018

osx snow leopard - Select text in iTerm using keyboard


Is there a way to select text in iTerm OSX using keyboard?



Answer



Yes! In iTerm2, do this:


From the relevant documentation



  1. Cmd-F

  2. Type some text that matches part of what you want to copy.

  3. When you have a partial match on what you want to copy, you can expand the selection.


Press tab to grow it one word to the right; press shift-tab to grow it one word to the left.


As soon as you press tab or shift-tab, it is copied to the clipboard. You can press option-Enter to immediately paste the selection and close the find bar at once.


You could also assign custom keys in Prefs -> Keys. (Source)


move selection forward by word


move selection backward by word


Similarly settings can also be used to move line selection.


Alternatively, the autocorrect feature reduces the need for copy-paste. Just type the start of some text that is either on the screen or you have copy-pasted recently and press cmd-;. A popup window appears and you can choose from there. Autocorrect works best for a single word, though.


(I updated this answer to reflect new features in iTerm 3.0. Thanks to @sfarzy for the suggested edits)


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...