sponsor Vim development Vim logo Vim Book Ad

TWcmd.vim : wincmd-style tab / window moving commands.

 script karma  Rating 29/8, Downloaded by 2215  Comments, bugs, improvements  Vim wiki

created by
Yoonsang Lee
 
script type
utility
 
description
More information : https://github.com/yssl/twcmd.vim

# twcmd.vim

twcmd.vim is a set of useful commands for moving & managing tabs and windows in vim.

- Move a tab / window
https://cloud.githubusercontent.com/assets/5915359/3844245/89017712-1e47-11e4-9f19-089d56a035d8.gif

- Stack visited windows and recover them when closing
https://cloud.githubusercontent.com/assets/5915359/3351949/c7c4c2d6-fa27-11e3-816a-f448657a5dba.gif

## Usage
In vim normal mode, type the following command and press `<Enter>`.  
**:TWcmd {cmd} {arg}**  
- {cmd} : sub-commands for tabs or windows
- {arg} : vim's `:wincmd`-style single character arguments

For example,
```
:TWcmd tcm l    |" go to the right tab
:TWcmd tmv l    |" move the current tab right
:TWcmd wmv h    |" move the current window left
:TWcmd tcm q    |" close current tab
```

## Commands

{cmd}   | description
---     | ---
tcm     | tab commands
tmv     | tab moving commands
wcm     | window commands
wmv     | window moving commands
wmvt    | window moving commands between tabs
twh     | tab-window history commands


For more information, please visit https://github.com/yssl/twcmd.vim.
 
install details
- Using plugin managers (recommended)
    - [Vundle] : Add `Bundle 'yssl/twcmd.vim'` to .vimrc & `:BundleInstall`
    - [NeoBundle] : Add `NeoBundle 'yssl/twcmd.vim'` to .vimrc & `:NeoBundleInstall`
    - [vim-plug] : Add `Plug 'yssl/twcmd.vim'` to .vimrc & `:PlugInstall`
- Using [Pathogen]
    - `cd ~/.vim/bundle; git clone https://github.com/yssl/twcmd.vim.git`
- Manual install (not recommended)
    - Download this plugin and extract it in `~/.vim/`
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
TWcmd.vim.zip 1.3.1 2020-10-07 7.0 Yoonsang Lee - Fix a bug when setting g:twcmd_focus_after_closing to 'none'
twcmd.vim.zip 1.3.0 2014-12-28 7.0 Yoonsang Lee - g:twcmd_restore_prevfocus has been changed to g:twcmd_focus_after_closing  which can be one of the string values, 'prev_win_curr_tab', 'prev_win_tab',or 'none'.
- change default focusing behavior to 'jump to the lastest window of the current tab'  when a window is closed. ('prev_win_curr_tab')
twcmd.zip 1.2.0 2014-08-07 7.0 Yoonsang Lee - change the name to twcmd.vim
TWCommand.zip 1.1.0 2014-06-22 7.0 Yoonsang Lee - add tab-window history stack feature
- update screencast
- update documents
TWCommand.zip 1.0.0 2014-02-28 7.0 Yoonsang Lee Initial upload
ip used for rating: 216.73.216.155

Questions about Vim should go to the maillist. Help Uganda.     Vim at Github