mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-09 10:00:04 +08:00
Add option: escape_key_binding (#3599)
This commit is contained in:
parent
bed0d306ff
commit
7ff167ed42
@ -136,6 +136,25 @@ let g:spacevim_home_files_number = 6
|
|||||||
" <
|
" <
|
||||||
let g:spacevim_enable_guicolors = 0
|
let g:spacevim_enable_guicolors = 0
|
||||||
|
|
||||||
|
""
|
||||||
|
" @section escape_key_binding, options-escape_key_binding
|
||||||
|
" @parentsection options
|
||||||
|
" Set the key binding for switch to normal mode in insert mode.
|
||||||
|
" Default is `jk`, to disable this key binding, set this option to empty
|
||||||
|
" string.
|
||||||
|
" >
|
||||||
|
" escape_key_binding = 'jk'
|
||||||
|
" <
|
||||||
|
|
||||||
|
""
|
||||||
|
" Set the key binding for switch to normal mode in insert mode.
|
||||||
|
" Default is `jk`, to disable this key binding, set this option to empty
|
||||||
|
" string.
|
||||||
|
" >
|
||||||
|
" let g:spacevim_escape_key_binding = 'jk'
|
||||||
|
" <
|
||||||
|
let g:spacevim_escape_key_binding = 'jk'
|
||||||
|
|
||||||
""
|
""
|
||||||
" @section enable_googlesuggest, options-enable_googlesuggest
|
" @section enable_googlesuggest, options-enable_googlesuggest
|
||||||
" @parentsection options
|
" @parentsection options
|
||||||
@ -1195,6 +1214,11 @@ function! SpaceVim#end() abort
|
|||||||
cnoremap <C-b> <Left>
|
cnoremap <C-b> <Left>
|
||||||
" @bug_vim with <silent> command line can not be cleared
|
" @bug_vim with <silent> command line can not be cleared
|
||||||
cnoremap <expr> <C-k> repeat('<Delete>', strchars(getcmdline()) - getcmdpos() + 1)
|
cnoremap <expr> <C-k> repeat('<Delete>', strchars(getcmdline()) - getcmdpos() + 1)
|
||||||
|
|
||||||
|
"Use escape_key_binding switch to normal mode
|
||||||
|
if !empty(g:spacevim_escape_key_binding)
|
||||||
|
exe printf('inoremap %s <esc>', g:spacevim_escape_key_binding)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
call SpaceVim#server#connect()
|
call SpaceVim#server#connect()
|
||||||
|
|
||||||
|
@ -209,9 +209,6 @@ function! SpaceVim#default#keyBindings() abort
|
|||||||
nnoremap <silent><C-Down> :<C-u>wincmd j<CR>
|
nnoremap <silent><C-Down> :<C-u>wincmd j<CR>
|
||||||
|
|
||||||
|
|
||||||
"Use jk switch to normal mode
|
|
||||||
inoremap jk <esc>
|
|
||||||
|
|
||||||
"]<End> or ]<Home> move current line to the end or the begin of current buffer
|
"]<End> or ]<Home> move current line to the end or the begin of current buffer
|
||||||
nnoremap <silent>]<End> ddGp``
|
nnoremap <silent>]<End> ddGp``
|
||||||
nnoremap <silent>]<Home> ddggP``
|
nnoremap <silent>]<Home> ddggP``
|
||||||
|
@ -43,32 +43,33 @@ CONTENTS *SpaceVim-contents*
|
|||||||
23. enable_vimfiler_welcome...|SpaceVim-options-enable_vimfiler_welcome|
|
23. enable_vimfiler_welcome...|SpaceVim-options-enable_vimfiler_welcome|
|
||||||
24. enable_ycm.............................|SpaceVim-options-enable_ycm|
|
24. enable_ycm.............................|SpaceVim-options-enable_ycm|
|
||||||
25. error_symbol.........................|SpaceVim-options-error_symbol|
|
25. error_symbol.........................|SpaceVim-options-error_symbol|
|
||||||
26. filemanager...........................|SpaceVim-options-filemanager|
|
26. escape_key_binding.............|SpaceVim-options-escape_key_binding|
|
||||||
27. filetree_direction.............|SpaceVim-options-filetree_direction|
|
27. filemanager...........................|SpaceVim-options-filemanager|
|
||||||
28. guifont...................................|SpaceVim-options-guifont|
|
28. filetree_direction.............|SpaceVim-options-filetree_direction|
|
||||||
29. home_files_number...............|SpaceVim-options-home_files_number|
|
29. guifont...................................|SpaceVim-options-guifont|
|
||||||
30. info_symbol...........................|SpaceVim-options-info_symbol|
|
30. home_files_number...............|SpaceVim-options-home_files_number|
|
||||||
31. keep_server_alive...............|SpaceVim-options-keep_server_alive|
|
31. info_symbol...........................|SpaceVim-options-info_symbol|
|
||||||
32. language.................................|SpaceVim-options-language|
|
32. keep_server_alive...............|SpaceVim-options-keep_server_alive|
|
||||||
33. lint_on_the_fly...................|SpaceVim-options-lint_on_the_fly|
|
33. language.................................|SpaceVim-options-language|
|
||||||
34. max_column.............................|SpaceVim-options-max_column|
|
34. lint_on_the_fly...................|SpaceVim-options-lint_on_the_fly|
|
||||||
35. plugin_bundle_dir...............|SpaceVim-options-plugin_bundle_dir|
|
35. max_column.............................|SpaceVim-options-max_column|
|
||||||
36. plugin_manager_processes.|SpaceVim-options-plugin_manager_processes|
|
36. plugin_bundle_dir...............|SpaceVim-options-plugin_bundle_dir|
|
||||||
37. realtime_leader_guide.......|SpaceVim-options-realtime_leader_guide|
|
37. plugin_manager_processes.|SpaceVim-options-plugin_manager_processes|
|
||||||
38. relativenumber.....................|SpaceVim-options-relativenumber|
|
38. realtime_leader_guide.......|SpaceVim-options-realtime_leader_guide|
|
||||||
39. retry_cnt...............................|SpaceVim-options-retry_cnt|
|
39. relativenumber.....................|SpaceVim-options-relativenumber|
|
||||||
40. sidebar_width.......................|SpaceVim-options-sidebar_width|
|
40. retry_cnt...............................|SpaceVim-options-retry_cnt|
|
||||||
41. snippet_engine.....................|SpaceVim-options-snippet_engine|
|
41. sidebar_width.......................|SpaceVim-options-sidebar_width|
|
||||||
42. statusline_iseparator.......|SpaceVim-options-statusline_iseparator|
|
42. snippet_engine.....................|SpaceVim-options-snippet_engine|
|
||||||
43. statusline_left_sections.|SpaceVim-options-statusline_left_sections|
|
43. statusline_iseparator.......|SpaceVim-options-statusline_iseparator|
|
||||||
44. statusline_separator.........|SpaceVim-options-statusline_separator|
|
44. statusline_left_sections.|SpaceVim-options-statusline_left_sections|
|
||||||
45. terminal_cursor_shape.......|SpaceVim-options-terminal_cursor_shape|
|
45. statusline_separator.........|SpaceVim-options-statusline_separator|
|
||||||
46. vim_help_language...............|SpaceVim-options-vim_help_language|
|
46. terminal_cursor_shape.......|SpaceVim-options-terminal_cursor_shape|
|
||||||
47. vimcompatible.......................|SpaceVim-options-vimcompatible|
|
47. vim_help_language...............|SpaceVim-options-vim_help_language|
|
||||||
48. warning_symbol.....................|SpaceVim-options-warning_symbol|
|
48. vimcompatible.......................|SpaceVim-options-vimcompatible|
|
||||||
49. windows_index_type.............|SpaceVim-options-windows_index_type|
|
49. warning_symbol.....................|SpaceVim-options-warning_symbol|
|
||||||
50. windows_leader.....................|SpaceVim-options-windows_leader|
|
50. windows_index_type.............|SpaceVim-options-windows_index_type|
|
||||||
51. windows_smartclose.............|SpaceVim-options-windows_smartclose|
|
51. windows_leader.....................|SpaceVim-options-windows_leader|
|
||||||
|
52. windows_smartclose.............|SpaceVim-options-windows_smartclose|
|
||||||
3. Configuration...........................................|SpaceVim-config|
|
3. Configuration...........................................|SpaceVim-config|
|
||||||
4. Commands..............................................|SpaceVim-commands|
|
4. Commands..............................................|SpaceVim-commands|
|
||||||
5. Functions............................................|SpaceVim-functions|
|
5. Functions............................................|SpaceVim-functions|
|
||||||
@ -418,6 +419,15 @@ Set the error symbol for SpaceVim's syntax maker. Default is '✖'.
|
|||||||
error_symbol = "+"
|
error_symbol = "+"
|
||||||
<
|
<
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
ESCAPE_KEY_BINDING *SpaceVim-options-escape_key_binding*
|
||||||
|
|
||||||
|
Set the key binding for switch to normal mode in insert mode. Default is `jk`,
|
||||||
|
to disable this key binding, set this option to empty string.
|
||||||
|
>
|
||||||
|
escape_key_binding = 'jk'
|
||||||
|
<
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
FILEMANAGER *SpaceVim-options-filemanager*
|
FILEMANAGER *SpaceVim-options-filemanager*
|
||||||
|
|
||||||
@ -715,6 +725,13 @@ Enable true color support in terminal. Default is 0.
|
|||||||
let g:spacevim_enable_guicolors = 1
|
let g:spacevim_enable_guicolors = 1
|
||||||
<
|
<
|
||||||
|
|
||||||
|
*g:spacevim_escape_key_binding*
|
||||||
|
Set the key binding for switch to normal mode in insert mode. Default is `jk`,
|
||||||
|
to disable this key binding, set this option to empty string.
|
||||||
|
>
|
||||||
|
let g:spacevim_escape_key_binding = 'jk'
|
||||||
|
<
|
||||||
|
|
||||||
*g:spacevim_enable_googlesuggest*
|
*g:spacevim_enable_googlesuggest*
|
||||||
Enable/Disable Google suggestions for neocomplete. Default is 0.
|
Enable/Disable Google suggestions for neocomplete. Default is 0.
|
||||||
>
|
>
|
||||||
|
@ -325,6 +325,12 @@ The different key bindings between SpaceVim and origin vim are shown as below.
|
|||||||
windows_smartclose = ''
|
windows_smartclose = ''
|
||||||
```
|
```
|
||||||
|
|
||||||
|
- The `jk` key has been mapped to `<Esc>` in insert mode. To disable this key binding, set `escape_key_binding` to empty string.
|
||||||
|
```toml
|
||||||
|
[options]
|
||||||
|
escape_key_binding = ''
|
||||||
|
```
|
||||||
|
|
||||||
- The `Ctrl-a` binding on the command line can auto-complete variable names, but in SpaceVim it moves to the cursor to the beginning of the command line.
|
- The `Ctrl-a` binding on the command line can auto-complete variable names, but in SpaceVim it moves to the cursor to the beginning of the command line.
|
||||||
- The `Ctrl-b` binding on the command line is mapped to `<Left>`, which will move cursor to the left.
|
- The `Ctrl-b` binding on the command line is mapped to `<Left>`, which will move cursor to the left.
|
||||||
- The `Ctrl-f` binding on the command line is mapped to `<Right>`, which will move cursor to the right.
|
- The `Ctrl-f` binding on the command line is mapped to `<Right>`, which will move cursor to the right.
|
||||||
|
Loading…
Reference in New Issue
Block a user