On Windows 10, I installed gVim 8.1, so far I have made the following progress to make it usable for me:
I made changes directly to
_vimrc
file, in spite I know there is also a gVim specific configuration file, because I like it in one place.I downloaded a color theme I really liked, and use it like so (for CLI version, the #3 below should be applied too):
" load Atomified theme downloaded from: " http://vimcolors.com/797/atomified/dark " https://github.com/Siphalor/vim-atomified colorscheme atomified
In CLI version, I found there is a limited number of colors used, this can be remedied with:
" switch CLI to full color support set termguicolors
I turned on line numbering with:
" turn on line numbering set number
Regarding the GUI only, I have set:
to remove toolbar, as it is too small anyways on my HiDPI display, rendering it useless
to set proper font and its size for my HiDPI display
maximize gVim on startup
" Do the following only if launching GUI VIM if has('gui_running') " remove toolbar, as it is too small anyways on my HiDPI display, rendering it useless set guioptions-=T " set proper font and its size for my HiDPI display set guifont=Consolas:h10 " maximize gVim on startup " use ~x on an English Windows version, other languages see Alt + Spacebar for underlined character in your Close autocmd GUIEnter * simalt ~x endif
Thus far no problem, but once I added the following code to remember and restore open files on startup, it won't maximize fully, and it is also strangely resizing the main window down the startup:
" Go to last file(s) if invoked without arguments.
autocmd VimLeave * nested if (!isdirectory($HOME . "/.vim")) |
\ call mkdir($HOME . "/.vim") |
\ endif |
\ execute "mksession! " . $HOME . "/.vim/Session.vim"
autocmd VimEnter * nested if argc() == 0 && filereadable($HOME . "/.vim/Session.vim") |
\ execute "source " . $HOME . "/.vim/Session.vim"
What did I make wrong and how to remedy it?