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.
447
questions
0
votes
1
answer
20
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
39
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 ...
-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 ...
1
vote
1
answer
25
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
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
1
answer
92
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
1
answer
138
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 ...
0
votes
2
answers
63
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
48
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 ...
1
vote
1
answer
24
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 ...
0
votes
0
answers
30
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
68
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
101
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 ...
0
votes
1
answer
34
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
0
votes
3
answers
270
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
1
answer
17
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
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
41
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
314
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
56
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
554
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 ...
1
vote
1
answer
274
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 ...
0
votes
1
answer
33
views
readonly in gvim windows
I don't know what causes it, but in Windows i use GVim (portable GVim), and need to open some file (that already exist, Vim didn't created it), but it opens it in readonly mode.
i need to use w! to ...
0
votes
1
answer
73
views
How can I open MDN link in coc.css popup?
Sorry for my English. I installed coc-nvim plugin in my vim (gvim in windows) after that I insert CocInstall coc-css command for css snippets.
In this picture I highlighted MDN Reference.
How can I ...
1
vote
1
answer
35
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 ...
0
votes
2
answers
119
views
I am using Vim 7.4. I do not have admin privilege to update it. I want to use plugins as I cannot use plugin manager
I download Vim-plug but I am unable to use it.
I have downloaded NERDTree in ~/.vim/pack/vendor/start/nerdtree.
But when I give command :NERDTree in gVim editor it gives an error:
Not an editor ...
0
votes
1
answer
52
views
mapping two commands in one shortcut
I am using gvim 9.0.1047 on Windows 10
I added the following to my vimrc so I can run the sas program I am working on and open the log file without leaving vim:
map <F12> :!"C:\Program ...
0
votes
1
answer
49
views
How do I disable access keys in gVim
I'm looking for a way to disable the access keys in gVim.
For example, when I press alt+f, the "File" menu pops up.
This is behavior that I want to remove, so I can use these keybinds for ...
0
votes
2
answers
2k
views
How to select all text and delete in vi?
Is it possible to select all the text and delete it it in vi other than hitting backspace?
0
votes
1
answer
45
views
Some Normal mode mappings not working in vim9 anymore
I have the following in my configuration:
nnoremap µ iii
nnoremap ° ioo
I'm using gvim, on Windows 10, using an azerty keyboard (so µ is <S-*> and ° is <S-)).
The mappings work in vim8, but ...
1
vote
1
answer
99
views
Vim does not see single quotes
I want to use Vim (MacVim) to remove all single quotes from a file. I tried the following:
:%s/'//g
:%s/\'//g
but in both cases, Vim returns:
E486: Pattern not found:
I get the same error when I ...
0
votes
1
answer
80
views
How can I make 'quickfixtextfunc' work with cfilter using a vim9's "def" function?
On Windows 10, using gvim, when editing a file like the following example:
foo
foobar
baz
As long as I use a function and not a def, I can do the following and Cfilter will work as expected:
:...
0
votes
0
answers
44
views
^@ added when calling system in cmd.exe [duplicate]
Here is an excerpt of my vimrc
let g:conda_activate = 'myenv'
function Condaenv(env)
return trim(system("conda activate ". a:env. " && call echo %CONDA_DEFAULT_ENV%"))
...
2
votes
0
answers
157
views
Cannot set guifont or guifontwide to installed font
OS and desktop environment info:
uname -a
Linux debian 5.10.0-18-amd64 #1 SMP Debian 5.10.140-1 (2022-09-02) x86_64 GNU/Linux
sudo dpkg -s lxde | grep Version
Version: 11
sudo dpkg -s lxappearance | ...
0
votes
1
answer
43
views
Key mapping across different Tabs
I have mapped F10 key to execute different programs (pdflatex, python) depending on the
file extension.
autocmd Filetype tex map <F10> :lcd %:p:h<CR> :bel ter pdflatex % <CR>
autocmd ...
0
votes
0
answers
27
views
directly copying from `vim` to `mariadb` shell causing error
I have a file https://0x0.st/oYoB.com_5zfu
After opening it with vim I tried to copy some portion of code and paste it in the mariadb shell. But it looked like mariadb was giving error.
MariaDB [...
1
vote
0
answers
43
views
How to solve vim editing data files on multiple locations (eg: different devices)?
Sorry for my lousy title, feel free to improve it because i am not good at describing my issue.
I don't know how to use 1 sentence to describe my problem, hence lengthy text below. sorry.
I uses vim ...
0
votes
0
answers
88
views
Set fallback font in gvim
gVim provides an option, :h guifont, to set the font of the gui window. Although it accepts a comma-separated list of fonts, it selects the first available font. If a symbol doesn't exist in the ...
1
vote
2
answers
176
views
Does gvimfullscreen.dll working with gVim 9.0 on Windows?
I used to use gvimfullscreen.dll to toggle a full screen window state on gvim for Windows. It made gvim full screen, not maximised, with no titlebar.
I have not used gvim on Windows for some time ...
-2
votes
0
answers
62
views
Pre-Migration Risk Assessment - Vim to Neovim (5of8) [closed]
(Shared preamble)
With my pending adoption of Ubuntu MATE 22.04, I am looking primarily at Neovim, with possible adaptation as SpaceVim/LunarVim. I am comfortable with Vim, but am looking for a ...
-2
votes
0
answers
55
views
Pre-Migration Risk Assessment - Vim to Neovim (2of8) [duplicate]
(Shared preamble)
With my pending adoption of Ubuntu MATE 22.04, I am looking primarily at neovim, with possible adaptation as spacevim/lunarvim. I am very comfortable with Vim, but am looking for a ...
0
votes
1
answer
524
views
How can I install fzf in vim without using a plugin manager? [duplicate]
I have fzf installed in manjaro (/usr/bin/fzf, /usr/share/fzf), but I can't seems to figure out how to install fzf for vim. I'm having trouble following these instructions: https://github.com/junegunn/...
1
vote
2
answers
114
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 ...
8
votes
1
answer
2k
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?
1
vote
1
answer
85
views
Detect line endings in current buffer, substitute all line endings depending on result
In GVIM, I'd like to save the current file with either \r\n or \n line endings. Depending on the opened file, the appropriate line endings should be chosen automatically. I had a look at https://unix....
1
vote
0
answers
60
views
How to change Vim's unsaved change symbol + to *?
By default, the unsaved change symbol is + shown ahead of the file name on tab-bar or on title-bar.
Is it possible to change this symbol?
For example, to *.
1
vote
1
answer
52
views
Replace all the backticks with tildas by using GUI
To replace
```
code blocks fenced with backticks
```
with
~~~
code blocks fenced with tildas
~~~
I can use :%s/```/\~\~\~/g and this works.
However, when I try to replace them with GUI (Edit > ...
0
votes
0
answers
30
views
Get Gvim window width in X-window without xdotool?
I have a long-term goal of writing VimScript functions to dock my Gvim window as a thin window abutted to the left or right edge of my desktop. I am using Windows 10, but with Cygwin's X-Window and ...
3
votes
1
answer
318
views
Search multiple keywords in a sentence that are not in the right order as in the search pattern
I often need to find several keywords in a sentence.
For example:
This is just a sentence of word1 word3 word4 word2 text in my huge Vim data file.
I can't remember the exact pattern of search, hence ...
0
votes
0
answers
418
views
Building gvim inside WSL 2 Ubuntu
Details of what already exists inside WSL 2 Ubuntu 20.04 inside Microsot Windows 11:
$ vi --version
VIM - Vi IMproved 8.1 (2018 May 18, compiled Feb 01 2022 09:16:32)
Included patches: 1-2269, 3612, ...