Skip to content
This repository has been archived by the owner on Dec 28, 2019. It is now read-only.

Vim colorcolumn and foldcolumn have red/white background when in vimroom - remove them #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions plugin/vimroom.vim
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,19 @@ if exists( "&laststatus" )
let s:save_laststatus = &laststatus
endif

" Save the current 'colorcolumn' value for reset later
let s:save_colorcolumn = ""
if exists ( "&colorcolumn" )
let s:save_colorcolumn = &colorcolumn
set colorcolumn=""
endif

" Save the current 'foldcolumn' value for reset later
if exists( "&foldcolumn" )
let s:save_foldcolumn = &foldcolumn
set foldcolumn=0
endif

" Save the current `textwidth` value for reset later
let s:save_textwidth = ""
if exists( "&textwidth" )
Expand Down Expand Up @@ -153,6 +166,12 @@ function! <SID>VimroomToggle()
if s:save_scrolloff != ""
exec( "set scrolloff=" . s:save_scrolloff )
endif
if s:save_colorcolumn != ""
exec( "set colorcolumn=" . s:save_colorcolumn )
endif
if s:save_foldcolumn != ""
exec( "set foldcolumn=" . s:save_foldcolumn )
endif
if s:save_laststatus != ""
exec( "set laststatus=" . s:save_laststatus )
endif
Expand Down