Stack Exchange Network

Stack Exchange network consists of 174 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 [microsoft-windows]

For questions specific to Vim implementations on the Microsoft Windows operating system.

0
votes
0answers
24 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" ...
1
vote
2answers
61 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
30 views

mapping does not work even if I have set it up in config file

I am using Neovim on Windows using Cmder console emulator. I find that using [NUM]<Ctrl-6> to change to buffer [NUM] does not work on Windows. Following discussions here. I have set up a mapping:...
3
votes
2answers
104 views

Why can't I paste commands into vi?

I've been using vi for 40 years. A week ago I upgraded; Disaster struck! The upgrade was to VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Mar 4 2018 23:38:28) I run this on xterm under Cygwin (...
0
votes
2answers
24 views

How do I clear Neovim window after exiting Neovim on Window 10

On Linux, when I exit Neovim, the content in the Neovim window is cleared. But on Windows 10, when I exit Neovim, the content is still shown and is not cleared, leaving a lot of empty space (see image ...
0
votes
1answer
30 views

Why Backspace key do not work in insert mode in shell file by default in Cygwin?

I am using cygwin to run "linux command line" on windows 10. But here, backspace key doesn't work in insert mode. I had to edit my .vimrc file by setting "nocompatible and "bs=2" to make it work (by ...
0
votes
1answer
47 views

Has nvim ever worked on windows for anyone?

Neovim from the command line works great in Linux, and I have been using it as a drop in replacement for vim. However, I am forced to work with windows (7) at my workplace. I am using vim8 which ...
0
votes
1answer
46 views

Changing the vim color scheme only highlights lines of text?

I'm a big noob to vim here. I was trying to change the colorscheme of vim by editing the .vimrc file, but as I was playing around with different color schemes (ayu and gruvbox, for example) I noticed ...
0
votes
1answer
156 views

24-bit / 256 colorscheme in Windows console

I'm using 64-bit Vim 8.1.0428 on Windows 10 release 1803. The Windows 10 console now has 24-bit colours, and Vim 8 has been patched to handle 24-bit colours in the Windows console (i.e. using vim.exe ...
0
votes
1answer
27 views

How to un-silent exec in vim only if there is an error?

I have a few hotkeys mapped in my .vimrc (see below) for compiling and running autohotkey scripts but I can either be annoyed by the quest for the any key or I can run them silent and be unaware if ...
0
votes
0answers
17 views

Vimdiff causes command prompt to freeze with one particular file

I recently installed Vim for Windows (10) on my laptop and its mostly been working fine but, if I try to vimdiff with a text document I'm writing, it causes the command prompt to freeze. In general, ...
1
vote
1answer
61 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
2answers
60 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 ...
2
votes
1answer
41 views

Revert effect of source $VIMRUNTIME\mswin.vim

On Windows, Vim does source $VIMRUNTIME\mswin.vim in its system-wide config and remaps many keys. I'd like to have default Vim key bindings but I don't want to touch system-wide config. How do I do ...
1
vote
3answers
60 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
1answer
133 views

How to add “Edit with gVim Easy” context menu item in Windows 10

I originally just wanted to change the context menu item: Edit with Vim to Edit with gVim Easy and adjust the respective command appropriately. But since I found out, some DLL is responsible ...
0
votes
2answers
69 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
381 views

Compile vim with python3 support in Windows

I'm used to Ubuntu and know how to compile and edit vim. But how can i compile vim with python3 support on windows ? Prefer to do it from the terminal. But i don't mind if i need to do it with miniGW ...
0
votes
1answer
339 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 ...
1
vote
1answer
64 views

Extended ASCII characters changed upon opening Vim in different shell

Specifically, I have encountered this issue with the lowercase a with an umlaut ä and the lowercase scharfes s ß. Their (extended) ASCII values are 0xDF and 0xE4, respectively: This can be seen, in ...
0
votes
1answer
148 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
0answers
23 views

error output when using commands proxied via WSL (asyncrun plugin)

I have wsl - ubuntu installed under Windows 10. Some ubuntu's commands are proxied to use in cmd by create .bat files and add them to PATH environment of windows10, pattern like following: @echo off ...
2
votes
0answers
43 views

How do I pass a full filepath to a function in a Vim plug-in?

I have an exe program that checks for certain errors in a text file. I want to create a shortcut (like \+M) to run that exe file against the text file. My exe file's path is C:\Users\xyz\Documents\...
3
votes
0answers
135 views

How to create an Edit-with-Vim context menu entry for Vim 8.1 on Windows 10

The Explorer context menu entry does not get created by the installer. Windows 10 Pro v1803 (64-bit). What I have already tried: Installed Vim 8.1 using the stock Windows installer https://ftp.nluug....
1
vote
1answer
177 views

Cannot find color scheme error in Neovim

I installed Neovim on Windows 8.1 using Chocolatey. But the problem is I cannot see any color scheme as shown in the tutorials. I have cloned a repo from GitHub to ~/.config/nvim/colors/ and it has ...
0
votes
2answers
638 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
1answer
666 views

Fatal Python error: Py_Initialize: unable to load the file system codec ImportError: No module named 'encodings'

I am new to vim. As much as I love it, there seem to be a lot of bugs or errors every time I try doing something. I am unable to run the plugin "browserlink.vim" (https://github.com/jaxbot/...
0
votes
0answers
66 views

How to install emmet-vim and pathogen in windows properly?

Download vim and gir for windows ,then install them. 1. Install vim in "C:\Program Files\Vim\". 2. Download git for windows from the url. git for windows Opne git for windows as ...
1
vote
1answer
109 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
1answer
118 views

init.vim cannot be found

I hope this question is a duplicate one because I have already tried to find init.vim inside the nvim folder but I am unable to locate the file. Also, would I have to create it explicitly or would it ...
1
vote
0answers
60 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.
3
votes
1answer
81 views

Parsing a valid normal-mode command (possibly with regex)? (for Vim-like Word add-in)

I am writing a VBA routine so I can use normal-mode commands in Microsoft Word. (Yes, I am! Edit And here you go!) I am only going to support the d, c, and y operators initially, and only char/word/...
0
votes
1answer
259 views

How to successfully back out to command prompt with Ctrl-Z in Neovim on Windows?

I know there's a number of ways you can suspend a Neovim/Vim session. One way being CTRL-Z to jump back into the command prompt, and press fg and ENTER to go back into your Neovim/Vim session. ...
1
vote
1answer
115 views

How to customize the color of an HTML output file generated from Git Bash?

I have used the following command in Git Bash to perform a 'vimdiff' for 2 XML files. vimdiff xml1.xml xml2.xml -c TOhtml -c 'w! result.html' -c 'qa!' The HTML file which is getting generated is ...
1
vote
0answers
36 views

Change where a register actually points (in this case, redirect “+” [sys clipboard], to an external program) [duplicate]

Setting up vim on WSL, and I want to be able to redirect the vim internal clipboard to the windows clipboard. This is possible if running an X server like XMing, but I don't want to do that. I have 2 ...
2
votes
1answer
206 views

What is the correct way to escape UNC paths?

Let's say there is a file \\server-42\tmp\dir\test.txt. When my plugin tries to execute this command via system() it triggers an error: cd "\\server-42\tmp\dir" && git ls-files --error-...
3
votes
1answer
513 views

Copying From Vim to Ubuntu Bash on Windows

Note: this question is specific to the relatively new Ubuntu Bash on Windows system. So it seems possible to paste into Vim from the Windows clipboard by simply right clicking in insert mode after ...
1
vote
2answers
247 views

How do I set `$NVIM_LISTEN_ADDRESS` on startup using windows?

On unix, you can do something like this: $NVIM_LISTEN_ADDRESS=/some/path nvim On Windows, that does not work. What is the equivalent? My use case is detailed out here: https://github.com/mhinz/...
0
votes
0answers
280 views

Neovim,. PowerShell, and PowerShell ISE

I have neovim installed on Windows 10. It works just fine from the short cut and from a PowerShell console. However, when I use a PowerShell ISE, the nvim.exe opens a window which closes in less than ...
1
vote
0answers
68 views

Vim Plugin Path Issue

I'm trying to get Vim all decked out with some fancy plugins on my work laptop but I am running into some issues. Using echo &rtp I can see that Vim will look in several directories for startup ...
1
vote
0answers
407 views

Unable to map ctrl-l

My _vimrc contains the following lines: set nocompatible source $VIMRUNTIME/vimrc_example.vim source $VIMRUNTIME/mswin.vim behave mswin nmap <c-l> :w<CR> nmap <c-m> :w<CR> ...
0
votes
0answers
38 views

E117: Unknown function: emmet#util#closePopup [duplicate]

I downloaded the latest version of emmet.vim from this page (which is 0.86). I copied emmet-vim\autoload\emmet.vim to vim\vim80\autoload\ and emmet-vim\plugin\emmet.vim to vim\vim80\plugin\. When I ...
2
votes
0answers
499 views

Vim error: Unable to open swap file when using backslash as path separator in Windows shell

I'm using cmder as my Win7 shell. I see the following behaviour: Works fine (file in current directory): vim test Works fine (absolute path): vim ~/test Works fine (relative path with forward ...
2
votes
1answer
150 views

How to account for special characters \% in mapping

I am using vim on Windows and have following mappings: imap <f4> <ESC>:w<CR>:!clang -std=c++11 -o output\%.exe %<CR> imap <f5> <ESC>:!output\%.exe<CR> As we ...
1
vote
2answers
1k views

UTF-8 not working on VIM

I've searched a lot about this on Internet but nothing's working. I'm using Vim 8.0.3 on Windows 10 and I can't get the right encoding to work. It's not a problem when writing code, but the problem ...
1
vote
0answers
42 views

Incorrect formatting of file when calling nvim inside NodeJS script

I am formatting elixir files .ex with the help of a contributed plug-in for nvim like this on Windows: cmd> nvim.exe -i NONE -n -E +"norm gg=G" -cwq c:/file.ex This works fine when the command is ...
0
votes
2answers
91 views

How do I debug normal/insert/cart mode shortcuts that don't behave as expected? [closed]

I am using exactly the same version of Vim (Gvim 8.0.1123) across all my Windows machines, and only have the following problem on one of them: Problem That I cannot use <c-d> in insert-mode, ...
0
votes
0answers
351 views

Change runtimepath of Gvim on Windows 10

This's kind of odd question but I can't change the runtimepath of gvim to comply the same manner like under linux (plugins put under .vim) I tried to append .vim at the begin of runtimepath like: set ...
1
vote
1answer
85 views

Why can system directory files not be edited

It seems that vim does not work correctly when editing files in Windows systems directories. For example, editing the PowerShell all users, all hosts profile script fails. The current file has only ...
1
vote
1answer
2k views

Where do I put my “vimrc” file for Neovim on Windows?

:help nvim-from-vim says: create ~/.config/nvim/init.vim with these contents: set runtimepath+=~/.vim,~/.vim/after set packpath+=~/.vim source ~/.vimrc and: If your system sets $...