# Learning the vi Editor/Vim/Vim on Windows

* Learning the vi Editor:
* Getting acquainted —
* Basic tasks —
* Making your work easier —
* Advanced tasks —
* Details —
* Vi clones
* (Vim –
* Basic navigation –
* Modes –
* Tips and Tricks –
* Useful things for programmers to know –
* Enhancing Vim –
* Vim on Windows –
* VimL Script language,
* Vile,
* BB vi) —
* vi Reference
Vim is available for Microsoft Windows, but there are many issues attendant to that platform that make effective use of Vim quite challenging. This section deals with some of the issues relevant to users who are using or considering Vim for use on Windows systems.

## Installation

There are a variety of installation options for users who wish to install Vim on Windows.
These include:
* Self-installing executable
* Win32s GUI executable
* Windows 3.1 GUI executable
* Win32 console executable
* Win64 binaries for x64
Moreover, if desired, a user may compile Vim from source. This may be useful or even necessary if the user wants to add support for additional options that are not compiled into one of the pre-existing binaries by default. Perhaps the most common scenario for compiling on Windows is when the user wishes to add support for a programming language (either a specific language, or a specific version of the language) that is not included in the Windows binaries by default.
When installing Vim, the user has to accommodate for any required elements that do not come with Windows by default, such as a compiler and make.

## General usage

Users who are not well-acquainted with how Vim works, and the general "vi way of doing things", may find Vim especially challenging. This is especially so, if they are already comfortable with the workflow of most other text editors on Windows. Because of this, there's actually more than one way of doing things if you want to use Vim on Windows. One way of using Vim on Windows can be called standard vim workflow (Vim); another way would be the windows vim workflow (WinVim).
Using the "WinVim" style definitely has advantages for those users who are not amenable to the steep learning curve commonly associated with Vim; however, there are many features within Vim that are difficult to use when working from the "WinVim" paradigm. Whether one chooses one usage pattern over the other, or some combination of the two, is largely a matter of personal preference.

### WinVim behaviour levels

The :behave mswin configuration allows a user to set the editor behavior to reflect some aspects of the "WinVim" working style. This enables a 'scaled-down' version of the WinVim style; users who want a very detailed emulation of WinVim style, will have to do more than just set 'behave mswin'. See :help behave for more details.

### Cream editor

The Cream editor is an example of a Vim configuration that is designed for users who prefer the "WinVim" style of working.

## Compatibility

For those who are familiar with UNIX-like operating systems, and leverage such systems to enhance and extend Vim, the Windows operating system may present some unexpected differences and limitations.

### Path separators

Windows (by default) uses the backslash character to delimit path-steps in file paths. This can be challenging for users who are not used to this. See :help shellslash for more details.

### Command piping

The Windows command shell does not support command piping and redirection in the same way as UNIX systems. Some users may find this especially challenging, because it significantly limits the way Vim can interact with other programs external to the editor. There are workarounds, however, that allow a user to approximate some of the power that comes natively from piping and redirection.

#### Temporary text transport file

A temporary text transport file is one workaround that allows Vim to interact with other programs on Windows without requiring use of pipes and redirection. The basic approach is to specify one or more temporary files on the local file system that Vim and external programs use to "transport" text between each other.

### Fonts and language support

In Windows XP, gVim 7.4 (7.4.280) has issues displaying non-Western characters. Even if a character is not visible, gVim retains the characters, and the same text should appear ok in a program that supports more fonts, such as an office package or a web browser.
The displayable font can be changed via Edit menu > Select Font..., where a font can be selected for a particular language. The Font window contains a font list of only monospace fonts, which makes the font selection scarce. An existing non-Western font can be selected, and depending on which script a font supports, the Sample area for a selected script (at Script:) will show a non-Western script sample alongside Western characters. To confirm, whether a certain language script is supported, open the Script: drop-down menu. For example, fonts that support Korean, have Hangul in the Script: drop-down menu.
For most Western scripts, the following table shows a non-exhaustive selection of open-source monospaced fonts visible to gVim that offer the most language support and best legibility. The fonts must be downloaded separately, but can come with a dedicated software package. The Windows-default Lucida is displayed for comparison. (Font size requirements may differ user-by-user.)
| Font name | License | Ver. | Came with | Scripts supported | Notes |
| DejaVu Sans Mono | FOSS: various licenses | 2.35 | | 8: Western, Greek, Turkish, Baltic, Central European, Cyrillic, Vietnamese, Arabic | Based on Bitstream Vera. Wikipedia article: DejaVu fonts. |
| Liberation Mono | FOSS: SIL Open Font License | 2.00.1 | LibreOffice 5.0 | 8: Western, Hebrew, Greek, Turkish, Baltic, Central European, Cyrillic, Vietnamese | Metrically compatible with Courier New. OFL since version 2+. Wikipedia: Liberation fonts. |
| Lucida Console | non-free | 1.60 | Windows XP SP3, MS Office 2007 | 5: Western, Greek, Turkish, Central European, Cyrillic | This is the default console font from Windows 2000 on, and the default Notepad font from Windows 2000 till Windows 8. |
| Ubuntu Mono | FOSS: Ubuntu Font License | 0.80 | | 6: Western, Greek, Turkish, Central European, Cyrillic | Wikipedia: Ubuntu (typeface). |

## Comparison with CUA-style editors

The following table shows a comparison of some basic Vim functionality as viewed from the perspective of CUA-style editors.
This is intended as a starting place for those who may be unfamiliar with Vim, but familiar with Windows-based editors that use a standard "File :: Edit :: Help" style menu, such as Notepad.exe, which is available on most Windows installations by default.
* Learning the vi Editor:
* Getting acquainted —
* Basic tasks —
* Making your work easier —
* Advanced tasks —
* Details —
* Vi clones
* (Vim –
* Basic navigation –
* Modes –
* Tips and Tricks –
* Useful things for programmers to know –
* Enhancing Vim –
* Vim on Windows –
* VimL Script language,
* Vile,
* BB vi) —
* vi Reference