VIM Editor on Windows

How to install VIM Editor on Windows

The VIM editor is considered the original rock under Linux and Unix and is the standard editor under POSIX, even Mac OS X gives us the VIM editor, which can be called from the terminal.

VIM Editor Windows

Vim (Vi IMproved) is an evolution of the vi. The free open source program was released in 1991 by Bram Moolenaar. A powerful syntax highlight editor, widely used by developers when working with code and scripts, who works with Regex expressions has a versatile tool with VIM, which is now more advanced editor is available for almost any operating system.

Unix admins who work with Windows do not have to do without the usual editor, here you can also help with VIM for Windows. To install the VIM editor on Windows, the best obtained way is to get from with Download – PC: MS-DOS and MS-Windows. Who wants to can perform the installation automatically with the Self-installing executable Binary. If you prefer, copy the Runtime files and the Win32 console executable itself into the path C:\Program Files (x86)\vim\vim80.

VIM configuration file vimrc

The VIM configuration takes place via environment variables. The entries are inserted with the key Windows+X under System -> Advanced System Settings -> environment variables. Then under System Variables the path is added, here it is C:\Program Files (x86)\vim. Then add the variable VIM, as the value is entered “C:\Program Files (x86)\vim”.

VIM Editor on Windows, VIM system variables
VIM system variables

The configuration file_vimrcmust come to the program folder under C:\Program Files (x86)\vim. This according to the value of the environment variable – VIM. If user setting, the file under the user profile path is at %USERPROFILE%.

With a symlink on VIM, the vi command becomes available. To do this, mklink from an administrator opened command prompt, use the Win + R = cmd key.

mklink %systemroot%\System32\vi.exe "%ProgramFiles(x86)%\vim\vim80\vim.exe"

For example: _vimrc (starting with underscore) must be for all users under C:\Program Files (x86)\vim. If user settings are to apply place _vimrc to %USERPROFILE%.

" Maintainer:Don Matteo <>
" Last change:2016 Dec 26
" To use it, copy it to
"     for Unix and OS/2:  ~/.vimrc
"      for Amiga:  s:.vimrc
"  for MS-DOS and Win32:  $VIM\_vimrc
"    for OpenVMS:  sys$login:.vimrc
" When started as "evim", evim.vim will already have done these settings.
if v:progname =~? "evim"
" Use Vim settings, rather than Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible
" allow backspacing over everything in insert mode
set backspace=indent,eol,start
" shortmess=aoOtI
set cmdheight=2
set history=50
set ruler
set incsearch
set number
set wildmenu
set showcmd
set hlsearch
set ignorecase
set smartcase
set autoindent
set laststatus=2
set visualbell
set t_vb=
set shell=powershell
set shellcmdflag=-command
syntax on
color industry
" For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries
" let &guioptions = substitute(&guioptions, "t", "", "g")
" Don't use Ex mode, use Q for formatting
map Q gq
" CTRL-U in insert mode deletes a lot.  Use CTRL-G u to first break undo,
" so that you can undo CTRL-U after inserting a line break.
inoremap  u
" In many terminal emulators the mouse works just fine, thus enable it.
if has('mouse')
  set mouse=a
if has("gui_running")
  " Set a nicer font
  set guifont=Consolas:h11:cDEFAULT
  " Hide the toolbar
  set guioptions-=T
  " GUI is running or is about to start.
  " Maximize gvim window (for an alternative on Windows, see simalt below).
  set lines=38 columns=133
  " This is console Vim.
  if exists("+lines")
    set lines=45
  if exists("+columns")
    set columns=110
VIM Editor on Windows

Tip: With a Windows Explorer context menu extension you can create an open with VIM Editor menu entry. This procedure is shown in my Post Explorer Expand Context Menu.

VIM Context Menu

Disable Network Zeroconf APIPA

How to disable Zeroconf automatic network configuration APIPA, Link-Local for TCP/IP addressing if no DHCP server is available

Disable Network Zeroconf APIPA

ZEROCONF commonly known as IPv4 Link-Local (IPv4LL) and Automatic Private IP Addressing (APIPA) uses the range for network addresses. This APIPA addressing is activated by default, this are often not desired by system administrators.

Most Windows versions and Linux distributions use zero network configuration (ZEROCONF) to automatically configure the network without a central instance, i.e. without the need for a DHCP or DNS server to be present in a network. ZEROCONF published at IETF that plans and coordinates a number of dynamic protocols. It is intended to enable an operating system to automatically configure networks.

Windows disable network APIPA ZEROCONF

Under Windows network APIPA ZEROCONF can be disable due modify the registry, to do it with open the command prompt as administrator and run the REG command with Copy & Paste.

REG ADD HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters /v IPAutoconfigurationEnabled /t REG_DWORD /d "00000000" /f

Linux disable ZEROCONF

In Linux edit the network file and insert ZEROCONF = YES or NO.

$ sudo vi /etc/sysconfig/network


RHEL / Fedora / CentOS configuring as follows.

$ service network restart

Debian – Ubuntu avahi-daemon

For Linux Mint and Ubuntu the avahi-daemon configuration has to be changed.

$ sudo vi /etc/default/avahi-daemon


Now restart Linux Mint / Ubuntu avahi-daemon.

$ sudo /etc/init.d/avahi-daemon restart

The avahi-daemon should do not start automatically on system boot.

$ update-rc.d -f avahi-daemon remove

Using RHEL or CentOS run this command.

$ chkconfig avahi-daemon off

Network Zero-configuration

Network Zero-configuration (zeroconf), also know as APIPA and Link-local is a set of technologies that automatically creates a usable computer network based on the Internet Protocol Suite (TCP/IP) when computers or network peripherals are interconnected. It does not require manual operator intervention or special configuration servers. Without zeroconf, a network administrator must set up network services, such as Dynamic Host Configuration Protocol (DHCP) and Domain Name System (DNS), or configure each computer’s network settings manually.

Zeroconf is built on three core technologies: automatic assignment of numeric network addresses for networked devices, automatic distribution and resolution of computer hostnames, and automatic location of network services, such as printing devices.