1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-04-14 23:49:19 +08:00

Merge pull request #272 from ccheek21/add_tmux

Add tmux layer
This commit is contained in:
Wang Shidong 2017-02-18 18:28:16 -06:00 committed by GitHub
commit 50dfaf59fa
2 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,31 @@
""
" @section tmux, layer-tmux
" @parentsection layers
" Adds integration between tmux and vim panes. Switch between panes
" seamlessly.
" This layer is not added by default. To include it, add
" `SpaceVim#layers#load('tmux')` to your `~/.SpaceVim.d/init.vim`
"
" @subsection mappings
" >
" Key Mode Function
" ------------------------------
" <C-h> normal Switch to pane in left direction
" <C-j> normal Switch to pane in down direction
" <C-k> normal Switch to pane in up direction
" <C-l> normal Switch to pane in right direction
" <
function! SpaceVim#layers#tmux#plugins() abort
let plugins = []
call add(plugins,['christoomey/vim-tmux-navigator'])
return plugins
endfunction
function! SpaceVim#layers#tmux#config() abort
let g:tmux_navigator_no_mappings = 1
nnoremap <silent> <C-h> :TmuxNavigateLeft<cr>
nnoremap <silent> <C-j> :TmuxNavigateDown<cr>
nnoremap <silent> <C-k> :TmuxNavigateUp<cr>
nnoremap <silent> <C-l> :TmuxNavigateRight<cr>
endfunction

View File

@ -37,6 +37,7 @@ CONTENTS *SpaceVim-contents*
15. lang#rust.................................|SpaceVim-layer-lang-rust|
16. lang#xml...................................|SpaceVim-layer-lang-xml|
17. shell.........................................|SpaceVim-layer-shell|
18. tmux...........................................|SpaceVim-layer-tmux|
5. FAQ........................................................|SpaceVim-faq|
==============================================================================
@ -689,6 +690,24 @@ SHELL *SpaceVim-layer-shell*
SpaceVim uses deol.nvim for shell support in neovim and uses vimshell for vim.
For more info, read |deol| and |vimshell|.
==============================================================================
TMUX *SpaceVim-layer-tmux*
Adds integration between tmux and vim panes. Switch between panes seamlessly.
This layer is not added by default. To include it, add
`SpaceVim#layers#load('tmux')` to your `~/.SpaceVim.d/init.vim`
MAPPINGS
>
Key Mode Function
------------------------------
<C-h> normal Switch to pane in left direction
<C-j> normal Switch to pane in down direction
<C-k> normal Switch to pane in up direction
<C-l> normal Switch to pane in right direction
<
==============================================================================
FAQ *SpaceVim-faq*