How do I start gvim with a maximized window?
Just like many other Gtk+ apps, gvim understands the parameter -geometry
. Try for example
gvim -geometry 500x500
How to maximize vim's windows on startup with .vimrc?
On linux with most window managers and wmctrl
installed you can maximize Gvim using the following command:
call system('wmctrl -i -b add,maximized_vert,maximized_horz -r '.v:windowid)
. Note: I am intentionally avoiding -b add,fullscreen
mentioned in man wmctrl
as it means different thing: at least in fluxbox that means that from now on this desktop you can see only either gvim or something else at a time, not both, and gvim is left without window decorations (not that I really care about them). E.g. if you popup yakuake* gvim disappears until yakuake hides.
* terminal emulator, pops like console in some FPS games
How do I start gvim with a maximized window?
Just like many other Gtk+ apps, gvim understands the parameter -geometry
. Try for example
gvim -geometry 500x500
How can I maximize a split window?
With :help [topic] you open up a topic that interests you.
Ctrl-Wo will minimize the other windows (leaving only the help window open/maximized).
(Ctrl-Wo means holding Ctrl press W, and then o)
Howto start gvim with a maximized window from a bash-script in gnome
You could use the -geom(etry) option to match the size with the size of your monitor(s).
gvim -geom 200x50+0+0
Where 200
is the number of characters you can fit horizontally, 50
is the same vertically, and +0+0
indicates zero horizontal and vertical offset from the top-left corner of the screen.
Note that the window would not be maximized per se, it would only be (approximately) the same size as your display.
How can I temporarily make the window I'm working on to be fullscreen in vim?
If I understand what you're asking, I think you'll find the ZoomWin plugin helpful (GitHub). If you've got a bunch of split windows, and you want to temporarily make the current window the only visible one, you can hit <C-w>o
. When you want to revert to the previous split state, hit <C-w>o
again.
[Edit] Note on key mappings:
The default key mapping for this plugin is <C-w>o
, but that conflicts with a default Vim key mapping. By default, that does :only
, which makes the current window the only window. If you'd like to retain that functionality, you can remap ZoomWin to another key. I remap it to <C-w>w
, because I like to use the :only
option as well. Here's my mapping:
nnoremap <silent> <C-w>w :ZoomWin<CR>
Note that this also overrides a default Vim mapping, related to moving to other visible windows (:help CTRL-W_w
), but I never used that one anyway.
Maximize window in MacVim on startup
You can set the lines
and columns
options. Just use “very large” values and Vim will truncate them to the largest possible values for your screen and font sizes. If you put this in your ~/.gvimrc
, then your initial window will automatically be sized accordingly.
set lines=999 columns=9999
See :help 'lines'
and :help 'columns'
for the details.
MacVim also has the fullscreen
and fuoptions
options (along with the “Prefer native full-screen support” checkbox in the Advanced section of the MacVim > Preferences… dialog) that you might find useful.
Vim's mksession doesn't save window maximized state
You can use the SessionLoadPost
autocmd to do additional work after you load a session.
augroup more_lines
autocmd!
autocmd SessionLoadPost * set lines=999
augroup END
For more help see:
:h 'lines'
:h SessionLoadPost
Related Topics
Linux Command History with Date and Time
Linux Command Line Howto Accept Pairing for Bluetooth Device Without Pin
Linux-Based Firmware, How to Implement a Good Way to Update
How to Capture All of My Compiler's Output to a File
How to Start Tomcat with Output on Console in Linux
What Is a Way to Read Man Pages in Vim Without Using Temporary Files
Parameter for Shell Scripts That Is Started with Qsub
Avrisp Mkii Doesn't Work with Avrdude on Linux
How to Post Raw Body Data with Curl
Add Text to File at Certain Line in Linux
How to Create a Callback for "Monitor Plugged" on an Intel Graphics
Linux Sched_Other, Sched_Fifo and Sched_Rr - Differences
How to Copy Multiple Files from a Different Directory Using Cp
Svn Error: Can't Convert String from Native Encoding to 'Utf-8'
How to Install Maven on Redhat Linux
How to Dynamically Allocate Memory Using Assembly and System Calls Under Linux
Get a Substring from a File Shell Script
Using <Linux/Types.H> in User Programs, or <Stdint.H> in Driver Module Code...Does It Matter