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
1
vote
1answer
53 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 ...
1
vote
1answer
23 views

Closing the “list of files in a directory” when having Vim to open the directory

In the following screenshot, I demonstrate the following operations that shall yield a "buffer" that cannot be closed. My guess is that the list of files/directories is actually not a buffer. My ...
0
votes
0answers
18 views

gvim window completely frozen

I have a problem with gvim on Fedora 30: when opening a file, the content is displayed, but then the window is never refreshed. Already tried a lot of different solutions, with no success: CTRL-L ...
2
votes
1answer
28 views

Gvim and Unicode indic characters

On my Linux system, if I try to type indic characters (specifically Kannada) in gvim (via ibus), the display is so garbled, I can barely see what has been typed. Is it the expected behaviour? Can Gvim ...
3
votes
4answers
54 views

Vim search and replace “/” only from string between round bracket [duplicate]

I have string lets say count number of elecment when tra(XYixe0/en_in/old)='mid/2' rise='corse/2' I want to replace / from (XYixe0/en_in/old) to . My output string should look like count number of ...
2
votes
1answer
53 views

Plugins working in vi but not gvim

I am using a Windows 10, 64 bit machine, with gvim 8.1.1 installed (See screenshots below). I am using Vi version 8.1 which was installed as part of my git bash - version 4.4.23. I have never ...
2
votes
1answer
57 views

Why does gvim --remote change order of files?

When I open multiple files in gvim with no options, they are assigned to buffers in the order I specify on the command line: gvim foo.cpp foo.h bar.cpp bar.h Doing :ls then yields: 1 %a "foo.cpp" ...
1
vote
2answers
45 views

What control character is ^\ in the buffer in a file open in vim?

I found a whole bunch of green ^\ characters in the file I have open in vim... Any idea what control character they are? And how would I search for them in grep?
5
votes
1answer
476 views

How do I remap “å” to type “å”?

I recently came over some use for letters like æ, ø, and å. For context, these are available on my keyboard, and work fine in other programs. It's also a Norwegian keyboard if that's relevant. With ...
1
vote
2answers
78 views

I am running into problems while using Gpush command from vim-fugitive plugin

I have recently started using the vim-fugitive plugin, and currently I am facing problem with the Gpush command. I tried :Gpush % which gives me errors in the quick fix window saying fatal: ...
0
votes
1answer
34 views

How can I look up the current/default guifont reliably?

I'm trying to configure my guifont and I'd like to see the current setting so I can e.g. keep the same font but change the size. Is there a way to check the current font that works reliably, even if ...
1
vote
0answers
32 views

gvim adds one extra pixel spacing after each character?

For some reason, gvim is adding one extra pixel of spacing after each character. It almost seems similar to this question, but in my case gvim does use the correct font. I compared the same font in ...
1
vote
1answer
92 views

Powerline font not working with airline in (g)vim on Windows 10

I'm trying to set up patched fonts from powerline/fonts with airline in gvim under Windows 10 64 bit. As you can see from the screenshot here: the characters from the font do show up, but the airline ...
1
vote
2answers
64 views

Gvim - Change window position horizontally

I want to create a command that will place my gvim window to a different "x" location on my screen while maintaining the "y" position. I do this in my _gvimrc by calling winpos 319 16 I want to ...
0
votes
0answers
31 views

Run project specific _vimrc in windows?

I'm attempted to duplicate this functionality in a windows environment running gvim 8.1 but it doesn't appear to pick up my changes. I've updated my $VIMRC\_vimrc with set exrc set secure and my ...
1
vote
0answers
38 views

Automatically saving on FocusLost sometimes stops working for a gvim window

