diff --git a/plugins/tmux/README.md b/plugins/tmux/README.md index aaa81aa17..a60de2b7b 100644 --- a/plugins/tmux/README.md +++ b/plugins/tmux/README.md @@ -15,18 +15,18 @@ The plugin also supports the following: ## Aliases -| Alias | Command | Description | -| ---------- | -------------------------- | -------------------------------------------------------- | -| `ta` | tmux attach -t | Attach new tmux session to already running named session | -| `tad` | tmux attach -d -t | Detach named tmux session | -| `tds` | `_tmux_directory_session` | Creates or attaches to a session for the current path | -| `tkss` | tmux kill-session -t | Terminate named running tmux session | -| `tksv` | tmux kill-server | Terminate all running tmux sessions | -| `tl` | tmux list-sessions | Displays a list of running tmux sessions | -| `to` | tmux new-session -A -s | Create or attach to a named tmux session | -| `tmux` | `_zsh_tmux_plugin_run` | Start a new tmux session | -| `tmuxconf` | `$EDITOR $ZSH_TMUX_CONFIG` | Open .tmux.conf file with an editor | -| `ts` | tmux new-session -s | Create a new named tmux session | +| Alias | Command | Description | +| ---------- | -------------------------------------- | -------------------------------------------------------- | +| `ta` | tmux attach -t | Attach new tmux session to already running named session | +| `tad` | tmux attach -d -t | Detach named tmux session | +| `tds` | `_tmux_directory_session` | Creates or attaches to a session for the current path | +| `tkss` | tmux kill-session -t | Terminate named running tmux session | +| `tksv` | tmux kill-server | Terminate all running tmux sessions | +| `tl` | tmux list-sessions | Displays a list of running tmux sessions | +| `to` | tmux new-session -A -s | Create or attach to a named tmux session | +| `tmux` | `_zsh_tmux_plugin_run` | Start a new tmux session | +| `tmuxconf` | `${(z)EDITOR:-vim} "$ZSH_TMUX_CONFIG"` | Open .tmux.conf file with an editor. | +| `ts` | tmux new-session -s | Create a new named tmux session | ## Configuration Variables diff --git a/plugins/tmux/tmux.plugin.zsh b/plugins/tmux/tmux.plugin.zsh index 8b2007575..fa0717054 100644 --- a/plugins/tmux/tmux.plugin.zsh +++ b/plugins/tmux/tmux.plugin.zsh @@ -77,7 +77,7 @@ function _build_tmux_alias { alias tksv='tmux kill-server' alias tl='tmux list-sessions' -alias tmuxconf='$EDITOR $ZSH_TMUX_CONFIG' +alias tmuxconf='${(z)EDITOR:-vim} "$ZSH_TMUX_CONFIG"' _build_tmux_alias "ta" "attach" "-t" _build_tmux_alias "tad" "attach -d" "-t"