function! Center_Window() set scrolloff=999 set scrolloff=1 endfunction command! Center call Center_Window()