mirror of
https://github.com/junegunn/goyo.vim.git
synced 2025-11-13 13:53:50 -05:00
Fix #7 - Vim 7.0 compatibility (relativenumber, colorcolumn)
This commit is contained in:
@@ -46,8 +46,13 @@ function! s:init_pad(command)
|
|||||||
execute a:command
|
execute a:command
|
||||||
|
|
||||||
setlocal buftype=nofile bufhidden=wipe nomodifiable nobuflisted noswapfile
|
setlocal buftype=nofile bufhidden=wipe nomodifiable nobuflisted noswapfile
|
||||||
\ nonu nornu nocursorline colorcolumn=
|
\ nonu nocursorline winfixwidth winfixheight statusline=\
|
||||||
\ winfixwidth winfixheight statusline=\
|
if exists('&rnu')
|
||||||
|
setlocal nornu
|
||||||
|
endif
|
||||||
|
if exists('&colorcolumn')
|
||||||
|
setlocal colorcolumn=
|
||||||
|
endif
|
||||||
let bufnr = winbufnr(0)
|
let bufnr = winbufnr(0)
|
||||||
|
|
||||||
execute winnr('#') . 'wincmd w'
|
execute winnr('#') . 'wincmd w'
|
||||||
@@ -153,9 +158,16 @@ function! s:goyo_on(width)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if !get(g:, 'goyo_linenr', 0)
|
if !get(g:, 'goyo_linenr', 0)
|
||||||
set nonu nornu
|
setlocal nonu
|
||||||
|
if exists('&rnu')
|
||||||
|
setlocal nornu
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
set colorcolumn=
|
if exists('&colorcolumn')
|
||||||
|
setlocal colorcolumn=
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Global options
|
||||||
set winwidth=1
|
set winwidth=1
|
||||||
set winheight=1
|
set winheight=1
|
||||||
set laststatus=0
|
set laststatus=0
|
||||||
|
|||||||
Reference in New Issue
Block a user