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
4
votes
2answers
2k 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&...
10
votes
2answers
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: ...
2
votes
2answers
5k views

How to use WSL's bash shell as default terminal of gvim/windows 10?

gvim 8 1-26 / windows 10 I'd like to use Windows Subsystem Linux (WSL)'s bash shell as a gvim's terminal instead of cmd. So if I type in command potion of gvim: :!.\test.sh, it will echo result ...
27
votes
6answers
6k 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 ...
36
votes
3answers
13k 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 ...
15
votes
4answers
10k 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 ...
11
votes
2answers
288 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 ...
2
votes
1answer
796 views

Where does gvim find font options for its `guifont` pick list?

In gvim, :set guifont=* brings up a GUI panel from which one can choose a font family, weight, slant, and size. Where does gvim find these fonts? I'm using Cygwin's X-windows. While the scheme for ...
1
vote
2answers
1k views

Escape sequences from external commands cluttering output in GVim

One of the reasons i prefer to run Vim from a terminal instead of running gVim is that the output of external gets cluttered up by escape sequences each time I execute commands like ls and grep that I ...
7
votes
2answers
2k 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 ...
6
votes
1answer
922 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 ...
4
votes
1answer
2k views

Visual Differences between vim on virtualbox Ubuntu guest (through putty) OR gVim on Windows host

Ok, it's a curiosity more than a real question, I apologize in advance for long post: Usually I code with vim on a ubuntu headless, as a virtualbox guest on my stupid windows 7 host; I access linux ...
2
votes
1answer
198 views

gvim cmd line offset issue when doing horizontal splits?

Not sure how to explain this but basically I'm using an external plugin/dll to enable fullscreen in gvim (which is very lame since this should be a built-in feature...). The problem in when I open a ...
2
votes
1answer
892 views

Vim crash with :py3 import sys; print(sys.version)

Windows 8 Vim 8.0.584, 32 bit from https://tuxproject.de/projects/vim/ .7z archives: x86 python36.dll, 32 bit from https://www.python.org/ftp/python/3.6.0/python-3.6.0-embed-win32.zip copied python36....
1
vote
0answers
50 views

colorcheme in vim is partially working. how can I apply the theme successfully?

Thank you for all yours advise that for help to improve my question. I'm not find yet how to resolve this problem in here. I'm really appreciate If you left the link about answer of this problem. ...
0
votes
0answers
37 views

How can vim show multiple files are changed on disk?

How can vim tell me which buffer is changed on disk among multiple buffers? related to this thread, @b-layer helped me my current vimrc code: set autoread autocmd FocusGained,BufEnter,CursorHold,...
61
votes
7answers
99k 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?
9
votes
2answers
8k 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 ...
7
votes
1answer
293 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 ...
13
votes
1answer
659 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 ...
9
votes
3answers
12k 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 (...
8
votes
2answers
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 ...
6
votes
3answers
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 ...
5
votes
2answers
2k views

Gvim how to open several files in different buffers from MS Windows explorer

On MS Windows using gVim, is it possible to select several files from the explorer and open them in the same instance of gVim in different buffers? At the moment if I select 3 different files on ...
4
votes
2answers
2k 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 ...
2
votes
2answers
428 views

Force (visual-only) wrap at specific column regardless window size in gVim

This is more gVim (Linux) related since Vim doesn't have a "window" of its own. I'm trying to wrap a text at (say) 80th character, visual wrap only, no changes in file, hence no textwidth or ...
2
votes
1answer
105 views

How to change in gvim GTK file browser the default file mask wildcard (glob)?

In gvim the command :browse confirm e launches a GTK file browser. The default file mask in this window depends on the filetype from which the browse window is invoked. I would like to change that ...
1
vote
2answers
2k views

how to replace all space with "_" for the first quoted string

I have several lines , and each line has 2 quoted string, and I want to replace all space with "_" for the first quoted string. How to do that? could I use macro? select 'a b c','a b c' union all ...
1
vote
1answer
339 views

changing font size leaves white bars in gvim

I wanted an easy way to resize the font in gvim (GTK), so I found this post: Quickly switch between fonts at runtime I created the following bindings based on that post: let g:fc_list = [ \ ...
1
vote
1answer
722 views

Put variable to line above current line VIm

I'm writing a function to automate a repetitive task. Copied from a macro so still not elegant while I get it to work. Basically I want to fold a xml file my way to make visual comparison easier for ...
1
vote
4answers
1k views

Remove ^H from gvim

I am trying to direct data from manpage to gvim file but it's not properly formatted. Example: In manpage it is shown as NAME (bold) But in gvim its printed as N^HNA^HAM^HME^HE. Similarly for ...
1
vote
0answers
49 views

Why does Gvim treat ansi escape codes differently than Vim in python code?

The following python code uses ansi escape sequences to clear the terminal screen and change the text color to red. It then prints "Hello from Vim." print ('\033c\033[31m Hello from Vim.') In Vim I ...
0
votes
2answers
49 views

How can I change this comment plugin to work at the start of the line?

I got this from voyeg3r's gist He and @dave-kennedy made it 3 years ago. I am here because I couldn't contact them Can someone help me add a feature such that this vimscript code puts comment out ...
0
votes
1answer
33 views

How can vim tell me which buffer is changed on disk among multiple buffers?

I am using this code in my vimrc if a file is changed outside vim, it shows File changed on disk. Buffer reloaded. set autoread autocmd FocusGained,BufEnter,CursorHold,CursorHoldI * if mode() != 'c' |...
0
votes
1answer
405 views

Sharing vim commands history across different users and computers

I have configured .dotfiles. Eg. see here https://wiki.archlinux.org/index.php/Dotfiles So now I can do dgit push or dgit pull on whichever computer I want, and I have all my config files (including ....
0
votes
1answer
70 views

Can't use the usual !!foo in vim // gvim on Windows 10 - missing tmp files

I'm running vim // gvim 8.2 (fresh off of vim.org, and was before---just re-installed to do so as administrator, per instructions I'd missed before). I've been getting this since getting this Windows ...
0
votes
1answer
1k views

gvim looks terrible on my RedHat. Unable to change font

When running gvim on my RedHat: Linux trex-06 3.10.0-514.el7.x86_64 #1 SMP Wed Oct 19 11:24:13 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux NAME="Red Hat Enterprise Linux Server" VERSION="7.3 (Maipo)" ID=...
0
votes
1answer
247 views

Remove ~ in buffer at vim startup

When open vim or kill buffers to empty I encounter with ~ and I'd like to disable/remove it.