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
0 votes
1 answer
202 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
1 answer
54 views

Change font size => change gVim window size

I wish the gVim window to not resize when I change the font size. Is there any way to achieve this? More explanation: when I change font size in gVim then the gVim window resize automatically whereas ...
1 vote
1 answer
112 views

Caps-Lock plus Shift for lower case alphabet

I am using gVim on Microsoft Windows. Consider two types of alphabet entering: When the Caps-Lock is off, enter upper case alphabet with Shift-. When the Caps-Lock is on, enter lower case alphabet ...
1 vote
3 answers
151 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 ...
0 votes
1 answer
231 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 ...
4 votes
2 answers
262 views

Setting 'viewdir' does not work with :mkview

I'm trying to use :mkview with 'viewdir'. I set 'viewdir' as the help page said: set viewdir='C:/Users/MyPC/vimfiles/view' and made sure that C:/Users/MyPc/vimfiles/view exists, but I still get error ...
0 votes
2 answers
162 views

g[lobal] with a s[ubstitution]

I would like to add a dot after the first number in a line. I tried using the command below. :g/\v^\d/exe "norm!:s/\v(\d)/\1\./^M" The command above does not work. I recorded the macro @q=':...
1 vote
0 answers
58 views

Is there any "minimalist" GVim (or any GUI-based Vim) distribution for Windows?

I'm currently working on a simple WPF (Windows) application that employs GVim as an embedded text editor. The application is supposed to embed GVim into itself as follows (although it's mostly ...
1 vote
1 answer
380 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
102 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 ...
0 votes
0 answers
21 views

in csh terminal gvim -d is sourcing .cshrc file

In csh shell, whenever I am doing gvim -d it is sourcing .cshrc file. I tried passing -f option. It is not working. I tried solution suggested in: How to disable vim source .cshrc when running ...
0 votes
1 answer
104 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?
1 vote
2 answers
66 views

Store a windows path in a global variable and access it later?

I want to store a path in a global variable and then change to a directory. :let g:OneDriveB='C:\Users\bram\SomeDrive\ -\ Das\ Company\ Name\' # Works. :cd g:OneDriveB # This second ex fails as the ...
3 votes
1 answer
622 views

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

I find in neovimcraft 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 ...
0 votes
2 answers
28 views

Key Shortcut to Search

Which key(s) are the shortcut for searching the file for the word the cursor was on? I was distracted and didn't realize that I was still in gvim when I started typing something for the terminal. ...
1 vote
1 answer
40 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
220 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
320 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
76 views

Start Vim window at a certain size?

Is there anything I can put in my _vimrc for gVim to make the window open a certain width/height?
1 vote
2 answers
53 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-...
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 ...
1 vote
1 answer
91 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
1 answer
56 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
0 answers
26 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 ...
2 votes
2 answers
117 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
668 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 ...
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?
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
84 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
360 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
45 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
55 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
48 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
82 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
166 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
105 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
229 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
31 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 ...
2 votes
0 answers
64 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
158 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
50 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
130 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""" ...
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}) *...
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 (...
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
156 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 ...
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:{ ...

1
2 3 4 5
10