Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
2answers
27 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
25 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
53 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
0
votes
1answer
29 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
36 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
27 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
56 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
22 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
37 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
53 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 ...
0
votes
1answer
80 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
30 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
103 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=...
2
votes
1answer
144 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
78 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
65 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
96 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
40 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
1
vote
2answers
130 views

How to set vim as the default Text editor?

I'm trying to set gVim to be the default text editor on Windows but it won't work. It works with notepad++, editor... but not with Vim. Any ideas how to fix it? Screenshot: http://prntscr.com/lm069a ...
0
votes
0answers
38 views

Vim doesn't understand <Tab>, <Enter>

I have UltiSnips plugin's options in .vimrc: let g:UltiSnipsExpandTrigger="<Enter>" let g:UltiSnipsJumpForwardTrigger = "<Tab>" let g:UltiSnipsJumpBackwardTrigger = "<S-Tab>" With ...
1
vote
0answers
41 views

Cursor change when GVIM lost focus

In GVIM I use vertical thin line as my cursor by adding following line to my .gvimrc set guicursor=a:ver13-Cursor This works perfectly as long as window remained focused. As soon as GVIM window lost ...
1
vote
1answer
49 views

gVim: How to prevent horizonal scrollbar from resetting when scrolling vertically?

I am quite new to Vim and am trying to configure gVim with some of the behaviour that I like from notepad++. I disabled text wrapping with :set nowrap, then added the horizontal scrollbar with :set ...
0
votes
1answer
83 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
50 views

Indentation command `gg=G` for 'compressed' HTML doesn't unfold tags

Sometimes I copy 'compressed' HTML from TEXTAREA an I get code for ex. like this: <html><body><h1>header1</h1><p></p> <p></p> <div><p></...
3
votes
0answers
87 views

Why are Vim 8 :term colours with gvim different from those in plain vim :term or bash?

Vim 8 :term colours in gvim happen to be different from those seen in plain vim :term or bash. How come? How does one obtain the same bash colours in gvim? EDIT: I have been reading a bit more about ...
0
votes
1answer
22 views

How to map <A-h> without opening gvim help?

I would like to create a custom mapping for the <A-h>, i.e. Alt+h key combination. nnoremap <silent> <A-h> … However unlike <A-l>, this particular key combination opens the ...
1
vote
2answers
300 views

Syntax highlight works for gvim but not for terminal vim

I am new to vim and I want to code in vim. I have installed the necessary plugins for syntax highlighting JSX in TypeScript and everything works fine for GUI version of Vim but not for terminal-based ...
2
votes
0answers
34 views

gvim gnome hides command prompt

This is not firmly reproducible but when I run ctrl+wv to create a vertical split window, I sometimes lose visibility to the colon command prompt. Command prompt still works invisibly. Sometimes I can ...
1
vote
1answer
143 views

opening powershell from inside vim

I want to run powershell from vim and I have achieved it using the following mapping: map <leader>cd :cd %:p:h<cr>:silent !powershell<cr> The problem is that I can't do anything ...
0
votes
0answers
85 views

Why gvim can't work with command: p4 client?

P4EDITOR is set to gvim in .p4enviro. When run command p4 client in terminal, it will pop an empty tmp file. But if change editor config to P4EDITOR=vim, it works fine. How to fix this?
0
votes
1answer
27 views

Comment character is not auto-indented in Bash and Python scripts

The cursor is on line 20. After pressing o the cursor (here depicted with a |) is placed below the e of ext as expected: 18 # set default extension 19 if [ -z "$2" ]; then 20 ext='pdf' | 21 ...
0
votes
2answers
95 views

Run command to disable a plugin in modeline

System: gvim 8.1 1-116 / windows10 A file that I'd like to use modeline (enabled): # vim: ft=python but disable ale plugin that will trigger on save - the file contains some python codes. Command ...
0
votes
1answer
77 views

how to set filetype after session restored with vim-session plugin

I used exvim as session manager, it uses a project file with extension .exvim. The session is auto-loaded when double click the .exvim, and auto-saved on exit. But there're bugs and the dev is ...
1
vote
1answer
154 views

