2

With most filetypes, I can resize font and my GVIM application window just fine. However, when I open a specific file type (.tex), the font is easily changed, but I am unable to shrink the application window size past a certain threshold. I've tried manually via mouse clicking to resize the window, as well as editing the columns or winminwidth settings; all methods so far are unsuccessful. My guess is that this is due to something having to do with the vim-latex plugin? I have vim-latex-1.10.0 installed, and I've asked a separate question to try and help me sort through that package and determine if it is running some sort of autocmd to keep the window from getting too small. This machine's OS is Ubuntu 18.04.

I first detected this issue when I added these commands to my .gvimrc, but I'm pretty sure this issue has existed beforehand.

map <F9> :set guifont=Tlwg\ Mono\ Bold\ 14<CR>
map <F8> :set guifont=Tlwg\ Mono\ Bold\ 10<CR> :set winminwidth=20<CR>

Is there a command used to set minimum application window width?

EDIT: I have checked that even though set winminwidth? returns 20 I can not shrink my window beyond a certain width. It looks like the application window is trying to enforce a certain physical width, which is independent of font-size. For instance, when my font-size is 14, the minimal column-width is around 68 columns, and with font-size 10, the minimal width is closer to 95 columns. Meanwhile, the minimal width of the application window on my physical screen remains constant (a few inches across).

This issue persists if I load a .tex file, then load a different file (e.g. .txt or my .gvimrc). However, I can resize freely if I never load a .tex file in the first place.

If I open a .tex file from my terminal, I get the following message, which seems it may help diagnose the issue?

(gvim:7512): Gtk-CRITICAL **: 12:14:27.257: gtk_distribute_natural_allocation: assertion 'extra_space >= 0' failed
  • Do you mean the GVim window (the application window itself)? Or a window inside Vim, which is what :split and :vsplit will create? The 'winminwidth' controls the minimum width of the latter, of a split, and only an inactive window. (See :help 'winminwidth') – filbranden Sep 15 at 17:26
  • @filbranden OH! That explains a lot, thanks! I mean the actual GVIM application window :) looks likeI was using winminwidth when I actually needed a different command – Zim Sep 15 at 17:29
  • See :help :winsize or you can use something like :set columns=20 or similar... – filbranden Sep 15 at 17:38
  • @filbranden Thanks! Unfortunately the columns command will not allow me to shrink the window beyond a certain threshold. It will allow me to make the application window larger, though. Interestingly, it looks like the application window is trying to enforce a certain physical width, which is independent of font-size. For instance, when my font-size is 14, the minimal width is around 68 columns, and with font-size 10, the minimal width is closer to 95 columns. Meanwhile, the minimal width of the application window on my physical screen remains constant (a few inches across). – Zim Sep 15 at 17:50
  • 1
    @Rich thank you very much, good point and great suggestion! I've edited my question – Zim Sep 16 at 22:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.