mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-02 22:30:04 +08:00
Update doc for vimcompatible (#3453)
This commit is contained in:
parent
ffd489c982
commit
a4fe1351db
@ -805,6 +805,10 @@ let g:spacevim_checkinstall = 1
|
||||
" >
|
||||
" q smart quit windows
|
||||
" s windows key bindings leader
|
||||
" , language specific leader
|
||||
" <C-a> move cursor to beginning in command line mode
|
||||
" <C-b> move cursor to left in command line mode
|
||||
" <C-f> move cursor to right in command line mode
|
||||
" <C-x> switch buffer
|
||||
" <
|
||||
|
||||
@ -820,6 +824,10 @@ let g:spacevim_checkinstall = 1
|
||||
" >
|
||||
" q smart quit windows
|
||||
" s windows key bindings leader
|
||||
" , language specific leader
|
||||
" <C-a> move cursor to beginning in command line mode
|
||||
" <C-b> move cursor to left in command line mode
|
||||
" <C-f> move cursor to right in command line mode
|
||||
" <C-x> switch buffer
|
||||
" <
|
||||
let g:spacevim_vimcompatible = 0
|
||||
|
@ -598,6 +598,10 @@ Includes:
|
||||
>
|
||||
q smart quit windows
|
||||
s windows key bindings leader
|
||||
, language specific leader
|
||||
<C-a> move cursor to beginning in command line mode
|
||||
<C-b> move cursor to left in command line mode
|
||||
<C-f> move cursor to right in command line mode
|
||||
<C-x> switch buffer
|
||||
<
|
||||
|
||||
@ -982,6 +986,10 @@ Includes:
|
||||
>
|
||||
q smart quit windows
|
||||
s windows key bindings leader
|
||||
, language specific leader
|
||||
<C-a> move cursor to beginning in command line mode
|
||||
<C-b> move cursor to left in command line mode
|
||||
<C-f> move cursor to right in command line mode
|
||||
<C-x> switch buffer
|
||||
<
|
||||
|
||||
|
@ -295,13 +295,31 @@ endfunction
|
||||
|
||||
以下为 SpaceVim 中与 Vim 默认情况下的一些差异。
|
||||
|
||||
- Noraml 模式下 `s` 按键不再删除光标下的字符,在 SpaceVim 中,
|
||||
它是窗口相关快捷键的前缀(可以在配置文件中设置成其它按键)。
|
||||
如果希望恢复 `s` 按键原先的功能,可以通过 `windows_leader = ""` 将窗口前缀键设为空字符串来禁用这一功能。
|
||||
- Normal 模式下 `,` 按键在 Vim 默认情况下是重复上一次的 `f`、`F`、`t` 和 `T` 按键,但在 SpaceVim 中默认被用作为语言专用的前缀键。如果需要禁用此选项,
|
||||
- 按键 `s` 是删除光标下的字符,但是在 SpaceVim 中,
|
||||
它是**Normal**模式窗口快捷键的前缀,这一功能可以使用选项 `windows_leader` 来修改,默认是 `s`。
|
||||
如果需要使用按键 `s` 的原生功能,可以将该选项设置为空。
|
||||
|
||||
```toml
|
||||
[options]
|
||||
windows_leader = ''
|
||||
```
|
||||
|
||||
- 按键 `,` 是重复上一次的搜索 `f`、`F`、`t` 和 `T` ,但在 SpaceVim 中默认被用作为语言专用的前缀键。如果需要禁用此选项,
|
||||
可设置 `enable_language_specific_leader = false`。
|
||||
- Normal 模式下 `q` 按键在 SpaceVim 中被设置为了智能关闭窗口,
|
||||
即大多数情况下按下 `q` 键即可关闭当前窗口。可以通过 `windows_smartclose = ""` 使用一个空字符串来禁用这一功能,或修改为其它按键。
|
||||
|
||||
```toml
|
||||
[options]
|
||||
enable_language_specific_leader = false
|
||||
```
|
||||
|
||||
- 按键 `q` 是录制宏,但是在 SpaceVim 中被设置为了智能关闭窗口,设置该功能的选项是 `windows_smartclose`,默认值是 `q`,
|
||||
可以通过将该选项设置成空字符串来禁用该功能,同时也可以设置成其他按键。
|
||||
|
||||
```toml
|
||||
[options]
|
||||
windows_smartclose = ''
|
||||
```
|
||||
|
||||
- 命令行模式下 `Ctrl-a` 按键在 SpaceVim 中被修改为了移动光标至命令行行首。
|
||||
- 命令行模式下 `Ctrl-b` 按键被映射为方向键 `<Left>`, 用以向左移动光标。
|
||||
- 命令行模式下 `Ctrl-f` 按键被映射为方向键 `<Right>`, 用以向右移动光标。
|
||||
|
@ -297,21 +297,37 @@ endfunction
|
||||
|
||||
The different key bindings between SpaceVim and origin vim are shown as below.
|
||||
|
||||
- The `s` key does replace cursor char, but in SpaceVim it is the `Window` key bindings specific leader key by default (which can be set on another key binding in dotfile). If you still prefer the origin function of `s`, you can use an empty string to disable this feature.
|
||||
- The `s` key does replace cursor char, but in SpaceVim it is the `Window` key
|
||||
bindings specific leader in **Normal** mode. This leader change be changed via
|
||||
`windows_leader` option which use `s` as default variable. If you still prefer the origin function of `s`,
|
||||
you can use an empty string to disable this feature.
|
||||
|
||||
The option is `windows_leader`, default value is `s`.
|
||||
```toml
|
||||
[options]
|
||||
windows_leader = ''
|
||||
```
|
||||
|
||||
- The `,` key does repeat last `f`, `F`, `t` and `T` in vim, but in SpaceVim it is the language specified Leader key.
|
||||
To disable this feature, set the option `enable_language_specific_leader` to `false`.
|
||||
|
||||
The option is `enable_language_specific_leader`, default value is `1`.
|
||||
```toml
|
||||
[options]
|
||||
enable_language_specific_leader = false
|
||||
```
|
||||
|
||||
- The `q` key does recording, but in SpaceVim it is used for closing window smart. If you still prefer the origin function of `q`, you can use an empty string to disable this feature.
|
||||
- The `q` key does recording, but in SpaceVim it is used to close current window.
|
||||
The option for setting key binding to close current window is `windows_smartclose`,
|
||||
and the default valuable is `q`.
|
||||
If you prefer to use the origin function of `q`, you can use an empty string to disable this feature.
|
||||
|
||||
The option is `windows_smartclose`, default value is `q`.
|
||||
```toml
|
||||
[options]
|
||||
windows_smartclose = ''
|
||||
```
|
||||
|
||||
- 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.
|
||||
- `Ctrl-b` in command line mode is mapped to `<Left>`, which will move cursor to the left.
|
||||
- `Ctrl-f` in command line mode is mapped to `<Right>`, which will move cursor to the right.
|
||||
- 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.
|
||||
|
||||
SpaceVim provides a vimcompatible mode, in vimcompatible mode, all the differences above will disappear.
|
||||
You can enable the vimcompatible mode via adding `vimcompatible = true` to `[options]` section.
|
||||
@ -321,7 +337,7 @@ For example, in order to disable language specific leader, you may add the follo
|
||||
|
||||
```toml
|
||||
[options]
|
||||
enable_language_specific_leader = false
|
||||
enable_language_specific_leader = false
|
||||
```
|
||||
|
||||
[Send a PR](http://spacevim.org/development/) to add the differences you found in this section.
|
||||
@ -1686,6 +1702,7 @@ here is an example of `.project_alt.json`:
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Bookmarks management
|
||||
|
||||
Bookmarks manager is included in `tools` layer, to use following key bindings, you need to enable
|
||||
@ -1734,15 +1751,14 @@ then pressing `SPC p t r` shows the following list:
|
||||
|
||||
![task-auto-detection](https://user-images.githubusercontent.com/13142418/75089003-471d2c80-558f-11ea-8aea-cbf7417191d9.png)
|
||||
|
||||
|
||||
#### Task provider
|
||||
|
||||
Some tasks can be automatically detected by task provider. For example,
|
||||
a Task Provider could check if there is a specific build file, such as `package.json`,
|
||||
and create npm tasks.
|
||||
and create npm tasks.
|
||||
|
||||
To build a task provider, you need to use Bootstrap function. The task provider should be a vim function.
|
||||
and return a task object.
|
||||
and return a task object.
|
||||
|
||||
here is an example for building task provider.
|
||||
|
||||
@ -1991,7 +2007,6 @@ Custom sign symbol:
|
||||
| `<Leader> q n` | jump to next item in quickfix list |
|
||||
| `<Leader> q p` | jump to previous item in quickfix list |
|
||||
|
||||
|
||||
### EditorConfig
|
||||
|
||||
SpaceVim has supported [EditorConfig](http://editorconfig.org/), a configuration file to “define and maintain consistent coding styles between different editors and IDEs.”
|
||||
@ -2014,8 +2029,6 @@ Use `svc` to open a file in the existing Vim server, or use `nsvc` to open a fil
|
||||
|
||||
![server-and-client](https://user-images.githubusercontent.com/13142418/32554968-7164fe9c-c4d6-11e7-95f7-f6a6ea75e05b.gif)
|
||||
|
||||
|
||||
|
||||
<!-- SpaceVim Achievements start -->
|
||||
|
||||
## Achievements
|
||||
|
Loading…
Reference in New Issue
Block a user