This is a general guidance writing for setup and configurations of various tools that can be used in terminal. These are all just my recommendations and personal preference of an efficient workspace. All software can be selected and mixed by your taste.
Minimal and Modern Setup
I prefer to use less resource intensive and reliable software due to my limitations on computer hardware. But that doesn't mean it needs to feel ugly and old too. Here are my personal preferences of solutions on my common needs in the terminal.
Table of Contents
- Shell: fish
- Fuzzy finder: fzf
- Better cd command: zoxide
- Git GUI: lazygit
- Terminal prompt: oh my posh
- terminal multiplexer: tmux
- Code editor: neovim / lazy nvim
Shell: fish
Let's start with the shell. This is one of the most important configurations we can do. All our commands are written to shell so that makes it number one in the list. Fish is my favorite shell at the moment. i like it because it comes with the best defaults of all and therefore needs minimal configurations.
Some of it's features include auto complete of commands filtered by what you wrote based on your command history, less boilerplate scripting code, abbreviations and syntax highlighting.
Fuzzy Finder: fzf
Next are some tools for our new shell. A fuzzy finder is a tool that helps you find files and folders and much more things on your system quickly by typing the name of it. It then finds it by it's fuzzy pattern matching algorithm. For this, i use fzf which is a command line fuzzy finder. you can also search command histories, git branches, processes and more. you can preview them with shell integration and add more tools to work with it for example, to search inside of files you can integrate fzf with ripgrep. fzf's website has all the information you need.
Better cd: zoxide
Changing directories in command line is a bit of a pain in the terminal. You need to look at your current working directory, look at where you want to go, and also type it all correctly.
zhoxide fixes this by having a scoring system of your most used directories and also having a matching algorithm for it. To use it, you should first train it a bit by going to some directories but after that, you can just type the actual directory you want to go and zoxide will get you there. You don't even have to write the full name of it, as long as it finds it on the score board. I use it with --cmd cd command with my fish integration to write cd instead of z.
Git GUI: lazygit
Using git is hard, remembering commands, trying to perform actions without seeing git changes, writing file names, undoing actions and many more.
Lazygit is a terminal GUI for simplifying these tasks. You can see file changes, stage, unstage, commit, push, undo, reset and many more things. It has very easy key bindings and visual hints and you can also add you own custom commands to it.
Prompt Theme Engine: oh my posh
Oh my posh let's you change your terminal prompt so that it can be customized with different info texts, themes and colors. It's a great way to make your terminal look more stylish.
Their default configuration is very good on it's own and includes additional information about the directory you are in such as git status, date, time, shell and more.
Terminal Multiplexer: tmux
When you launch tmux, it creates a session and allows you to use multiple terminals in one session. You can create, navigate rename terminal windows and panes with a prefix and some keybindings. Default keybind is Ctrl+b but i prefers Ctrl+s. Also, i configured it to use vim motions to navigate around the panes. More detailed information is in the github page.
Code Editor: neovim / lazy nvim
Finally, we can install our terminal code editor. for this i use neovim with lazy plugin. neovim is a text editor and lazy plugin allows you to add many plugins that are mostly lazy loaded that allows you to turn neovim into a fully featured and fast IDE. You can add LSPs, themes, tree sitter, linter, formatter, fuzzy file finder, lazygit integration, auto commands, personal keymaps, fonts and many more. Configuration is in lua programming language can be a bit tricky to get used to but lazy makes it easy by separating plugin and setup logics into separate files. My personal preference is to either map jj or jk to exit insert mode end enter normal mode to use it more flexible.