mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 00:40:05 +08:00
Added docs for tmux layer
This commit is contained in:
parent
a6f31290a0
commit
2dbd249963
@ -4,16 +4,19 @@
|
||||
" 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`
|
||||
" `SpaceVim#layers#load('tmux')` to your `~/.SpaceVim.d/init.vim`.
|
||||
" This layer currently overwrites some SpaceVim keybinds including multiple
|
||||
" cursors. If you are having issues with <C-h> in a neovim buffer, see
|
||||
" `https://github.com/neovim/neovim/issues/2048#issuecomment-78045837`
|
||||
"
|
||||
" @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
|
||||
" <C-h> normal Switch to vim/tmux pane in left direction
|
||||
" <C-j> normal Switch to vim/tmux pane in down direction
|
||||
" <C-k> normal Switch to vim/tmux pane in up direction
|
||||
" <C-l> normal Switch to vim/tmux pane in right direction
|
||||
" <
|
||||
|
||||
function! SpaceVim#layers#tmux#plugins() abort
|
||||
@ -24,8 +27,14 @@ 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>
|
||||
augroup custom_config
|
||||
au!
|
||||
au VimEnter * call s:customMappings()
|
||||
augroup END
|
||||
func s:customMappings()
|
||||
nnoremap <silent> <C-h> :TmuxNavigateLeft<cr>
|
||||
nnoremap <silent> <C-j> :TmuxNavigateDown<cr>
|
||||
nnoremap <silent> <C-k> :TmuxNavigateUp<cr>
|
||||
nnoremap <silent> <C-l> :TmuxNavigateRight<cr>
|
||||
endf
|
||||
endfunction
|
||||
|
@ -695,17 +695,20 @@ 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`
|
||||
`SpaceVim#layers#load('tmux')` to your `~/.SpaceVim.d/init.vim`. This layer
|
||||
currently overwrites some SpaceVim keybinds including multiple cursors. If you
|
||||
are having issues with <C-h> in a neovim buffer, see
|
||||
`https://github.com/neovim/neovim/issues/2048#issuecomment-78045837`
|
||||
|
||||
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
|
||||
<C-h> normal Switch to vim/tmux pane in left direction
|
||||
<C-j> normal Switch to vim/tmux pane in down direction
|
||||
<C-k> normal Switch to vim/tmux pane in up direction
|
||||
<C-l> normal Switch to vim/tmux pane in right direction
|
||||
<
|
||||
|
||||
==============================================================================
|
||||
|
Loading…
Reference in New Issue
Block a user