Command line messages disappear in a flash

A while back I started using guioptions +=k to (from help guioptions): Keep the GUI window size when adding/removing a scrollbar, or toolbar, tabline, etc. Instead, the behavior is ...
1
vote
1answer
54 views

Make :f do the same thing as :find in Vim

I want to make :f do the same thing as :find so if I type :f abc.txt, it should run :find abc.txt. I tried to do something like cmap f find but that just make any f into find
1
vote
3answers
66 views

How to check if my .vim/buflist.txt file is empty or contains whitespace(s) in _vimrc

How to check if my .vim/buflist.txt file is empty or contains whitespace(s) in _vimrc of my gVim on Windows 10? I tried this: let BufferListFile = $HOME . "/.vim/buflist.txt" echo BufferListFile " ...
0
votes
2answers
94 views

Maximizing gVim on Windows 10 while also restoring all open files / tabs

On Windows 10, I installed gVim 8.1, so far I have made the following progress to make it usable for me: I made changes directly to _vimrc file, in spite I know there is also a gVim specific ...
1
vote
1answer
683 views

How to adjust gVim to my HiDPI display scaling on Windows 10?

Being a user of GUI editors (mostly Sublime Text) and one simple CLI editor (nano), and just having gVim (the GUI version of vim) installed on my Windows 10, I can't figure out how to adjust this ...
0
votes
1answer
219 views

How to change gVim icon on Windows?

When open gvim, there is a small icon Vim in the title plus buffer name. I'd like to be able to hack anything about vim, including being able to change this gvim's icon. Is there a way to do that?
0
votes
2answers
57 views

Number of columns highlighted

As I am moving from Windows to Linux for my development machine, I have noticed a difference in vim between the Windows version and the Linux version. The windows will show you the number of ...
1
vote
0answers
40 views

How to auto save on *.coffee files when lose focus (in insert mode) then also back to normal mode

I'd like to lose focus when I'm in insert mode, to trigger auto-save on *.coffee buffers and also I need it to change mode from insert to normal mode to trigger Live compile feature of vim-coffee-...
1
vote
2answers
1k 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 ...
0
votes
1answer
73 views

Vim (Spacevim); :!git push == permission denied (publickey)

I have operating system: Windows 7. Git bash works fine for me, and it uses the public key id_rsa.pub. I can run git commands fine through window's command prompt as well - and it too uses the public ...
1
vote
2answers
138 views

How to start gvim from command line with predefine pasting from clipboard

I know gvim -c [command] samaple.txt might run command predefined in command body. How to paste text from windows clipboard at the end of sample.txt file?
0
votes
0answers
34 views

Highlight block of injected code [duplicate]

windows 10/ gvim 1-1802. I use Javascript and there are sometimes blocks of HTML code that need to be inside a particular region that can be indicated by """, for example . I have a similar ...
0
votes
1answer
49 views

How to have a buffer takes 1/4 of a window and another takes all the rest?

I have two buffers, and would like one takes 1/4 of a window and other takes rest of the window. Normal behavior would be for example sp or vsp would split buffer to take 50/50 percent each, there ...
0
votes
0answers
148 views

Running commands when switching to gui mode?

I only recently realized that I have a vimx binary installed that allows me to switch from terminal mode to gui mode with the :gui command. This is nice but it has complicated my configuration ...
0
votes
1answer
49 views

Why is this map added using <Plug> not showing up?

From my .vimrc: nmap s <Plug>(easymotion-overwin-f) This sets up an nmap which invokes the EasyMotion plugin when I type ,s. And that nmap works just fine, and is indeed triggered by ,s. ...
1
vote
1answer
127 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>"Syntax-Error Log.txt" While ...
1
vote
0answers
65 views

Does Windows GUI Vim perform font substitution for glyphs unavailable in current font?

MacVim specifically (if obliquely) mentions font substitution, and I've found evidence online that GTK2 gVim does too. But does Windows gvim? N.B. I'm already aware of the 'guifontwide' setting.