1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 20:10:05 +08:00

Added tmux layer

Added a tmux layer with default keybindings. Keybindings currently
conflict with other plugins.
This commit is contained in:
Camden Cheek 2017-02-18 17:50:45 -05:00
parent 9cb30a06c0
commit 363e716c74
3 changed files with 44 additions and 0 deletions

View File

@ -123,6 +123,7 @@ function! SpaceVim#default#SetPlugins() abort
call add(g:spacevim_plugin_groups, 'indents')
call add(g:spacevim_plugin_groups, 'navigation')
call add(g:spacevim_plugin_groups, 'misc')
call add(g:spacevim_plugin_groups, 'tmux')
call add(g:spacevim_plugin_groups, 'core')
call add(g:spacevim_plugin_groups, 'unite')

View File

@ -0,0 +1,29 @@
""
" @section tmux, layer-tmux
" @parentsection layers
" Adds integration between tmux and vim panes. Switch between panes
" seamlessly.
"
" @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|
==============================================================================
@ -679,6 +680,19 @@ 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.
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*