macvim - Why doesn't Vim execute my column setting in this command? -
i have vim command enter "distraction free" mode:
command! distractionfreemode set guioptions-=r gfn=cousine:h12 showtabline=0 fullscreen laststatus=0 noruler wrap linebreak nolist linespace=5 foldcolumn=3 nonumber columns=80
note using macvim. command sort of works, of settings don't seem triggered. these include columns=80
, nolist
. have set these separately after executing command in order them right. have tried putting these settings in function called command , had same issue. source of problem?
edit: here screenshot of i'm aiming at. using fullscreen
, columns
necessary achieve this, far know:
according for fullscreen (:h fullscreen
) there option tailor behavior of happens when enter fullscreen mode set fuoptions
on macvim fuoptions set to
fuoptions=maxvert,maxhotz
when @ :h fuoptions
maxvert when entering fullscreen, 'lines' set maximum number of lines fitting on screen in fullscreen mode. when leaving fullscreen, if 'lines' still equal maximized number of lines, restored value had before entering fullscreen. maxhorz when entering fullscreen, 'columns' set maximum number of columns fitting on screen in fullscreen mode. when leaving fullscreen, if 'columns' still equal maximized number of columns, restored value had before entering fullscreen.
this mean when enter fullscreen mode macvim resizes to maximum number of lines , columns can. (ignoring values set)
to fix can either add set fuoption-=maxhorz
remove offending option or add set=maxvert
force use maxvert regardless if other options set. stops macvim overriding settings in horizontal direction.
so fixed command like
command! distractionfreemode set guioptions-=r gfn=cousine:h12 showtabline=0 fuoptions-=maxhorz fullscreen laststatus=0 noruler wrap linebreak nolist linespace=5 foldcolumn=3 nonumber columns=80
Comments
Post a Comment