A Tmux plugin for loading tmux.conf written in Ruby (eRuby) notation.
What's eRuby?
- bash
- For script execution.
- You can use whatever you like as the default shell.
- git
- ruby:
- 2.7 or higher is required.
- tmux
- Create your
tmux.conf.erb
and place it.- By default, tmux-erb-parser loads all
*.erb
files in~/.config/tmux/
- Or you can change the load path. (Please see below.)
- Sample configuration file:
- By default, tmux-erb-parser loads all
- Install tmux-erb-parser and run tmux!
-
Put this at the bottom of
~/.tmux.conf
($XDG_CONFIG_HOME/tmux/tmux.conf
works too, but not your tmux.conf.erb!):setenv -g TMUX_CONF_EXT_PATH "path/to/tmux.conf.erb" # set your tmux.conf.erb's path # Note: You can specify multiple files using glob expressions. This is parsed by bash. set -g @plugin 'epaew/tmux-erb-parser' set -g @plugin 'tmux-plugins/tpm' # and list other plugins you want to install # Initialize Tmux plugin manager (keep this line at the very bottom of tmux.conf) run -b '~/.tmux/plugins/tpm/tpm'
-
Run tmux and press
Prefix + I
to install plugins!
-
Install:
- with git:
git clone https://github.com/epaew/tmux-erb-parser ~/.tmux/plugins/tmux-erb-parser
- from rubygems:
gem install tmux-erb-parser
- with git:
-
Configure:
- Put this in
~/.tmux.conf
($XDG_CONFIG_HOME/tmux/tmux.conf
works too, but not your tmux.conf.erb!):run -b 'path/to/bin/tmux-erb-parser --inline path/to/tmux.conf.erb'
- Put this in