Until now I’ve been using Visual Studio Code as my primary code editor because I try different Linux distributions on my laptop and VSCode is available by default in almost every application manager. When I open a new project, the VSCode suggests relevant extensions based on the tech stack.
After hearing the praises for Neovim from Primeagen and TJ DeVries I decided to give it a go along with other command line utilities like tmux
and lazygit
to test if they optimize my development workflow.
I use vim motions in all workflows related to text whether it is writing code in VSCode (using VIM Plugin) or my journal in Obsidian. I also use vim
occasionally to perform quick edits on configuration files while I’ve SSH into a remote machine.
I have configured key bindings to navigate inside VSCode and throughout my system. Thus, adapting to a terminal and key binding-focused workflow won’t be difficult.
Terminal: Kitty
Source: sw.kovidgoyal.net
I have provisioned a Fedora 38 virtual machine on my homelab as a persistent development environment. On it, I use kitty as my terminal emulator because it is lightweight and it could be configured by a single file ~/.config/kitty/kitty.conf
.
Installation
kitty
is available as a dnf
package by default in Fedora.
|
|
Configuration
I have made the following changes to the default kitty configuration (kitty.conf
)
- Changed font family to JetBrains Mono.
|
|
- Font size changed to 16
|
|
- Changed cursor for aesthetics
|
|
- Changed mouse cursor hiding time to 2 seconds
|
|
- Enabled URL detection so that I visit them directly from my terminal
|
|
- Configuring copy on selection to send it directly to the clipboard. It’s useful when I have to quickly share a command’s output with someone else.
|
|
If you want to test your kitty configuration changes then it might be useful to change the default key binding for reloading configuration to be something more accessible like Ctrl+f5
.
|
|
Shell: ZSH
Source: Zsh-art/logo
I use zsh along with oh-my-zsh because of its aesthetics and the git information displayed on its prompt.
Installation
- Installing
zsh
|
|
- Changing default shell to
zsh
|
|
- Logout and log back in with the same user
- Installing Oh-My-Zsh
|
|
- Add path to your
oh-my-zsh
configuration in~/.zshrc
|
|
Configuration
I have performed the following edits on my ~/.zshrc
file
- Changed the
zsh
theme tobureau
in the~/.zshrc
file
|
|
- Installed the
zsh-autosuggestions
plugin
|
|
- Installed the
zsh-syntax-highlighting
plugin
|
|
- Enabled plugins in
~/.zshrc
|
|
You can load your zsh
configuration using the source
command.
|
|
Terminal Multiplexer (tmux
)
Source: tmux wiki
tmux
allows me to run multiple terminal sessions that could be detached (sent to background) and reattached upon requirement. I use it to maintain persistent terminal sessions across multiple SSH clients.
Installation
|
|
Configuration
Here are some changes I’ve made to ~/.config/tmux/tmux.conf
.
- Changed the prefix key combination from
Ctrl+B
toCtrl+Space
because it is more ergonomic for me.
|
|
- Enabled mouse support because I want more control over window resizing.
|
|
- Set base index for windows to 1
|
|
- Added some custom key bindings for creating and switching between windows
|
|
- To install plugins for
tmux
I have installed tmux plugin manager ortpm
|
|
and added this line at the end of tmux.conf
|
|
Here are some of the plugins I’ve installed for tmux
- tmux-sensible: Helps me set custom key bindings for my workflow
- vim-tmux-navigator: Enables window navigation using vim keys (
h,j,k,l
) - tmux-resurrect: Using this I can save and restore my tmux sessions across reboots. I might switch to tmuxifier to define my tmux sessions in a file rather than saving and reloading them.
- tmux-yank: To copy text from tmux directly to the system’s clipboard.
To load your tmux configuration changes you can use the source
command
|
|
and to install plugins you have to use keybinding Ctrl+Space,i
.
Code Editor: Neovim (LazyVim)
Source: neovim.github.io
Neovim is a fork of VIM that could be used as a base to develop a Personalized Development Environment (PDE). It has multiple distributions but the one I’m using is LazyVim, a minimalist configuration for Neovim. It’s a distribution alternative to kickstart.nvim configuration.
Installation
|
|
Configuration
To install LazyVim follow the guide at lazyvim.org. I’ve made the following changes to LazyVim’s default configuration
- Toggled visibility of hidden files and folders in neo-tree (
~/.config/nvim/lua/plugins/neotree.lua
)
|
|
- Configured
vim-tmux-navigator
key bindings (~/.config/nvim/lua/plugins/vim-navigator.lua
)
|
|
Git Client: lazygit
Source: jesseduffield/lazygit
I like the Source control pane in the VScode and it has been my go-to client for all git operations. Going through my changes in the source control window allows me to review them before I commit to my repository. I opted for lazygit
as its alternative.
Source Control Pane in VSCode Sidebar
In its primary window, the lazygit
has an overview of changes performed after the last commit. It could be accessed directly from the Neovim using the key binding Space,g,g
.
Lazygit Window
I can perform git operations using a single button inside the lazygit window
- Stage all files:
a
- Stage current file:
Space
- Commit all staged changes:
c
- Pull changes to remote:
p
- Push changes to remote:
P
Installation
To install lazygit
in Fedora I had to add its Copr repository
|
|
Theme: Tokyo Night
On kitty, Neovim, and tmux I am using the Tokyo Night theme. The theme configuration for all of them is available at folke/tokyonight.nvim.
Terminal
Terminal Multiplexer (tmux)
Text Editor
UI for Source Control
All of my configuration files are available at bovem/dotfiles.
Thank you for taking the time to read this blog post! If you found this content valuable and would like to stay updated with my latest posts consider subscribing to my RSS Feed.
Resources
Visual Studio Code
VIM Plugin for VSCode
Obsidian
kitty terminal emulator
zsh
oh-my-zsh
JetBrains Mono
tmux
tmux plugin manager
tmux-sensible
vim-tmux-navigator
tmux-resurrect
tmuxifier
tmux-yank
Neovim
Lazyvim Installation Guide
folke/tokyonight.nvim