VimuxOrientation option to set the inital orientation of the runner pane. Fixes #5

1.0.0rc1
benmills 12 years ago
parent c4a0836dfa
commit 359fb925b7

@ -118,8 +118,15 @@ Set the percent height of the runner pane opened by `RunVimTmuxCommand`.
let VimuxHeight = "50"
```
## Todo
### VimuxOrientation
Set the default position of the runner pane.
The features I would like to add in the near future.
**Acceptable Values:**
`"v"` Vertical
`"h"` Horizontal
* Add the ability to target any tmux session, window and pane
**Default: `"v"`**
```viml
let VimuxOrientation = "h"
```

@ -90,6 +90,14 @@ class TmuxSession
end
end
def orientation
if Vim.evaluate('exists("g:VimuxOrientation")') != 0 && ["h", "v"].include?(Vim.evaluate('g:VimuxOrientation'))
"-#{Vim.evaluate('g:VimuxOrientation')}"
else
"-v"
end
end
def inspect_runner
_run("select-pane -t #{target(:pane => runner_pane)}")
_run("copy-mode")
@ -121,7 +129,8 @@ class TmuxSession
def runner_pane
if @runner_pane.nil?
_run("split-window -p #{height}")
type = Vim.evaluate('exists("g:_VimTmuxInspecting")') != 0
_run("split-window -p #{height} #{orientation}")
@runner_pane = active_pane_id
Vim.command("let g:_VimTmuxRunnerPane = '#{@runner_pane}'")
end

Loading…
Cancel
Save