Neovim and TMUX configuration management with symlinks
17.08.2024
If you're using neovim in conjunction with tmux, it's likely that you need a method to manage and maintain your preferred configuration.
Previously, I always kept my neovim configuration separate from my custom tmux configuration. However, I recently decided to simplify this process and came up with the idea of using symbolic links, or symlinks.
Typically, your neovim configuration is located at ~/.config/nvim/...
, while the tmux configuration is found at ~/.tmux/...
(with the default configuration file at ~/.tmux.conf
).
I decided that I wanted to house the tmux configuration file within my neovim directory. To accomplish this, there are two potential solutions:
- overwrite the path to the tmux configuration file
- add a symlink
I chose to proceed with the latter option.
To do this, add and commit your .tmux.conf
file in your neovim repository, then simply create a symlink:
cd ~
ln -s ~/.config/nvim/.tmux.conf ~/.tmux.conf
And there you have it - job done!
With such approach, you can easily extend this to other configuration files, such as ~/.bashrc
or ~/.zshrc
, and manage them all from a single repository. This method is particularly useful if you use the same configuration across multiple machines.
Daniel