Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ Optional.

Command-line arguments to pass through to **vim**.

### TMUX_VIM_VIM_BIN

Optional, default is 'vim'.

The binary executable used to run **vim**. Useful if you're using
[MacVim](http://code.google.com/p/macvim/) and have another binary like `mvim`
which you'd like to use.

### TMUX_VIM_VIM_WIDTH

Optional, default is 80.
Expand Down
4 changes: 3 additions & 1 deletion tmux-vim
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# Configuration:
#
# TMUX_VIM_VIM_ARGS - command-line args to pass to vim (default none)
# TMUX_VIM_VIM_BIN - executable to use for vim (default vim)
# TMUX_VIM_VIM_WINDOW_WIDTH - how wide a single vim pane is (default 80)
# TMUX_VIM_VIM_WINDOW_COUNT - how many vim panes to create
#
Expand Down Expand Up @@ -181,10 +182,11 @@ _tmux_vim_start() {
fi

local vim_args=$TMUX_VIM_VIM_ARGS
local vim_bin=${TMUX_VIM_VIM_BIN:-vim}

# Split a new pane, start vim in it, and record the pane index
local tmux_vim_pane=$(tmux split-window -P -$split_method -l $split_size \
"exec vim $vim_args")
"exec $vim_bin $vim_args")

# Now convert the pane index into a global persistent id
# 0:1.1: [100x88] [history 0/10000, 0 bytes] %2
Expand Down