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
2answers
23 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
26 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
25 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
34 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
39 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
66 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
43 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
17 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
53 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
176 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
28 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
33 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
62 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
56 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
27 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
44 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
57 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
90 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
74 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
43 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
27 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
98 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
102 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
77 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
79 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
322 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
24 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
47 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
61 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 ...
1
vote
1answer
347 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
34 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
433 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
670 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
90 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
123 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
141 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
67 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
350 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
44 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 ...
2
votes
0answers
55 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
66 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
113 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
71 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
144 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
35 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
388 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
37 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 ...
2
votes
1answer
317 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
159 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
30 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 ...