From f1ce1fe6a80a1d60f4c0c01157cf5f8aadd97a5b Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Tue, 22 May 2018 21:39:24 +0800 Subject: [PATCH] Imporve max_column options close #1733 --- autoload/SpaceVim/layers/ui.vim | 6 +++--- docs/cn/documentation.md | 36 ++++++++++++++++----------------- docs/documentation.md | 2 +- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/autoload/SpaceVim/layers/ui.vim b/autoload/SpaceVim/layers/ui.vim index ee44b9742..3a75f618c 100644 --- a/autoload/SpaceVim/layers/ui.vim +++ b/autoload/SpaceVim/layers/ui.vim @@ -49,14 +49,14 @@ function! SpaceVim#layers#ui#config() abort " Ui toggles call SpaceVim#mapping#space#def('nnoremap', ['t', '8'], 'call call(' \ . string(s:_function('s:toggle_fill_column')) . ', [])', - \ 'toggle-colorcolumn', 1) + \ 'highlight-long-lines', 1) call SpaceVim#mapping#space#def('nnoremap', ['t', 'b'], 'call ToggleBG()', \ 'toggle background', 1) call SpaceVim#mapping#space#def('nnoremap', ['t', 't'], 'call SpaceVim#plugins#tabmanager#open()', \ 'Open tabs manager', 1) call SpaceVim#mapping#space#def('nnoremap', ['t', 'f'], 'call call(' \ . string(s:_function('s:toggle_colorcolumn')) . ', [])', - \ 'toggle-colorcolumn', 1) + \ 'fill-column-indicator', 1) call SpaceVim#mapping#space#def('nnoremap', ['t', 'h', 'h'], 'set cursorline!', \ 'toggle highlight of the current line', 1) call SpaceVim#mapping#space#def('nnoremap', ['t', 'h', 'i'], 'call call(' @@ -136,7 +136,7 @@ else endif function! s:toggle_colorcolumn() abort if !s:ccflag - set cc=80 + let &cc = g:spacevim_max_column let s:ccflag = 1 else set cc= diff --git a/docs/cn/documentation.md b/docs/cn/documentation.md index 5f509db89..cca44ee4b 100644 --- a/docs/cn/documentation.md +++ b/docs/cn/documentation.md @@ -401,23 +401,23 @@ let g:spacevim_guifont = 'DejaVu\ Sans\ Mono\ for\ Powerline\ 11' 大多数界面元素可以通过快捷键来隐藏或者显示(这一组快捷键以 `t` 和 `T` 开头): -| 快捷键 | 描述 | -| ----------- | ----------------------------------- | -| `SPC t 8` | 高亮所有超过80列的字符 | -| `SPC t f` | 高亮临界列,默认是第80列 | -| `SPC t h h` | 高亮当前行 | -| `SPC t h i` | 高亮代码对齐线 | -| `SPC t h c` | 高亮光标所在列 | -| `SPC t h s` | 启用/禁用语法高亮 | -| `SPC t i` | 切换显示当前对齐(TODO) | -| `SPC t n` | 显示/隐藏行号 | -| `SPC t b` | 切换背景色 | -| `SPC t t` | 打开 Tab 管理器 | -| `SPC T ~` | 显示/隐藏 buffer 结尾空行行首的 `~` | -| `SPC T F` | 切换全屏(TODO) | -| `SPC T f` | 显示/隐藏 Vim 边框(GUI) | -| `SPC T m` | 显示/隐藏菜单栏 | -| `SPC T t` | 显示/隐藏工具栏 | +| 快捷键 | 描述 | +| ----------- | ----------------------------------------- | +| `SPC t 8` | 高亮所有超过80列的字符 | +| `SPC t f` | 高亮临界列,默认 `max_column` 是第 120 列 | +| `SPC t h h` | 高亮当前行 | +| `SPC t h i` | 高亮代码对齐线 | +| `SPC t h c` | 高亮光标所在列 | +| `SPC t h s` | 启用/禁用语法高亮 | +| `SPC t i` | 切换显示当前对齐(TODO) | +| `SPC t n` | 显示/隐藏行号 | +| `SPC t b` | 切换背景色 | +| `SPC t t` | 打开 Tab 管理器 | +| `SPC T ~` | 显示/隐藏 buffer 结尾空行行首的 `~` | +| `SPC T F` | 切换全屏(TODO) | +| `SPC T f` | 显示/隐藏 Vim 边框(GUI) | +| `SPC T m` | 显示/隐藏菜单栏 | +| `SPC T t` | 显示/隐藏工具栏 | #### 状态栏 & 标签栏 @@ -1206,7 +1206,7 @@ Notes: FlyGrep 缓冲区的按键绑定: Key Binding Description -\-----------\\ | ----------- +\-----------\\ \| ----------- `` | close FlyGrep buffer `` | open file at the cursor line `` | move cursor line down diff --git a/docs/documentation.md b/docs/documentation.md index 07833f489..59266a05a 100644 --- a/docs/documentation.md +++ b/docs/documentation.md @@ -326,7 +326,7 @@ Some UI indicators can be toggled on and off (toggles start with t and T): | Key Binding | Description | | ----------- | ----------------------------------------------------------------- | | `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 i` | toggle highlight indentation levels (TODO) | | `SPC t h c` | toggle highlight indentation current column |