![]() I found this snippet somewhere on the internet, but I forget where. If application "iTerm" is not running then Search for Run AppleScript in the list and drag it over to the workflow pane on the right. Open Automator.app and create a new Workflow. It runs an AppleScript script that starts iTerm2 if it's not running, or instructs it to open a new window if it is. The global shortcut is set using FastScripts. I've been running macOS for a few years now and haven't bothered to set up a similar shortcut until recently. When I used to use i3wm on Linux, I had command+ enter open a new terminal window. I'm including them anyway.How to Set a Global Shortcut to Open a New iTerm2 Window Alt- (up arrow) / Alt- (down arrow) -Option- / -Option- (in Week or Work Week view) Go to the previous / next month. Like, if you open Terminal.app on Mac some of these still work because it's the shell and not iTerm. Some of these are not directly related to iTerm and are just "shell features". FunctionĮnter Character Selection Mode in Copy ModeĬopy actions goes into the normal system clipboard which you can paste like normal. ![]() ![]() There's no need to Copy to the clipboard if you have General > Selection > Copy to pasteboard on selection enabled. I instead just mouse select (which copies to the clipboard) and paste. Moving by word on a line (this is a shell thing but passes through fine)Ĭursor Jump with Mouse (shell and vim - might depend on config)Ĭopy and Paste with iTerm without using the mouse (go to beginning of current line) but that doesn't work in the shell. For example ⌘ + Left Arrow is usually the same as Home Keys and Mac equivalents don't always work. It works in many contexts.Ī lot of shell shortcuts work in iterm and it's good to learn these because arrow keys, home/end Instead of typing exit, just get this in muscle memory. In general, use this instead of typing clear over and over. If you use ⌘ + K, this is telling iTerm to clear the screen which might have the same result or do something terrible (like when using a TUI like top or htop. This is telling the shell to do it instead of an explicit command like clear or cls in DOS. Especially when your last command was wrong by a single typo or something. Ctrl as modifier might also work on mac and non-mac keyboards/shells/apps. After we are done, we may need to restart the iTerm to be able to use the changes that we just made. This takes you off the home row but it's easy to rememberįast way to jump by words to correct a typo or "run again" with minor changes to last command. Now we need to repeat a similar process for the keyboard shortcut with the following settings: Keyboard Shortcut: Action: Send Escape Sequence Esc+: f That’s all we need to do. Ctrl-R is faster if you know the string you are looking for. In general I think if theyre just those 2 you could define different profiles and just redefine one of the shortcut keys in iTerm to switch to that (you can use any menu item). One feature that I wanted after my migration from Windows to OS X was the ability to jump between words in the. 2 I’d love to know this as well :) mikl at 20:21 As a hack you could write an apple script and bind it to a key in iterm. Use this with command history to repeat commands and changing one thing at the end!Ĭycle and browse your history with up and down. 8 Image source: iterm iTerm is a great terminal replacement that I like to use. Use this to start over typing without hitting Ctrl-C Im trying to assign a global keyboard shortcut that will launch a new window of iTerm, with a specific profile. Hopefully some of these improve your work life. ![]() There is also more than one way to do a thing so adopt what you like best. ![]() There are many shortcuts out there but I use these quite a bit. Keyboard shortcut keys in iTerm2 for Mac OS Select pane to the right, Opt+Cmd+Right Interacting with the terminal Clear window, Ctrl+L Clear buffer, Ctrl+. On the left-side menu of the new window, click App Shortcuts. These will usually work in Bash/Zsh/Fish on Mac and on Linux. Go to Apple menu > System Settings > Keyboard. These are just common shell shortcuts unrelated to iTerm itelf. These might be helpful to getting you faster with the shell. ⌘+ Left Arrow (I usually move by tab number) ⌘ + Shift + Enter (use with fullscreen to temp fullscreen a pane!)Ĭtrl + ⌘ + Arrow (given you haven't mapped this to something else) ⌘ + Alt + Shift and then drag the pane from anywhere ⌘ + Shift + D (mnemonic: shift is a wide horizontal key) ⌘ + backtick (true of all mac apps and works with desktops/mission control) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |