mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 23:10:04 +08:00
Change: enable relativenumber only in current win (#2771)
* Change: enable relativenumber only in current win * Implement feature * Only use bufenter and winenter autocmd
This commit is contained in:
parent
05852f87f3
commit
53a20b8549
@ -73,7 +73,7 @@ let g:spacevim_expand_tab = 1
|
||||
" <
|
||||
|
||||
""
|
||||
" Enable/Disable relativenumber, by default it is enabled.
|
||||
" Enable/Disable relativenumber in current windows, by default it is enabled.
|
||||
let g:spacevim_relativenumber = 1
|
||||
|
||||
|
||||
@ -888,12 +888,6 @@ function! SpaceVim#end() abort
|
||||
call SpaceVim#layers#core#statusline#init()
|
||||
endif
|
||||
|
||||
if !g:spacevim_relativenumber
|
||||
set norelativenumber
|
||||
else
|
||||
set relativenumber
|
||||
endif
|
||||
|
||||
" tab options:
|
||||
set smarttab
|
||||
let &expandtab = g:spacevim_expand_tab
|
||||
|
@ -22,6 +22,10 @@ function! SpaceVim#autocmds#init() abort
|
||||
\ q | endif
|
||||
autocmd QuitPre * call SpaceVim#plugins#windowsmanager#UpdateRestoreWinInfo()
|
||||
autocmd WinEnter * call SpaceVim#plugins#windowsmanager#MarkBaseWin()
|
||||
if g:spacevim_relativenumber
|
||||
autocmd BufEnter,WinEnter * if &nu | set rnu | endif
|
||||
autocmd BufLeave,WinLeave * if &nu | set nornu | endif
|
||||
endif
|
||||
autocmd BufRead,BufNewFile *.pp setfiletype puppet
|
||||
if g:spacevim_enable_cursorline == 1
|
||||
autocmd BufEnter,WinEnter,InsertLeave * call s:enable_cursorline()
|
||||
|
@ -321,7 +321,7 @@ Change the default indentation of SpaceVim. Default is 2.
|
||||
In Insert mode: Use the appropriate number of spaces to insert a <Tab>
|
||||
|
||||
*g:spacevim_relativenumber*
|
||||
Enable/Disable relativenumber, by default it is enabled.
|
||||
Enable/Disable relativenumber in current windows, by default it is enabled.
|
||||
|
||||
*g:spacevim_enable_bepo_layout*
|
||||
Enable/Disable bepo layout, by default it is disabled.
|
||||
|
Loading…
Reference in New Issue
Block a user