Configuring Vim on Windows: Practical Settings and Plugin Recommendations
This article explains how to set up and fine‑tune Vim on Windows, covering essential vimrc sections such as Startup, General, Language & Encoding, GUI, Format, Keymap, and Plugins, and provides practical configuration examples and plugin recommendations for a clean, efficient editing environment.
Introduction The author describes the development environment (ThinkPad T450, Windows 7 SP1 64‑bit, languages JavaScript, HTML, CSS, NodeJS, Python) and states that the guide targets intermediate Vim users who want a more usable setup on Windows.
vimrc Structure The configuration is divided into groups: Startup, General, Lang & Encoding, GUI, Format, Keymap, Plugin, and Function, each handling a specific aspect of the editor.
Startup Sets default folding to marker using triple‑brace comments, making the file concise.
General Highlights useful options such as clipboard+=unnamed for seamless copy‑paste and winaltkeys=no to disable Windows Alt shortcuts that interfere with Vim mappings.
Lang & Encoding Provides encoding settings to avoid garbled text and recommends setting the language to en_US .
GUI Suggests the Tomorrow‑Night colorscheme, removal of menu bars and scrollbars, use of Vim’s built‑in tabs, and recommends the Inconsolata font for a clean appearance.
Format Advises against using tabs, prefers foldmethod=indent , and mentions personal formatting preferences.
Keymap Defines a leader key (comma) and custom shortcuts for window navigation, split editing, and clipboard operations, while avoiding conflicts with Windows shortcuts.
Plugin Management Uses Vundle to manage a selection of plugins: NERDTree, Vim‑multiple‑cursors, Tabular, Airline, CtrlP, NERDCommenter, Emmet, SnipMate, Fugitive, and Neocomplete, each briefly described with its purpose.
Functions Includes a simple function to remove trailing whitespace, illustrated with an image.
Conclusion The author notes that some Windows‑specific settings are not guarded for other platforms and will be maintained separately.
JD Retail Technology
Official platform of JD Retail Technology, delivering insightful R&D news and a deep look into the lives and work of technologists.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.