Click ⌘Command ⇧Shift H to quickly navigate to your home folder. If you have Visual Studio Code (or any other editor) and want to make changes there instead you can click File → Open which will bring up the dialog. Once the changes are made you can save it by pressing ⌃Control X followed by Y. I normally use the command nano ~/.zshrc to edit the file. This is how my plugins definition looks like at the moment: plugins =( Make sure it’s uncommented by removing the #-sign in the start of the line (if present). Add zsh-autosuggestions to the list of plugins. Zsh-autosuggestions is a great plugin that will suggest auto completions based on what you type. Install it by opening iTerm and write the command: sh -c " $(curl -fsSL ) " Installing the zsh-autosuggestions plugin Oh My Zsh is a framework that extends your zsh shell with a bunch of handy plugins and nice themes. Once that is done I recommend dragging the app to the Dock so it’s easily accessible. While you are there you can also make it a bit more secure by clicking ✓ Secure Keyboard Entry. Set it to default by clicking ✓ Make iTerm2 Default Term in the dropdown. With iTerm.app open and the window in focus, click the word ‘iTerm2’ in the Menu bar. Open iTerm by pressing ⌘ Command → Space, write iterm and hit enter. Open your terminal and write the following commands: brew install cask You can download the app manually from the iTerm2 website or you can save yourself some trouble by using cask which helps you install apps from the command line. It’s more flexible and comes with some additional features. The regular Terminal that is shipped with macOS is sufficient. It normally takes a few minutes to complete. To install brew you simply open a terminal and paste this command: Open a terminal and run this command: xcode-select -install If you want to know more about brew you can check out my post “Brew, rbenv and bundle explained”.įirst we need to install CLI tools for Xcode. The most popular package manager for macOS is called Homebrew, or brew for short. We will soon go over them one by one, along with some tips and tricks.įirst we have to make some installations and configurations. But believe me, it comes with a log of usability improvements. It may not look that impressive in a static image. You don’t need to install it manually anymore. This is good news, because zsh is our preferred choice. 'Edit'->'Profile Preferences'->'Terminal Bell' checkbox.Let’s take a look at how you can make your macOS terminal more user friendly, and make it look dope at the same time.īack in 2019 Apple ditched the default shell bash and replace it with zsh (because of licensing issues). Now one annoyance on my system is that this particular combination caused the terminal emulator to issue a beep each time the command was issued, this I remedied by disabling the The ~/.zshrc should be re-sourced after these two commands are appended to it with: Then this sequence is given to bindkey in the ~/.zshrc file for persistance, as the first argument, and is bound, meaning that the keystroke in argument one will execute a particular editor command (or widget in zsh terms), to the widget, which in the first line of the above example is forward-word. For example the results of pressing should be interpreted like so: $ catġ 3 = I'm not sure about this one, but it should logically mean The key codes for a sequence can be obtained using cat and pressing the desired sequence. under tmux this substitution is necessary for me, however without tmux it is required that no substitution be made and [ = [ Where \e = The escape-key-sequence(as documented under section 4.1.1)Īnd [ = O (uppercase O as documented under section 4.2.1), in some cases. I can't speak for iTerm but these are the keybindings I used to solve this problem under GNOME Terminal, on Fedora 19, running ZSH 5.0.7 with Oh-my-zsh: bindkey "\e[1 3C" forward-word
0 Comments
Leave a Reply. |