Create an awesome development environment with the terminal in Mac OS like Linux window manager

Syd Amir
6 min readJun 16, 2022

this article is based on LESVIM, Nvim config focus on Javascript, Typescript, Rust and Lua. please see this github repo an give a star to it.

First of all let’s introduce several (rust) tools and write some config for its.

1. Wezterm

WezTerm is a GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust.

You can install it simply by homebrow (found more installation instruction)

$ brew tap wez/wezterm
$ brew install --cask wez/wezterm/wezterm

The best features of wezterm are : (you can found a full list of features can be found here)

this is my wezterm config you should put it on $HOME/.config/wezterm/wezterm.lua:

my wezterm config file

before anything else you should install this fonts on your Mac:

  • Cascadia Code
  • MesloLGS NF

you can easily install Cascadia Code with homebrew

brew tap homebrew/cask-fonts 
brew install --cask font-cascadia-code

you can found more details for installation here

for installing MesloLGS NF please see here, briefly download this file

and Double-click on each file and click “Install”.

know with this config you can use this short-key:

Tabs and Pane’s creation deletion

  • command + shift + N or super + shift + N shortcut to create a new terminal window.
  • command + ctrl+ f or super + ctrl + f toggle full screen windows.
  • command + shift+ L or super + shift + L show launcher.
  • command + t or super + t shortcut to create a new terminal tab.
  • command + w or super + w shortcut to close the current terminal tab.
  • command + ' or super + ' shortcut to create a new vertical terminal split pane.
  • command + / or super + / shortcut to create new horizontal terminal split pane.
  • command + x or super + x shortcut to close the current terminal pane.
  • command + z or super + z shortcut to toggle the current terminal pane zoom.

Tabs navigation

  • command + , or super + , goes to the right available tab.
  • command + m or super + m goes to the left available tab.
  • command shift + T or super + shift + T show tabs navigator menu.

Pane navigation

  • command + ctrl + h or super + ctrl + h goes to the left available pane.
  • command + ctrl + l or super + ctrl + l goes to the right available pane.
  • command + ctrl + k or super + ctrl + k goes to the top available pane.
  • command + ctrl + j or super + ctrl + j goes to the bottom available pane.

Pane cycles

  • command + [or super + [ goes to the next available pane.
  • command + ] or super + ] goes to the prev available pane.

Pane resizing

  • command + shift + H or super + shift + H increase right available pane to left.
  • command + shift + L or super + shift + L increase left available pane to right.
  • command + shift + K or super + shift + K increase the bottom available pane to the top.
  • command + shift + J or super + shift + J increase the top available pane to the bottom.

Searching

  • command + shift + F or super + shift + F search for the string "hash" matches regardless of case.
  • command + shift + space or super + shift + space go to quick search tools.

You might have already noticed that all the shortcuts here begin with command or super key except the ctrl + tab which is switched between available tabs, so we try not to use command or super key in vim short-key.

2. Fish shell and Starship

Fish shell is a user-friendly command-line shell. you can read install instruction it from here.

Fish has great features like autocomplete and suggests everything; it is the most user-friendly and interactive shell, and it has a great performance especially when we combine it with starship, we can use a newer and more robust shell like nutshell, but I think they don’t have enough reputation to use.

if you want to setup nice header and greeting message for fish shell put below code to $HOME/.config/fish/config.fish :

it’s also enable vim key binding to fish shell.

fish shell header

what is starship : It is the minimal, blazing-fast, and infinitely customizable prompt for any shell!

after installing starship and setup it for fish shell please put my configuration here :$HOME/.config/starship.toml

now you should see something like this when opening wezterm

starship

3. Zoxid

Using zoxide as a cd command in terminal:

A smarter cd command. Supports all major shells. you can read install instruction from here.

zoxide is really awesome and with that you can easily find any path in your terminal. believe me it changing your life.

zoxide

4. Exa

Using exa as a ls command in the terminal. you can read install instruction from here.

A modern replacement for ‘ls’. it’s a nice and cool tool you can use for decorating the terminal.

exa

it’s my short-key for list command in fish shell you can put it here : ~/.config/fish/functions .

5. RipGrep

Using RipGrep as a replacement for grep. you can read installation instruction here.

ripgrep recursively searches directories for a regex pattern while respecting your gitignore.

RipGrep

6. Bat

Using Bat as a replacement for cat . you can read installation instruction here.

A cat(1) clone with wings.

Bat

7. FD

Using fd as a replacement for find . you can read installation instruction here.

A simple, fast, and user-friendly alternative to ‘find’

FD

8. GitUI

Using GitUI for interacting with GIT. you can read installation instruction here.

Blazing 💥 fast terminal-UI for git written in rust 🦀

GitUI

to add Vim like key-binding and some configutation add these file here : ~/.config/gitui

I hope in the future I can publish a new story about LESVIM and describe some vim/neovim and some of its packages.

--

--