Land on window you chose like tmux's 'display-pane'
Vim script Ruby
Latest commit 7795149 Jun 10, 2016 @t9md committed on GitHub Merge pull request #30 from rafi/fix/neovim-truecolor
Use Neovim 0.1.4-acc5d08b new true-color setting
Permalink
Failed to load latest commit information.
autoload Use Neovim 0.1.4-acc5d08b new true-color setting Jun 10, 2016
doc s/an sample/a sample Sep 21, 2015
plugin refactoring done Mar 2, 2015
test cleanup Feb 27, 2015
README-JP.md broken link #17 Aug 30, 2015
README.md Minor readme fixes Jan 20, 2016
Rakefile up Dec 28, 2013
VERSION update Jan 20, 2015

README.md

日本語はこちら

Animated GIF

gif

Navigate to the window you choose

This plugin aims to mimic tmux's display-pane feature, which enables you to choose a window interactively.

This plugin should be especially useful when working on high resolution displays since with wide displays you are likely to open multiple windows and moving around windows with vim is cumbersome.

This plugin simplifies window navigation with the following functionality:

  1. Displays window label on statusline or middle of each window (overlay).
  2. Accepts window selection from user.
  3. Navigates to the specified window.

Example configuration:

" invoke with '-'
nmap  -  <Plug>(choosewin)

Optional configuration:

" if you want to use overlay feature
let g:choosewin_overlay_enable = 1

More configuration options are explained in the help file. See :help choosewin.

Default keymapings in choosewin mode

Key Action Description
0 tab_first Select FIRST tab
[ tab_prev Select PREVIOUS tab
] tab_next Select NEXT tab
$ tab_last Select LAST tab
x tab_close Close current tab
; win_land Navigate to current window
- previous Naviage to previous window
s swap Swap windows #1
S swap_stay Swap windows but stay #1
win_land Navigate to current window
Disable predefined keymap

*1 If you select 'swap' again, you will swap with the previous window's buffer ex) using the default keymap, typing double 's'(ss) swaps with the previous window.

Operational examples

Map - to invoke choosewin with the following command:

nmap - <Plug>(choosewin)

Move around tabs, and choose windows

First of all, open multiple windows and tabs.
Invoke choosewin by typing - in normal mode.
Then you can move around tabs by ] and [, or you cand choose the target tab directly by typing the number labeled in the tabline.
After you chose a target tab, you can choose a target window by typing the letter which is labeled in the statusline and in the middle of each window (if you have enabled the overlay feature).

Choose the previous window

Type - again to invoke choosewin, then input - again to choose the previous window. The previous window you were on before you choose the current window.

Swap windows

Type - to invoke choosewin, then type s to swap windows.
Then type the label of a window to swap content(=buffer) of that window with your current window.
After you chose, the current window's buffer is swapped with the buffer shown in the window you chose.
By combining "swap" and "previous window" features, you can easily swap any window with the previous window like so: -s-, invoking choosewin itself(-) then entering swapping mode(s), then instrucing choosewin to swap the target window with the previous(-) window. conguratulation!