Questions tagged [microsoft-windows]

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

1
vote
2answers
1k 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/...
1
vote
1answer
149 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 ...
2
votes
1answer
197 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
68 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
94 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
715 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
173 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
37 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 ...
3
votes
1answer
2k 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-...
4
votes
1answer
896 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
384 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/...
1
vote
0answers
121 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 ...
2
votes
0answers
631 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> ...
3
votes
0answers
859 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
312 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
2k 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
103 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
545 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
95 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 ...
2
votes
1answer
4k 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 $...
2
votes
1answer
128 views

How to interpret ASCII codes returned by “ga” command?

I'm cleaning data imported from Excel to Access, and ran across funny quotes that I'm having trouble getting unambiguous ASCII codes for. They are the hooked single quotes ‘ and ’. Vim's ga command ...
5
votes
2answers
5k views

Neovim setup on MS Windows

I'm trying to switch from Gvim to Neovim. Most tutorials are about Linux and not how to setup Neovim on MS Windows? Two problems: vimrc From the document it's %userprofile%\AppData\Local\nvim\init....
1
vote
0answers
169 views

How do I get vim to autocomplete correctly for :! on Windows?

On Vim 7.3 on Windows, if I use Tab to autocomplete paths with nonstandard characters in many cases, it works fine. For example: :n 2016\ Posts\\feb\something.txt If I press Tab after '2' and 'f' ...
3
votes
2answers
578 views

How can I run :! commands inline instead of in a new cmd.exe window?

When using Gvim on Linux I can use :!ls to list files and directories 'in-line' in Gvim to navigate around the file structure and open files. However, on Windows when using :!dir, a cmd window opens ...
8
votes
3answers
2k views

Vim on WSL: synchronize system clipboard? (set clipboard^=unnamed)?

While using WSL/Bash for Windows I want to be able to use y yy 3y and p the same way they always work in vim, but connecting to the system clipboard shared by all apps, not to vim's internal clipboard....
2
votes
1answer
108 views

How to track time-expenditure for Vim operations?

Is there a syntime equivalent global command that can track the overall Vim performance? I am having trouble debugging the cause for a set of very-slow file-operations on a Windows machine. Since ...
0
votes
1answer
299 views

No python support [duplicate]

I recently started out with gVim 8 for windows and i noticed that the higher end plugins that provide more functionality require python support or something like that. But for some reason i am not ...
1
vote
0answers
595 views

Using Vim-Plug with portable version of gvim (windows)

