SecureCRT: vim not using maximum terminal window size - vim

No matter what the size of the SecureCRT window, vim's screen area remains constant. If I maximize SecureCRT, vim continues to only occupy a portion of the terminal.
I have fiddled with the obvious setting choices but have been unable to get vim to adjust to the width of the terminal window.
It DOES work when using ConEmu.
Any ideas?

Related

vim x/y scrollbar hiding my commands and being really anoying

i'm a new vim user since 2 weeks and i've currently have my biggest trouble for the moment on vim.
i always have a x and y scrollbar on my vim and the x one is very anoying because it cover my commands.
here is a screenshot of the scrollbars that appears when i use terminal inside of vim using `:term` / `:!dir` or even when i save my vimrc or source it (`:so ~/.vimrc`)
if there is any solutions to it i will be really grateful, thanks for reading
This is an issue with your layout settings in Powershell and Ubuntu. Right click on the top bar of either program, go to Properties and then go to the Layout tab. You can check the Wrap text output on resize box and that should get rid of your horizontal scrollbar, thereby allowing you to use Vim as normal. Alternatively, in the same menu, you can decrease the width of the screen buffer size so that it is smaller than the width of the window size.

Why "set lines=999 " can't maximize Gvim winodw when opening?

set lines=999 in vimrc can't maximize Gvim winodw when opening, why? Please check the screenshot, there's some space in the right and bottom side.
As Joanis stated in his comment, Vim works with lines of character that have a fixed height. The window can only be resized in steps of line-height and character-width.
If you change your font size (Edit -> Select font...) you will see, that the gap between the Vim window and the monitor border changes.
If you are lucky, you'll find a font/font-size that exactly matches the maximum resolution of your monitor. Whether that is still useful or readable ... most likely not.

NerdTree re-positions Vim Window

I am using gvim on Windows 7. I just installed NerdTree and observed something abnormal.
Usually I have two application open side-by-side by dragging them the left and right border of screen, and then Windows will automatically adjust the width and positions for them.
So, I have vim and another application open side by side today, and needed to navigate the file system. So I did NERDTreeToggle and all the sudden, my nicely positioned vim jumped to a different position (The default one when starting vim).
I am wondering if there is anyway to prevent this from happening.
Thanks.
This is probably caused because due to the vertical split (of the NERDTree sidebar), Vim displayed a second scrollbar (on the left), and that causes the Vim window to increase its width, and that made it "break out" of your layout.
You can avoid that second scrollbar via
:set guioptions-=L

Resize gvim window when the font changes

I have a laptop attached to a 1440p screen. Depending on which screen I'm using, I find myself adjusting gvim's font size often. When I do, the number of lines in the window remains the same. I'm also using a tiling window manager, so gvim is always running in a window of a fixed size. The result of this is that increasing the font pushes the status line out of the visible window and decreasing the font leaves me with dead space.
The workaround I've found so far is to open and close a terminal. Resizing gvim forces it to recalculate how much space window it has to draw in. Is there a way to trigger that effect without spawning another window?
Ok, I have a stupid hack that works around the problem. I'm not going to accept my own answer here because this is a question about gvim, but in case anyone else bumps into this thread before it gets a legit answer, here's my hack.
silent !xterm -e sleep .1;exit
I just dumped that in my font resizing command, which is bound to + and -.
I figure out a few workarounds:
set guioptions+=k: not exactly what we need, but this tells Vim that the window size is not going to change when the
font size changes (which is what happens here anyway so no problem).
set lines=999 columns=9999: according to Vim documentation, this will set it to the maximum value possible (although it doesn't really work for me, the number of lines/columns is computed based on the whole screen size instead of just the window part)
set go+=m go-=m: this seems to force vim to recompute 'lines'. Unfortunately the analog set go+=r go-=r doesn't make it recompute 'columns'...
although set go+=r go-=r does make vim recompute 'columns' when go-k is set. So a full workaround, if you don't want set guioptions+=k, is set go+=k go+=mr go-=mr go-=k (or something similar).

How to change font size in 'Screen', the screen manager used by Limp to connect to SBCL?

I recently started using Lisp and Limp is the only available plugin for VIM. But, once I set it up and hit F12, the terminal like window that appears has a very small font size. I have a screen resolution of 1920x1080 and it's impractical to read such small fonts. I went through the man page of 'screen', but couldn't find any useful information on changing the font or font size. Is there a way to do this?
And how about using something like 'xterm' rather than 'screen'? I looked through the code of bridge.vim. I don't think it is too much of a task. Any ideas on this?
By screen, do you mean GNU screen?
GNU screen is a terminal emulator that runs in another terminal or emulator. It has no direct control over font sizes; it's purely text based. The window you're seeing must be some GUI terminal emulator; you haven't told us enough to guess which one (could be xterm, could be Gnome terminal, etc.).
For xterm, control-right-click should bring up the "VT Fonts" menu, which will let you select a different font. If none of the available fonts are to your liking, you can use X resources to reconfigure the options, including the choice for the default font.
xterm also supports a control sequence that sets the current font. You have to know the name of the font you want. xlsfonts will show you a very long list of font names (it just showed me 5594 of them). For example, if you run this from a shell running in xterm:
printf '\e]50;-misc-fixed-medium-r-normal--15-140-75-75-c-90-iso10646-1\a'
it should give you the font I usually use. But screen generally intercepts escape sequences like that, so it probably won't work from screen under xterm.
Other terminal emulators should have similar mechanisms.

Resources