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
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 ...
0 votes
1 answer
192 views

gvim 8.2 on Windows 10 - Right Click Taskbar Icon - Recent Files won't open files with .sql extension

I'm having a problem opening certain files (file extensions .sql, .ora) from gvim Version 8.2 using the Windows taskbar icon recent files list. I have associated the .sql file extension with gvim. No ...
1 vote
2 answers
43 views

In gVim 9.1 how to have different backgrounds for text and the empty area to the right of <EOL>, with hlsearch ans syntax highlight still working?

I would like to use two different backgrounds colors bg1 and bg2 with: bg1 for all text on a line (possibly nothing if line is empty) up to the end-of-line, bg2 for the empty area after the end-of-...
1 vote
1 answer
43 views

Ligature (combining characters) doesn't show in gVim

I use JetBrainsMono in my terminal and gVim. In my terminal, arrows and pipelines become one character visually (-> and |>) gVim has the same font but this same behavior doesn't happen. How can ...
1 vote
2 answers
132 views

Why `highlight X ...` from `.vimrc` does not work in gVim (but works in VIM) and I have to type it again during session?

For following snippet of code, to see what was highlighted I need to run :highlight LineHighlight ctermbg=darkgray guibg=drakgray after running vim session, and then rest of snippet works (i.e. loads ...
1 vote
1 answer
51 views

Pasting from system clipboard works bad in "Visual-block" mode?

For example: mode: Visual-block. In Gvim: Now, I want to paste the system clipboard, say "4", to the position, I tried "p", now it becomes (that's not what I want!): In Gvim: ...
0 votes
1 answer
24 views

Vim register becomes random values in gvim

Given the php code at the end, I add it to my gVim register with "ky. Everything is fine. After some time, when I use it, the vim register looks like this: jjjjjjjjjjjjj/^...
0 votes
1 answer
200 views

How do I highlight #-comments in UPF files?

I have a file with the extension *.upf in which the # is not highlighted. I use # for comments. :syntax on also doesn't seem to work. The issue here is I have a file (*.upf) which is generated by ...
1 vote
1 answer
41 views

Normal mappings not working anymore in Vim 9.0 for foreign and special characters

I used to have the following key mappings within _vimrc: nmap è "_ddP nmap ò yaw nmap à "_dwP nmap § .n working in Vim 7.4 on Windows and an Italian keyboard. Now, after upgrading to Vim 9....
0 votes
0 answers
23 views

Overview of unsaved file when quitting gVim

When quitting gVim by closing the gVim windows I get a warning message asking me if I want to save my change or not (in case there are unsaved buffers): gVim doesn't show unsaved buffers. It is ...
1 vote
1 answer
369 views

How to run/debug ahk (AutoHotScripts) scripts using gVim, Vim?

How to execute ahk (AutoHotScripts) scripts using gVim? Let say I have interpreter: "C:\Program Files\AutoHotkey\AutoHotkey.exe" /ErrorStdOut "d:\ahk\myscript.ahk" 2>"...
1 vote
1 answer
98 views

Inserting digraphs but unintentionally holding down CTRL key

In insert mode, I insert digraphs using CTRL-k. For example, I get é by pressing CTRL-k ' e. However, when typing fast, I am often still holding down the CTRL key when I hit the ' key which cause Vim ...
2 votes
2 answers
113 views

Can't stop the global command using subcommand :substitute (:s) with the check flag (c)

I'm trying to use the global command :g with :substitute to find and replace some string and also with check. So the command like: g/\d/s/.*//gc but the check behavior is not same as in :s I can't ...
1 vote
1 answer
647 views

Opening recent files issue

TLDR: How can I open a file from the list of recent files without going to the end of the list to get to the prompt for file number? In order to open recent files, I do :bro ol and then when I see ...
0 votes
1 answer
96 views

When I use helpgrep, how can I highlight my search results?

I'm using :helpg session in my Vim. I would like to highlight the pattern in the results like :set hls does for normal search. Is there a way to do this?
81 votes
11 answers
134k 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?
0 votes
1 answer
22 views

I cannot detect where is ^M in my .gvimrc

I have the following .gvimrc: vim9script # ----------------------------------- # This file is sourced AFTER .vimrc # ----------------------------------- set mousehide # Set fonts for gvim # fontsize ...
1 vote
1 answer
36 views

Move between buffers of a certain filetype

scenario: I have a bunch of programs that generate output, the programs and output are open in buffers and the programs are one filetype eg .r and the output is another filetype eg .txt I want to ...
1 vote
1 answer
206 views

Choose Gvim font that maps pixel-to-pixel with display?

I recently bought a Windows 10 laptop, TravelMate P2410-G2-M. The resolution is set to the native physical resolution of the display. However, my Gvim text displays with some pixel columns/rows ...
2 votes
1 answer
2k 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 ...
0 votes
1 answer
263 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 ...
1 vote
1 answer
52 views

Set different colours for different HTML tags

Can we set different colours for different tags in HTML syntax? For example, set a tags to green and div tags to yellow. In VsCode this extension makes HTML tags coloured inside .html, .jsx, .tsx and ...
2 votes
1 answer
333 views

How to tabdo all the visible buffers without changing view of the current tab?

My init.vim code: cd ~/Documents/cp nnoremap <leader>lcd :tabdo lcd %:p:h<cr> suppose, i have 4 tabs opened in nvim via using nvim -p A.cpp B.cpp C.cpp D.cpp A.cpp B.cpp C.cpp D.cpp ...
1 vote
1 answer
34 views

How to use different font size for different highlight group?

There is a similar question gVim - Use different fonts using :highlight but no answer yet. In short, is it possible to apply different font size to different highlight group? For example, while normal ...
-1 votes
2 answers
53 views

Counting the occurence and printing summary of that

I want to sumarize data information as output shown. My data look like this: apple orange{1} orange{2} ... orange{600} mango{1} mango{2} ... mango{600} strawberry blueberry I want output summary ...
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 ...
1 vote
1 answer
45 views

How can I use Regex in helpgrep?

I would like to use Regex in helpgrep. For example, searching for lines or sections that contain two words. Something like :helpg 'word1' & 'word4' to find this line as my result: word1 word2 ...
0 votes
2 answers
71 views

Why doesn't echo % do anything in command mode?

I read the section of current-file in the document. (see :h current-file) And I have a question. if % stands for the current file name, why I can not use echo %?
1 vote
1 answer
151 views

Why so % does not work when vimrc changes with another editor?

I opened a file in Vim. Then opened vimrc file with another editor (VsCode) and made some changes. I would like those changes to be reflected in my Vim session. I tried :so % but it didn't work ...
1 vote
1 answer
74 views

What is the meaning of lbr in Vim?

I write set lbr in my vimrc file but I don't know the meaning of that. What does this option do? I know it's about line-breaking but I need more explanation. This is from the Vim document and I can ...
0 votes
1 answer
136 views

Latest gvim unreadable on Ubuntu 22.04.3 LTS. Anyone else have issues?

After upgrading to Ubuntu 22.04.3 LTS, gvim no longer is readable. Both the default version that Ubuntu installs (version 8.2.4919) and the lastest released version of gvim (version 9.0.1677) It ...
1 vote
1 answer
27 views

Pause the rendering/refreshing/drawing of the gVim/Vim screen

I am developing a gVim plugin that manages/reorganizes panels, buffers and tabs. However, while most programmatic re-arranging take milliseconds, they can still look very messy to the eyes while you ...
1 vote
0 answers
43 views

gvim can be really slow to display the last typed character in VirtualBox. How do I fix that issue?

While working in an Ubuntu VirtualBox (host is also Ubuntu), gvim is being really slow at showing the last character I just typed, or, when I move the cursor up/down/left/right, it also takes 1 to 2 ...
1 vote
1 answer
111 views

How to generate random string with required length in Vim?

I am using this code for console log nmap cll yiwocll<Esc>p I wanted to add some random string inside this console log, assume 10 characters symbols length. How to achieve this?
0 votes
1 answer
41 views

gVim: change colorscheme base on os (desktop) theme

How can I set two color schemes in vim, one when the desktop theme is light and one when the desktop theme is dark? It is particularly useful when using gVim, plugin suggestions are welcome
1 vote
1 answer
129 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""" ...
7 votes
0 answers
15k 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}) *...
19 votes
3 answers
22k 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 (...
3 votes
3 answers
6k 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 ...
1 vote
2 answers
127 views

Gvim Python loading issue (despite being correctly installed)

I found a lot of questions about it, some problem was about 32 or 64 bit, other was about python support compiled in vim, etc. None was my case. Preamble: Software installed I installed Python on ...
62 votes
2 answers
20k 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:{ ...
0 votes
1 answer
20 views

gvim often give this error: E8backupdir=~/.vim/tmps failed to start the GUI

I often log in remotely to a specific server using ssh -X from a Macbook Pro terminal instance. When I use gvim then usually I get a local Xwindow and can edit normally while the terminal session ...
0 votes
3 answers
336 views

Switch focus to :terminal buffer

I am trying to recreate the functionality of the very old conque plugin via terminal in modern vim. So far I have found a few plugins that send code to a terminal buffer. However, these do not update ...
0 votes
0 answers
21 views

BufEnter events triggered with a mouse click in gvim: line('.') appear to return a wrong value. How to fix it?

Consider the following auto-group augroup Test au! autocmd BufEnter * :echo line('.') augroup END and open two different buffers in split windows. When using commands such as wincmd p, then ...
0 votes
3 answers
42 views

Prevent: 'are you sure' popup on exit when closing the gVim window

Is there a setting that will allow you to just close the window without bothering with the save changes dialog when you exit? Do you have to attach it to an event that answers for you?
1 vote
1 answer
455 views

How can we know if we can intall a plugin on both Vim and Neovim?

I find in noevimcraft a list of Neovim plugins Can we install them inside Vim or gVim? It seems that the plugins in vimawsome can be installed on Neovim but not always in Vim. Is that correct? How can ...
1 vote
2 answers
60 views

Abort background process

Sometimes when a background process in Vim runs (in my case, compiling a poorly written LaTeX document) the background process stops which makes Vim unresponsive. Terminating the process from terminal ...
2 votes
1 answer
561 views

What is the arrow notation in the start of some lines in Vim?

I was training in my Vim (gVim on Windows) that suddenly I saw this arrow notation ( >> ) in the start of some lines. When I oppend a javascript file, these appears to me. Do you know what are ...
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 ...
1 vote
1 answer
346 views

How can I see a list of snippets in my Vim?

I installed vim-snippets, ultisnips and coc.nvim in my Vim (gVim on Windows). How can I see a list of snippets that I can use in my current open file? For example, when I'm editing a .js file, I want ...

1
2 3 4 5
10