In my ~/.vimrc I have at the moment: autocmd BufLeave,FocusLost * nested silent! wall Which most of the time works as I would like, however sometimes it seems saving simply stops working (for a ...
1
vote
1answer
46 views

Line mode command to delete from column X to end of line?

Using gvim on a file with 30K lines, I want to use ex mode to delete from column 130 to end of line, making each record no longer than 130 characters. I want to do this for the entire file. My macro ...
0
votes
1answer
50 views

custom snippet extender Ultisnips

Suppose I have a snippet: snippet prg !This is file : `!v expand('%:t:r')` ! Author= `!v expand($USER)` ! Started at: `date +%d.%m.%y` ! Last Modified : Sun 16 Jun 2019 12:30:58 IST ...
1
vote
3answers
128 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
votes
1answer
51 views

vimrc for ale is creating confusion: is my augroup wrong?

My vimrc: https://paste.fedoraproject.org/paste/Wl5jvebADSDoAI4HbIX-hA and my corresponding python file is: https://paste.fedoraproject.org/paste/g60mU7xBqGaEuKKWkZ6Rnw The problem is, with ALE, as ...
0
votes
1answer
22 views

Disabling syntax and maintaining colorscheme [flickering problem]

I have noticed that with set syntax=off option set, the gvim screen doesn't flicker when I scroll the page using <PageUp> and <PageDown>. What are the possible solutions, if some exist,...
1
vote
1answer
133 views

How do I properly set up airline and powerline fonts with gvim?

I've recently started moving over to gvim from vim on Windows. I managed to get the terminal version set up properly, and the fonts render there. In Vim, it works fine: But in gvim, the powerline ...
1
vote
2answers
1k views

Installing gvim on Windows Subsystem for Linux

I'm trying to install gvim on WSL (under windows 10) and use MobaXterm as my X server. Bash informed me that: Command 'gvim' not found, but can be installed with: sudo apt install vim Which I ...
0
votes
0answers
31 views

Quick paste via single keybind

As I understand, the default cursor looks like this: ▉ block. Currently I have these related settings: set guicursor=c-n-i-v:ver25-blinkoff0 And ver25 makes the cursor look and behave as if only ...
-1
votes
1answer
39 views

Whitespace Tabs Show Differently in gVim on Windows/Linux versus MacVim on Mac OS

I am having difficulty getting MacVim to behave and look the same as gVim on Windows or Linux. Here's an example: gVim on Windows: MacVim on Mac OS: These are viewing precisely the same file. The ...
0
votes
1answer
65 views

Multiline paste with relative columns alignment

When I have some text indented as follows (like a and b variables assignment): if(condition) a = 1; b = 2; end and I want to paste a and b block somewhere outside of the if block, i.e just ...
0
votes
1answer
113 views

how could I use gvim through ssh two hops

I sometimes need to work on remote server which does not have x11 installed and thus I cannot use vim with its full features. I want to work on remote server with the gvim installed to my local ...
1
vote
1answer
30 views

How do I open a tag in an existing gvim instance?

On windows I use gvim, and like to keep just one gvim instance running. Most of the time I open files like this: gvim -p --remote-tab-silent FILES. However, sometimes I want to open a tag in that same ...
0
votes
1answer
45 views

How can I get vim to type continuously, rather than holding in place for keymappings?

For the purpose of this question, imagine that I have set iab phil philosopher In vim, as far as I know, the default display pattern when typing out the characters "phil" at the start of the word is ...
1
vote
0answers
68 views

How can I Install vim plugin offline? [duplicate]

I am currently using gvim. I want to know is it possible to install a vim plugin offline? I have the project files already downloaded from github, and I want to put them in the right locations for ...
1
vote
3answers
182 views

Why cannot I make Vim (not gVim) fullscreen?

I use Vim on windows (not gVim) because I think, that windows menu bar is ugly. So I use Vim, but I cannot fullscreen it. When I try it caps at cmd max size (1/4 size of screen) and won't be bigger. ...
2
votes
2answers
173 views

Vim Statusline colors not appearing

I want my vim statusline to have some color and I can't figure out why it does not with this code: set laststatus=2 set statusline+=%1*\ %f\ %* set statusline+=%2*\ %<%F%* set statusline+=%2*%m%* ...
1
vote
2answers
49 views

How to replace a string only if the line starts with another string

I need to find ONLY the lines that start with the string G1 Z, and then replace any occurrence on that same line of F1800 with a new value of F500. For example: G1 Z9.800 F1800.000 ; move to next ...
1
vote
1answer
35 views

gVim python continues to indent after function ends

I'm seeing strange behavior in my windows gvim -- it will continue to indent after a function ends, even once characters in column 0 have been entered: def foo(k): return 42 """Still indenting""" ...
0
votes
1answer
177 views

Weird characters when running :shell

When I run the :sh command I see the following characters If it is relevant, my default shell is zsh and it runs oh-my-zsh also Thanks
1
vote
1answer
299 views

My gVim (8.1, Win10) does NOT invoke $VIM\_vimrc during initialization

My $VIM\_vimrc is as follows: source $VIMRUNTIME/vimrc_example.vim source $VIMRUNTIME/mswin.vim behave mswin My $HOME\_vimrc does not have this option. I was led to believe that Vim first invokes ...
3
votes
0answers
138 views

How to load vim-javascript using Vim 8 native package manager?

I am long time Vim (Windows 10, gVim 8.1) user, happy as a clam with Vim 7. I have not used any of the plugin managers, just the one-off plugin from vim.org. I went looking for plugins to help with ...
0
votes
1answer
163 views

Auto-Deleting Swaps, Backups and Undos while Quitting vim?

Cluttering Swaps and Backups that I never use are so annoying and takes up unnecessary space. Is there a way to delete them as one quits vim with :q and similar quitting commands?
1
vote
2answers
577 views

How to show tabs normally when 'set list'?

Sometime there is 0xa0 in my code, which causes compile error and hard to find out where it is because it's invisible.. I searched on google and found set listchars=nbsp:. can make the 0xa0 visible. ...
1
vote
1answer
26 views

Retrieving results from variations of system('top') returns errors

Directly on the Ubuntu terminal, I can extract the results from top regarding a specific PID with: top -p <pid> -n1 | awk '/<pid>/' Where <pid> should be substituted with a PID ...
3
votes
0answers
68 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 ...
0
votes
0answers
65 views

2-pane layout on vim for writing (with narrowing fuction, goyo, and outlining)

Is it possible to get a layout like this using only vim? Desired functionalities: A) 2 pane layout like VOoM B) Narrowed region of the whole document on 2nd (right) panel with formatted like ...
2
votes
1answer
847 views

