mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 01:00:05 +08:00
feat(major_mode): add wrap line major mode icon
This commit is contained in:
parent
a3031c6b92
commit
bfb5444c34
@ -97,6 +97,11 @@ let s:modes = {
|
||||
\ 'icon_asc' : 'w',
|
||||
\ 'desc' : 'whitespace mode',
|
||||
\ },
|
||||
\ 'wrapline' :{
|
||||
\ 'icon' : s:MESSLETTERS.circled_letter('W'),
|
||||
\ 'icon_asc' : 'W',
|
||||
\ 'desc' : 'wrap line mode',
|
||||
\ },
|
||||
\ }
|
||||
|
||||
if SpaceVim#layers#isLoaded('checkers')
|
||||
|
@ -275,7 +275,8 @@ function! SpaceVim#layers#ui#config() abort
|
||||
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['t', 'l'], 'setlocal list!',
|
||||
\ 'toggle-hidden-listchars', 1)
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['t', 'W'], 'setlocal wrap!',
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['t', 'W'], 'call call('
|
||||
\ . string(s:_function('s:toggle_wrap_line')) . ', [])',
|
||||
\ 'toggle-wrap-line', 1)
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['t', 'w'], 'call call('
|
||||
\ . string(s:_function('s:toggle_whitespace')) . ', [])',
|
||||
@ -476,6 +477,11 @@ function! s:toggle_whitespace() abort
|
||||
call SpaceVim#layers#core#statusline#toggle_mode('whitespace')
|
||||
endfunction
|
||||
|
||||
function! s:toggle_wrap_line() abort
|
||||
setlocal wrap!
|
||||
call SpaceVim#layers#core#statusline#toggle_mode('wrapline')
|
||||
endfunction
|
||||
|
||||
function! s:toggle_conceallevel() abort
|
||||
if &conceallevel == 0
|
||||
setlocal conceallevel=2
|
||||
|
@ -723,6 +723,7 @@ The letters displayed in the statusline correspond to the key bindings used to t
|
||||
| `SPC t s` | ⓢ | s | syntax checking (neomake) |
|
||||
| `SPC t S` | Ⓢ | S | enabled in spell checking |
|
||||
| `SPC t w` | ⓦ | w | whitespace mode (highlight trailing whitespace) |
|
||||
| `SPC t W` | Ⓦ | W | wrap line mode |
|
||||
|
||||
**colorscheme of statusline:**
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user