My university does not (quite understandably) provide administrative rights to users on their public machines (which run only MS Windows 7 OS). As a regular vim user, I use a lot of plugins (...
2
votes
1answer
575 views

Vim crash with :py3 import sys; print(sys.version)

Windows 8 Vim 8.0.584, 32 bit from https://tuxproject.de/projects/vim/ .7z archives: x86 python36.dll, 32 bit from https://www.python.org/ftp/python/3.6.0/python-3.6.0-embed-win32.zip copied python36....
1
vote
0answers
75 views

Unicode character does not show when entered using <C-q> with cp932

I am trying to get the unicode character '①' inserted in vim with the insert mode command but failed. <CTRL-Q>u2460 --> result:$` So I copied the unicode to vim and checked the hex value ...
2
votes
1answer
77 views

Reading command prompt output into variables - GVIM and Windows

First off, I'm writing this for my setup at work, which is entirely on Windows. I'd imagine it would be quite a bit easier if I was able to use a proper terminal. I've written a function in my vimrc ...
1
vote
1answer
225 views

How to fix the tempname() function on Windows 10?

The problem: I am getting nothing in return for the tempname() function in Vim. More specifically, I kept getting only ".do" assigned to the variable temp using the following statement. let temp = ...
1
vote
3answers
3k views

Windows: gVim or bash [duplicate]

Id like to start using vim for quickly creating files (note taking, scratch files) and making small/quick changes to existing python scripts Whats the best way to get Vim installed on Windows? Would ...
0
votes
0answers
29 views

How can I download and easily install 64-bit Vim for Windows? [duplicate]

I'm using Windows 10. I want to view a 3.8 GB log file. I'd rather use Vim, not less(1). I looked at this question, but it really only tells me how to download 64-bit Vim, not how to install it. (...
4
votes
1answer
2k views

How do I make “Edit with Vim” open Vim instead of gVim on windows?

When installing Vim for Windows 10 64-bit, it also installed an "Edit with Vim" context menu option. Annoyingly, this opens the file in gVim. How do I change the "Edit with Vim" context menu option ...
1
vote
0answers
461 views

Windows + Vim + Python2 + Python3 = Path nightmare

I am using Vim 8.0.0326 64-bit from the tuxproject with pathogen. I have 64-bit versions of Python installed in three locations: Python 2.7 (64) - C:\Python27 Python 3.6 (64) - C:\Python36 Conda with ...
2
votes
1answer
728 views

Vim 8.0 breaks YCM on Windows 10

I was using Vim 7.4 with YCM quite successfully (thank you for YCM!) and just today noticed that Vim 8.0 was out. I downloaded, installed, started and now it complains that "YouCompleteMe unavailable: ...
0
votes
1answer
380 views

Why can I still run “vim” in cmd and powershell without put the directory of vim in the list of environment variables on windows 10?

I installed gvim 8.0 on Windows 10. And I find that there's no item about vim in the list of environment variables. Look at the pictures below. But I can still run "vim" and "gvim" in cmd and ...
5
votes
1answer
5k views

How to get Python support on MS Windows?

I've installed the latest version of Vim to date (8.0) for Windows. But the version of Vim I've got does not have Python support. I've downloaded the .exe version directly from vim.org. echo has('...
8
votes
1answer
264 views

Dealing with case insensitive filenames on Windows

I'm using the latest vim/gvim (8.0.118), but have noticed this problem in the past, with other versions. I created a file named fizzbuzz.java (outside of gvim), and opened it in a new tab in gvim on ...
0
votes
1answer
212 views

How can I highlight WinAPI functions in C++?

How can I add syntax highlight for windows.h C/C++ apis and types? All I've found is a tiny winapi syntax file here.
7
votes
1answer
657 views

vim 8.0 file explorer only allows specific locations

I'm running Vim 8.0 on a Windows 7 system and I'm having this issue whenever I open gvim (the one that runs in a window as opposed to running in cmd) the default path in :pwd is c:\users\"user". If I ...
2
votes
0answers
68 views

How to properly use the MDI window pop-in (-P parameter)

I've never in 5+ years of vim usage and writing all kinds of custom plugins been able to properly figure out how to use the gvim -P windowname command line option. According to vim's own ...
3
votes
1answer
74 views

Can the vim program description be modified? [closed]

I am running Windows 7 Professional. I have used the context menu for each of several file types to specify vim in the "open with" field. There are times I want to open the selected file with vim ...
0
votes
1answer
541 views

Vim 8.0 console on Windows 7 opens with no menu bar

I installed vim 8.0 for Windows last week. It seemed to work great the first few days, but now I have found that when I open a file in vim console mode, the editing window comes up without a menu bar ...
0
votes
0answers
65 views

Strange glyph when moving commandline cursor

I recently tried vim for the (still in-dev!) Bash for Ubuntu on Windows. I noticed this odd glyph appearing on the commandline in vim - but only when moving across it. It flashes for one screen ...
-1
votes
2answers
1k views

How do you add a local plugin in Vundle on Windows?

I am using Vundle on Windows gVim. I have a plugin that I am writing myself called hotdogstand that is stored in my local filesystem at vimfiles\hotdogstand, and it is not tied to a Github repository. ...
4
votes
1answer
134 views

Vim and gVim in Windows doesn't recognize Mongolian letters Өө and Үү

I'm trying to open and edit files with Mongolian text, written in Mongolian Cyrillic. In the cmd terminal and in powershell terminal if I choose Consolas font, everything is ok with Mongolian Cyrillic,...
0
votes
2answers
1k views

How can I run a batch file in Vim's console?

I want to use Vim as a simple c++ editor in windows (I have no experience with Linux). Nothing fancy, just want to get things started. To compile a .cpp file from CMD I have to run a batch file in ...