Skip to main content

Questions tagged [gvim]

gVim is the GUI version of Vim (opposed to Vim running in a terminal emulator). It behaves exactly the same, but has additional graphical features.

Filter by
Sorted by
Tagged with
84 votes
11 answers
138k views

How can I change the font size in gVim?

Is there a way to change the size of the font in gVim, using native commands? And if not, what script can be used to do it quickly?
glS's user avatar
  • 3,919
66 votes
2 answers
21k views

How to fold text in a JSON file?

I have a large JSON file. It is not easy to work on all file at a time. I want to fold some content so that I can work on a section of JSON file. E.g.: { obj: {+}, // folded section obj:{ ...
WitVault's user avatar
  • 1,729
44 votes
1 answer
21k views

Is there any way to change the popup menu color?

Is there any way to change the background color of the popup menu in gvim? The default background color is pink, which is a little weird to me.
Searene's user avatar
  • 543
44 votes
3 answers
15k views

Can I use a non-monospaced font in either Vim or gVim?

Is there any way to use a non-monospace font in either vim or gvim? I tried changing the font for gVim with: :set guifont=Dejavu\ Serif\ 12 But this gives me some rather ugly results: I get the ...
Martin Tournoij's user avatar
44 votes
1 answer
26k views

Why do I need both a vimrc and a gvimrc?

There seems to be two ways to store preferences specific to gvim: Keep an .vimrc file for vim and a .gvimrc file for gvim specific additions. Keep all settings in .vimrc and wrap gvim specific ...
Caleb's user avatar
  • 2,245
29 votes
6 answers
7k views

What additional features do gVim and/or MacVim offer compared to Vim inside a terminal emulator?

I'm learning Vim by watching screencasts. And I'm wondering, why do a lot of people use gVim or MacVim? From what I can see, the GUI Vim version only have additional features that involves using ...
Aaron Shen's user avatar
  • 2,529
21 votes
4 answers
12k views

How do I get gvim to start maximised in Windows?

I'd like to have my editors give me as much screen real estate as possible since it increases my ability to see most of the code at once. The problem is that gvim seems to give me either an 80x25 ...
user avatar
20 votes
3 answers
24k views

How to map two commands with only one key

My question comes from this two commands I added on my _vimrc file: nnoremap <C-[> :set columns+=1<CR> nnoremap <C-]> :set lines+=1<CR> As is known, it will resize your gvim (...
Alex's user avatar
  • 1,225
17 votes
2 answers
11k views

How to adjust gVim to my HiDPI display scaling on Windows 10?

Being a user of GUI editors (mostly Sublime Text) and one simple CLI editor (nano), and just having gVim (the GUI version of vim) installed on my Windows 10, I can't figure out how to adjust this ...
Vlastimil Burián's user avatar
16 votes
5 answers
17k views

how to install vim with python support for debian strech

I installed debian strech two days ago. I installed vim and configured some plugins. I always encountered the following error while opening any file: vim app.py Error detected while processing /home/...
Sathish Kumar's user avatar
15 votes
4 answers
44k views

How can I get gVim on Windows to behave as on Linux?

I am a frequent user of the Vim editor on Linux and now I want to use it on Windows. I downloaded Vim for Windows, which happens to be gVim. Several features of Vim doesn't work in gVim 7.4 like ...
SibiCoder's user avatar
  • 3,432
14 votes
1 answer
2k views

Browse oldfiles list length

I use :browse oldfiles command to open recent files quickly. The list becomes very long with time -- I have 100 items in the list and need to tap space to complete this action. I want to reduce this ...
Mikhail V's user avatar
  • 275
14 votes
1 answer
3k views

Why are my windows scrolling together?

I have two windows open on the same buffer and I want to edit two parts of the same file at the same time. I can't because the windows are scrolling together. I have noscrollbind set so I am ...
Stephen Rasku's user avatar
13 votes
1 answer
777 views

Can I make gvim not use graphical dialog box for ':set confirm'?

I use gvim on windows very frequently. I have in my .vimrc: set confirm However, this opens a little dialog box, so I have to use my mouse to quit. In command line vim, I get this: :q Save changes ...
DJMcMayhem's user avatar
  • 17.7k
12 votes
2 answers
402 views

Quickly switch between fonts at runtime

While fonts can be manually selected in GVim from the menu, I have a few preferred fonts I would like to switch between depending on the task at hand (small bitmap, larger OTF... etc). Is there a way ...
ideasman42's user avatar
  • 3,763
12 votes
1 answer
924 views

How do I stop my window from moving when using vsplit?

When using :vsplit my gvim window jumps to a specific screen location. How do I stop this from happening? Same thing happens when the second to last split is closed. I'm using gvim on Windows.
user3122718's user avatar
11 votes
2 answers
5k views

Disable Ctrl-Z in normal mode

If I press Ctrlz in normal mode, it makes my gVim "minimized" or in vim (not gVim ) it goes back to the shell. I want to disable this feature but I can't unmap Ctrlz: unmap <c-z> returns no ...
x3usph1s's user avatar
  • 113
11 votes
2 answers
2k views

How do I prevent Vim from unindenting empty lines?

Vim keeps unindenting the lines I want to keep indented if I don't write anything on them... I'll give an example, where the | is the caret. Caret is indented and I press enter if expression: ...
user6256's user avatar
  • 213
10 votes
1 answer
4k views

Paste from clipboard into CtrlP input in GVim

Using CtrlP with GVim I often need to open a file with the name from the system clipboard (on Windows). So my workflow should be: Ctrl+P {somehow paste name from the clipboard} Select file and open ...
Boris Brodski's user avatar
10 votes
2 answers
1k views

`gx` not opening url in gvim but works in terminal

I use vim in the terminal as well as gvim. My issue is that in the terminal gx opens urls without a problem but in gVim nothing happens. Has anyone else experienced this issue and found a fix? I'm ...
moorej's user avatar
  • 203
9 votes
2 answers
11k views

Can you use neovim in a gui like mvim or gvim? (Mac OS X)

Maybe a stupid question but is it possible to run neovim on a GUI like gvim or mvim? I need some GUI to do remote work within Filezilla Thanks
Sebastian Tramper's user avatar
9 votes
2 answers
10k views

How to display Font Awesome in Vim?

I installed ttf-font-awesome in Arch Linux; if I open up a file which contains icons from Font awesome it recognizes the file as utf-8 but the icons are displayed as squares. Does anyone know how to ...
Sergio's user avatar
  • 363
9 votes
2 answers
4k views

Copy a word and paste the same word at multiple places in Vim

If I try to copy a word via this yw – yank the current word and paste it to somewhere, it works but If I try to paste it somewhere else one more time old world gets lost with previous replaced word. I ...
WitVault's user avatar
  • 1,729
9 votes
1 answer
3k views

What is 'dnd' or 'DnD'?

:version shows -dnd. :help dnd reads: *+dnd* Support for DnD into the "~ register |quote_~|. What does 'dnd' or 'DnD' stand for?
TankorSmash's user avatar
9 votes
1 answer
13k views

How to build vim from sources with GUI support?

I am trying to build vim from source, especially gvim, to get some of the bug fixes that have been plaguing me in the office repository. I can compile vim fine but gvim is not being generated due to ...
Sardathrion - against SE abuse's user avatar
8 votes
2 answers
3k views

gvim window looks bad

I don't know why my gvim windows looks like this in linux. Is there anything I need to add to my vimrc file in addition to this? execute pathogen#infect() syntax on filetype plugin indent on set ...
neelabalan's user avatar
8 votes
1 answer
33k views

Change a font in Vim/GVim in a simple way

I merely want to change a font in Vim/GVim. That's it. This doesn't work: font=Monaco\ 14 I've done a google search and I wonder, why is for such a elementary task there's no simple answer which ...
Kolayn's user avatar
  • 133
8 votes
2 answers
1k views

soft linewrap width [duplicate]

When wrapping text in GVim, the wrap occurs at the right side of the GVim window. I would prefer to have it wrap at column 80 however. A solution I have found is to :set columns=80, but this shrinks ...
Octaviour's user avatar
  • 982
8 votes
1 answer
1k views

How do I create buttons on the toolbar to increase and decrease font size?

Many systems offer + and - zoom buttons. Can someone please demonstrate how such two buttons can be emulated with gvim? This means that clicking the + button would increase the font size by one step....
Yossi Gil's user avatar
  • 755
8 votes
2 answers
924 views

Dealing with case insensitive filenames on Windows

I'm using the latest vim/gvim (8.0.118), but have noticed this problem in the past, with other versions. I created a file named fizzbuzz.java (outside of gvim), and opened it in a new tab in gvim on ...
Herb's user avatar
  • 1,213
8 votes
0 answers
17k views

Is there any similar way in vim to get standard path like neovim stdpath function

In neovim, we can get default standard path via stdpath() function. I wonder if there is any way to do that in vim. below is the help doc about stdpath() in neovim: stdpath({what}) *...
ZMJ's user avatar
  • 283
8 votes
0 answers
491 views

gVim - Use different fonts using :highlight

I want to set gVim font size for Comment highlight group. When I set it, it does not do anything (the font is still the same but color changes). My .gvimrc: se guifont=Fira\ Mono\ Regular\ 10 hi ...
jiwopene's user avatar
  • 181
7 votes
3 answers
7k views

How can I change the colorscheme of the vim terminal buffer?

I use GVim with the gruvbox colorscheme. When I open a terminal inside vim with :term, the colors are different, it looks like another colorscheme is applied. The other terminals I use (urxvt and ...
mike23's user avatar
  • 290
7 votes
1 answer
5k views

How do I make "Edit with Vim" open Vim instead of gVim on windows?

When installing Vim for Windows 10 64-bit, it also installed an "Edit with Vim" context menu option. Annoyingly, this opens the file in gVim. How do I change the "Edit with Vim" context menu option ...
Accumulator's user avatar
7 votes
1 answer
3k views

How to force vim to interpret file as dos-format

I am using vim to view XML files created by a Windows app. It is probably a malformed XML file because vim thinks it's opening a Unix file format. So I end up seeing ^M at the end of almost every ...
user36800's user avatar
  • 443
7 votes
1 answer
327 views

Can visual select mode be integrated with the Unix selection clipboard?

Is it possible to configure vim (obviously with :set mouse=a) and/or gvim such that the visual selection modes automatically integrate with X's selection buffer? I am aware of how to setup the copy ...
Caleb's user avatar
  • 2,245
7 votes
2 answers
989 views

MacVim - doesnt find programs in PATH when running commands using "!"

When I'm using vim in a terminal, it uses the PATH I have set, and I can run programs and scripts located in my ~/bin folder using ! For example :! some_bash_script.sh When I try this in MacVim, it ...
Brad Parks's user avatar
7 votes
1 answer
924 views

vim 8.0 file explorer only allows specific locations

I'm running Vim 8.0 on a Windows 7 system and I'm having this issue whenever I open gvim (the one that runs in a window as opposed to running in cmd) the default path in :pwd is c:\users\"user". If I ...
jumpindonuts's user avatar
7 votes
1 answer
1k views

Hide statusline when more than two windows open without suffering the extra hidden empty line artifact?

I want to hide the statusline, I don't ever use nor care about what is written in it. The problem is vim doesn't offer a way to achieve that in a convenient manner. If I just do set laststatus=0 I ...
vexe's user avatar
  • 281
6 votes
2 answers
9k views

Can I still use console vim if I install a GUI version?

If I purge my existing vim-full installation and install a GUI version like vim-gnome or vim-gtk, can I still use it in the text mode I am familiar with? What if I am using it from a terminal via SSH?...
Tyler Durden's user avatar
  • 2,131
6 votes
2 answers
3k views

Why does the same color scheme look better in gvim than Cygwin?

I installed Cygwin/x on my PC, and I've set the terminal to xterm-256. But when I start vim from cygwin terminal, the look and feel of the same color scheme is different on cygwin and gvim. gvim ...
Aaron Shen's user avatar
  • 2,529
6 votes
3 answers
1k views

Switching to the local directory after loading a file?

When running gvim by double clicking with a file in a graphical file manager, like nautilus, the vim instance is called with a strange current directory (seems root sometime, but I am not sure). This ...
Rmano's user avatar
  • 758
6 votes
1 answer
7k views

Why does setting runtimepath do nothing?

I'm trying to adjust my vimrc to be portable and also run under Gvim 8 on Windows 10. I use Vundle as my package manager and it works perfectly on my Ubuntu machine. However, on Windows, it won't load....
Scott Severance's user avatar
6 votes
3 answers
3k views

Strange behavior of <ctrl-j> remapping

I want ctrl-h, ctrl-j, ctrl-k and ctrl-l in insert mode to behave like the arrow keys. I have this (among other things) in my .vimrc: inoremap <C-j> <Down> inoremap <C-k> <Up&...
DJMcMayhem's user avatar
  • 17.7k
6 votes
1 answer
4k views

Remapping Ctrl-(h j k l) to move between windows

Im trying to increase my efficiency at moving between buffers, and the Ctrl-w-(hjkl) movement doesn't work for me. How can I remap Ctrl-(hjkl) to the Ctrl-w version? I have already tried: inoremap &...
tkaden4's user avatar
  • 71
6 votes
1 answer
1k views

Why can't I type certain non-ASCII letters?

I recently had a need to type the letters æ, ø, and å. For context, these are available on my physical keyboard, and work fine in other programs. It's also a Norwegian keyboard (+ layout), if that's ...
Zoe's user avatar
  • 712
6 votes
4 answers
12k views

How to save color scheme in gVim between sessions?

I want to select a color scheme in gVim such that it's used always (i. e. if I select color scheme X, close gVim, and start it again, it should start with X as the color scheme, not the default one). ...
Glory to Russia's user avatar
6 votes
2 answers
2k views

Vim lost custom highlight settings after recovering from sessions

I defined some highlights in the vimrc file and it works well in gvim. However after I mksession and sourced it back, I found that some (maybe all) of the custom highlights were lost and vim used the ...
tamlok's user avatar
  • 851
6 votes
1 answer
240 views

What's the point of :promptfind after all

Not sure if it's an appropriate question. But I just can't help wondering, why would any Vim user find it necessary to invoke a GUI search prompt instead of search using / or ?, why would the designer ...
xji's user avatar
  • 214
6 votes
2 answers
8k views

Gvim 8.1 on Windows 10 won't source $HOME\_vimrc

I have a $HOME\_vimrc present, but it doesn't show up in the output of :scriptnames. And when I run gvim -V, it reports: could not source "$HOME\_vimrc" The only thing in my $HOME\_vimrc is the ...
William L.'s user avatar

1
2 3 4 5
10