Skip to content

Commit

Permalink
Rename ExistingPane to NearestPane
Browse files Browse the repository at this point in the history
  • Loading branch information
oscardelben committed Apr 14, 2012
1 parent 55f6c1f commit 4f90d43
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions README.mkd
Expand Up @@ -131,12 +131,12 @@ Set the default position of the runner pane.
let VimuxOrientation = "h"
```

### VimuxUseExistingPane
Use exising pane (not used by vim) if found instead of running
### VimuxUseNearestPane
Use nearest pane (not used by vim) if found instead of running
split-window.
Useful if you always have two panes opened and you want Vimux to use the
existing one.

```viml
let VimuxUseExistingPane = 1
let VimuxUseNearestPane = 1
```
4 changes: 2 additions & 2 deletions doc/vimux.txt
Expand Up @@ -52,10 +52,10 @@ Options:
Default: "v"

------------------------------------------------------------------------------
2.3 g:VimuxUseExistingPane *VimuxConfiguration_use_existing_pane*
2.3 g:VimuxUseNearestPane *VimuxConfiguration_use_nearest_pane*

Use exising pane (not used by vim) if found instead of running split-window.

let VimuxUseExistingPane = 1
let VimuxUseNearestPane = 1

Default: 0
8 changes: 4 additions & 4 deletions plugin/vimux.vim
Expand Up @@ -130,9 +130,9 @@ class TmuxSession
def runner_pane
if @runner_pane.nil?
type = Vim.evaluate('exists("g:_VimTmuxInspecting")') != 0
use_existing_pane = Vim.evaluate('exists("g:VimuxUseExistingPane")') != 0
if use_existing_pane && existing_inactive_pane_id
_run("select-pane -t #{target(:pane => existing_inactive_pane_id)}")
use_nearest_pane = Vim.evaluate('exists("g:VimuxUseNearestPane")') != 0
if use_nearest_pane && nearest_inactive_pane_id
_run("select-pane -t #{target(:pane => nearest_inactive_pane_id)}")
else
_run("split-window -p #{height} #{orientation}")
end
Expand Down Expand Up @@ -167,7 +167,7 @@ class TmuxSession
end
end

def existing_inactive_pane_id
def nearest_inactive_pane_id
panes = _run("list-pane").split("\n")
pane = panes.find { |p| p !~ /active/ }
pane ? pane.split(':').first : nil
Expand Down

0 comments on commit 4f90d43

Please sign in to comment.