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

Remove key binding <Tab> (#3818)

This commit is contained in:
Wang Shidong 2020-09-18 22:45:27 +08:00 committed by GitHub
parent 0e51084af1
commit a2ae25aac6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 20 deletions

View File

@ -1216,10 +1216,6 @@ command -nargs=1 LeaderGuide call SpaceVim#mapping#guide#start_by_prefix('0', <a
command -range -nargs=1 LeaderGuideVisual call SpaceVim#mapping#guide#start_by_prefix('1', <args>)
function! SpaceVim#end() abort
if !g:spacevim_vimcompatible
call SpaceVim#mapping#def('nnoremap <silent>', '<Tab>', ':wincmd w<CR>', 'Switch to next window or tab','wincmd w')
call SpaceVim#mapping#def('nnoremap <silent>', '<S-Tab>', ':wincmd p<CR>', 'Switch to previous window or tab','wincmd p')
endif
if g:spacevim_vimcompatible
let g:spacevim_windows_leader = ''
let g:spacevim_windows_smartclose = ''

View File

@ -149,6 +149,7 @@ function! SpaceVim#layers#core#config() abort
call SpaceVim#mapping#space#def('nnoremap', ['j', 'u'], 'call call('
\ . string(s:_function('s:jump_to_url')) . ', [])',
\ 'jump-to-url', 1)
call SpaceVim#mapping#def('nnoremap <silent>', '<S-Tab>', ':wincmd p<CR>', 'Switch to previous window or tab','wincmd p')
call SpaceVim#mapping#space#def('nnoremap', ['<Tab>'], 'try | b# | catch | endtry', 'last-buffer', 1)
let lnum = expand('<slnum>') + s:lnum - 1
call SpaceVim#mapping#space#def('nnoremap', ['b', '.'], 'call call('

View File

@ -1094,8 +1094,7 @@ SpaceVim 选项 `window_leader` 的值来设为其它按键:
| `[Window] x` | 关闭当前缓冲区,并保留新的空白缓冲区 |
| `[Window] q` | 关闭当前缓冲区 |
| `[Window] Q` | 关闭当前窗口 |
| `<Tab>` | 跳至下一个窗口 |
| `Shift-<Tab>` | 跳至上一个窗口 |
| `Shift-<Tab>` | 切换至前一窗口 |
常规模式下的按键 `q` 被用来快速关闭窗口,其原生的功能可以使用 `<Leader> q r` 来代替。

View File

@ -1133,20 +1133,19 @@ can change it via `windows_leader` option:
windows_leader = "s"
```
| Key Bindings | Descriptions |
| ------------ | ------------------------------------- |
| `q` | Smart buffer close |
| `WIN v` | :split |
| `WIN V` | Split with previous buffer |
| `WIN g` | :vsplit |
| `WIN G` | Vertically split with previous buffer |
| `WIN t` | Open new tab (:tabnew) |
| `WIN o` | Close other windows (:only) |
| `WIN x` | Remove buffer, leave blank window |
| `WIN q` | Remove current buffer |
| `WIN Q` | Close current buffer (:close) |
| `<Tab>` | Next window or tab |
| `Shift-Tab` | Previous window or tab |
| Key Bindings | Descriptions |
| ------------ | -------------------------------------------------- |
| `q` | Smart buffer close |
| `WIN v` | :split |
| `WIN V` | Split with previous buffer |
| `WIN g` | :vsplit |
| `WIN G` | Vertically split with previous buffer |
| `WIN t` | Open new tab (:tabnew) |
| `WIN o` | Close other windows (:only) |
| `WIN x` | Remove buffer, leave blank window |
| `WIN q` | Remove current buffer |
| `WIN Q` | Close current buffer (:close) |
| `Shift-Tab` | Switch to alternate window (switch back and forth) |
SpaceVim has mapped normal `q` as smart buffer close, the normal func of `q`
can be get by `<Leader> q r`, if you want to disable this feature, you can use `vimcompatible` mode.