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

Add option for restore q key

This commit is contained in:
wsdjeg 2018-01-14 23:48:44 +08:00
parent 7d1172600b
commit 65efdb7f4c
6 changed files with 16 additions and 4 deletions

View File

@ -22,7 +22,7 @@ Please star the project on github - it is a great way to show your appreciation
![welcome-page](https://user-images.githubusercontent.com/13142418/33793078-3446cb6e-dc76-11e7-9998-376a355557a4.png)
See the [documentation](https://spacevim.org/documentation) or [the list of layers](http://spacevim.org/layers/) for more information.
See the [Quick start guide](https://spacevim.org/quick-start-guide), [documentation](https://spacevim.org/documentation) or [the list of layers](http://spacevim.org/layers/) for more information.
Here is a throughput graph of the repository for the last few weeks:

View File

@ -382,6 +382,9 @@ let g:spacevim_plugin_groups = []
" fuzzy find the repo you want.
let g:spacevim_github_username = ''
""
" Set the default key for smart close windows, default is `q`.
let g:spacevim_windows_smartclose = 'q'
""
" Disable plugins by name.
" >
" let g:spacevim_disabled_plugins = ['vim-foo', 'vim-bar']

View File

@ -294,9 +294,6 @@ function! SpaceVim#default#SetMappings() abort
\ 'Copy buffer absolute path to X11 clipboard','call zvim#util#CopyToClipboard()')
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')
call SpaceVim#mapping#def('nnoremap <silent>', 'q', ':<C-u>call zvim#util#SmartClose()<cr>',
\ 'Smart close windows',
\ 'call zvim#util#SmartClose()')
endfunction
fu! s:tobur(num) abort

View File

@ -30,6 +30,11 @@ function! SpaceVim#layers#ui#config() abort
let g:signify_disable_by_default = 0
let g:signify_line_highlight = 0
noremap <silent> <F2> :silent TagbarToggle<CR>
if empty(g:spacevim_windows_smartclose)
call SpaceVim#mapping#def('nnoremap <silent>', g:spacevim_windows_smartclose, ':<C-u>call zvim#util#SmartClose()<cr>',
\ 'Smart close windows',
\ 'call zvim#util#SmartClose()')
endif
" Ui toggles
call SpaceVim#mapping#space#def('nnoremap', ['t', '8'], 'call call('
\ . string(s:_function('s:toggle_fill_column')) . ', [])',

View File

@ -406,6 +406,9 @@ Plugin groups to be loaded.
Set the github username, It will be used for getting your starred repos, and
fuzzy find the repo you want.
*g:spacevim_windows_smartclose*
Set the default key for smart close windows, default is `q`.
*g:spacevim_disabled_plugins*
Disable plugins by name.
>

View File

@ -376,6 +376,10 @@ the option is `g:spacevim_windows_leader`, defalut value is `s`.
the option is `g:spacevim_enable_language_specific_leader`, defalut value is 1.
- The `q` key does recording, but in SpaceVim it is used for smart close window.
the option is `g:spacevim_windows_smartclose`, defalut value is `q`. If you still prefer the origin function of `q`, you can use an empty string to disable this feature.
[Send a PR](http://spacevim.org/development/) to add the differences you found in this section.
## Awesome ui