Unable to install most recent gvim 8.1 on Ubuntu

On Ubuntu, when I do vim --version in the terminal I get: VIM - Vi IMproved 8.1 (2018 May 18, compiled Jan 6 2019 14:05:44) Included patches: 1-699 However, when I do gvim --version I get: ...
1
vote
1answer
46 views

How to create or modify vim commands?

In Vim wrapping lines at 80 characters without breaking words can be done with the following commands according to this article: :set formatoptions+=w :set tw=80 gggqG Setting 80 char wrap is ...
0
votes
1answer
632 views

Setting default gVim font via `vimrc`, conditional on the operating system

I can place the following code into my _vimrc file on Windows 7/10 and the font will default to 'Consolas - size 11' when I launch gVim. if has("gui_running") if has("gui_gtk2") set guifont=...
3
votes
1answer
1k 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....
0
votes
1answer
109 views

Matching 'Capitalized' words in Vim

I'm trying to use the following regex to match 'Capitalized' words: "\l\@<!\<\u\w\+" Which matches 'Main' and 'Canvas' in: public class Main extends Canvas Or another example, matches all ...
0
votes
1answer
225 views

Need to run PlugInstall on each open

I have a .gvimrc file created to configure MacVim. I'm using Plug for package management. My .gvimrc looks as follows: call plug#begin() Plug 'tpope/vim-sensible' " sensible defaults Plug 'joshdick/...
0
votes
0answers
166 views

(Windows 10) Set Vim as Default Text Editor AND use with NERDTree

My answer in https://vi.stackexchange.com/a/18064/19950 shows the current predicament I face, where I used cmd.exe and the following code ftype VimFile="C:\Program Files (x86)\Vim\vim81\gvim.exe" ...
0
votes
1answer
103 views

regex characters replace multiple characters

what is the most efficient regex (vim/perl) to replace 10 'a' characters with 1 'c' character followed by 100 'b' characters? this does not work: :%s/a{10}/\=repeat('c',1)\=repeat('b',100)/g