mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 07:50:05 +08:00
Merge pull request #1744 from wsdjeg/max_column
Imporve max_column options
This commit is contained in:
commit
0c423d7167
@ -49,14 +49,14 @@ function! SpaceVim#layers#ui#config() abort
|
|||||||
" Ui toggles
|
" Ui toggles
|
||||||
call SpaceVim#mapping#space#def('nnoremap', ['t', '8'], 'call call('
|
call SpaceVim#mapping#space#def('nnoremap', ['t', '8'], 'call call('
|
||||||
\ . string(s:_function('s:toggle_fill_column')) . ', [])',
|
\ . string(s:_function('s:toggle_fill_column')) . ', [])',
|
||||||
\ 'toggle-colorcolumn', 1)
|
\ 'highlight-long-lines', 1)
|
||||||
call SpaceVim#mapping#space#def('nnoremap', ['t', 'b'], 'call ToggleBG()',
|
call SpaceVim#mapping#space#def('nnoremap', ['t', 'b'], 'call ToggleBG()',
|
||||||
\ 'toggle background', 1)
|
\ 'toggle background', 1)
|
||||||
call SpaceVim#mapping#space#def('nnoremap', ['t', 't'], 'call SpaceVim#plugins#tabmanager#open()',
|
call SpaceVim#mapping#space#def('nnoremap', ['t', 't'], 'call SpaceVim#plugins#tabmanager#open()',
|
||||||
\ 'Open tabs manager', 1)
|
\ 'Open tabs manager', 1)
|
||||||
call SpaceVim#mapping#space#def('nnoremap', ['t', 'f'], 'call call('
|
call SpaceVim#mapping#space#def('nnoremap', ['t', 'f'], 'call call('
|
||||||
\ . string(s:_function('s:toggle_colorcolumn')) . ', [])',
|
\ . string(s:_function('s:toggle_colorcolumn')) . ', [])',
|
||||||
\ 'toggle-colorcolumn', 1)
|
\ 'fill-column-indicator', 1)
|
||||||
call SpaceVim#mapping#space#def('nnoremap', ['t', 'h', 'h'], 'set cursorline!',
|
call SpaceVim#mapping#space#def('nnoremap', ['t', 'h', 'h'], 'set cursorline!',
|
||||||
\ 'toggle highlight of the current line', 1)
|
\ 'toggle highlight of the current line', 1)
|
||||||
call SpaceVim#mapping#space#def('nnoremap', ['t', 'h', 'i'], 'call call('
|
call SpaceVim#mapping#space#def('nnoremap', ['t', 'h', 'i'], 'call call('
|
||||||
@ -136,7 +136,7 @@ else
|
|||||||
endif
|
endif
|
||||||
function! s:toggle_colorcolumn() abort
|
function! s:toggle_colorcolumn() abort
|
||||||
if !s:ccflag
|
if !s:ccflag
|
||||||
set cc=80
|
let &cc = g:spacevim_max_column
|
||||||
let s:ccflag = 1
|
let s:ccflag = 1
|
||||||
else
|
else
|
||||||
set cc=
|
set cc=
|
||||||
|
@ -401,23 +401,23 @@ let g:spacevim_guifont = 'DejaVu\ Sans\ Mono\ for\ Powerline\ 11'
|
|||||||
|
|
||||||
大多数界面元素可以通过快捷键来隐藏或者显示(这一组快捷键以 `t` 和 `T` 开头):
|
大多数界面元素可以通过快捷键来隐藏或者显示(这一组快捷键以 `t` 和 `T` 开头):
|
||||||
|
|
||||||
| 快捷键 | 描述 |
|
| 快捷键 | 描述 |
|
||||||
| ----------- | ----------------------------------- |
|
| ----------- | ----------------------------------------- |
|
||||||
| `SPC t 8` | 高亮所有超过80列的字符 |
|
| `SPC t 8` | 高亮所有超过80列的字符 |
|
||||||
| `SPC t f` | 高亮临界列,默认是第80列 |
|
| `SPC t f` | 高亮临界列,默认 `max_column` 是第 120 列 |
|
||||||
| `SPC t h h` | 高亮当前行 |
|
| `SPC t h h` | 高亮当前行 |
|
||||||
| `SPC t h i` | 高亮代码对齐线 |
|
| `SPC t h i` | 高亮代码对齐线 |
|
||||||
| `SPC t h c` | 高亮光标所在列 |
|
| `SPC t h c` | 高亮光标所在列 |
|
||||||
| `SPC t h s` | 启用/禁用语法高亮 |
|
| `SPC t h s` | 启用/禁用语法高亮 |
|
||||||
| `SPC t i` | 切换显示当前对齐(TODO) |
|
| `SPC t i` | 切换显示当前对齐(TODO) |
|
||||||
| `SPC t n` | 显示/隐藏行号 |
|
| `SPC t n` | 显示/隐藏行号 |
|
||||||
| `SPC t b` | 切换背景色 |
|
| `SPC t b` | 切换背景色 |
|
||||||
| `SPC t t` | 打开 Tab 管理器 |
|
| `SPC t t` | 打开 Tab 管理器 |
|
||||||
| `SPC T ~` | 显示/隐藏 buffer 结尾空行行首的 `~` |
|
| `SPC T ~` | 显示/隐藏 buffer 结尾空行行首的 `~` |
|
||||||
| `SPC T F` | 切换全屏(TODO) |
|
| `SPC T F` | 切换全屏(TODO) |
|
||||||
| `SPC T f` | 显示/隐藏 Vim 边框(GUI) |
|
| `SPC T f` | 显示/隐藏 Vim 边框(GUI) |
|
||||||
| `SPC T m` | 显示/隐藏菜单栏 |
|
| `SPC T m` | 显示/隐藏菜单栏 |
|
||||||
| `SPC T t` | 显示/隐藏工具栏 |
|
| `SPC T t` | 显示/隐藏工具栏 |
|
||||||
|
|
||||||
#### 状态栏 & 标签栏
|
#### 状态栏 & 标签栏
|
||||||
|
|
||||||
@ -1206,7 +1206,7 @@ Notes:
|
|||||||
FlyGrep 缓冲区的按键绑定:
|
FlyGrep 缓冲区的按键绑定:
|
||||||
|
|
||||||
Key Binding Description
|
Key Binding Description
|
||||||
\-----------\\ | -----------
|
\-----------\\ \| -----------
|
||||||
`<Esc>` | close FlyGrep buffer
|
`<Esc>` | close FlyGrep buffer
|
||||||
`<Enter>` | open file at the cursor line
|
`<Enter>` | open file at the cursor line
|
||||||
`<Tab>` | move cursor line down
|
`<Tab>` | move cursor line down
|
||||||
|
@ -326,7 +326,7 @@ Some UI indicators can be toggled on and off (toggles start with t and T):
|
|||||||
| Key Binding | Description |
|
| Key Binding | Description |
|
||||||
| ----------- | ----------------------------------------------------------------- |
|
| ----------- | ----------------------------------------------------------------- |
|
||||||
| `SPC t 8` | highlight any character past the 80th column |
|
| `SPC t 8` | highlight any character past the 80th column |
|
||||||
| `SPC t f` | display the fill column (by default the fill column is set to 80) |
|
| `SPC t f` | display the fill column (by default `max_column` is 120) |
|
||||||
| `SPC t h h` | toggle highlight of the current line |
|
| `SPC t h h` | toggle highlight of the current line |
|
||||||
| `SPC t h i` | toggle highlight indentation levels (TODO) |
|
| `SPC t h i` | toggle highlight indentation levels (TODO) |
|
||||||
| `SPC t h c` | toggle highlight indentation current column |
|
| `SPC t h c` | toggle highlight indentation current column |
|
||||||
|
Loading…
Reference in New Issue
Block a user