Post - Vim as an IDE part 1

Article on how to setup vim to function as a lightweight IDE

IDEs have lots of features and generally can support most of a programmers needs. But they can be bloated and on older hardware can be slow. Further more, if the IDE is properitary you may have to pay for full functionality or spend time signing up.

Vim is highly customizable and has multiple modes for productivity, with the right plugins you can make it into a multi-language IDE.

There is a lot of plugins so I’ll split it into 2 parts with this part showing essentional setup.


Basic knowledge of vim configuration.

proper vim package

Some distributions come shipped with vim-tiny or just terminal vim, and these packages normally lack functionality. Where as the graphical package contains all vim functionality, its good to have even if you dont use graphical vim. The package has different names between distribtuions but generally its called vim-gtk3 or gvim.

sudo apt install -y vim-gtk3

vim settings

Basic configuration for ~/.vim/vimrc configuration.

general progamming settings

Generally these will be updated by language pack relative to open file type.

set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab

map leader keys

These are keys that prefix a macro, so more key combinations can be mapped. And this will be usefull with code-specifc plugins later on.

let mapleader=','
let maplocalleader='\'

custom commands

define custom commands to use with :command

remove whitespace

command! FixWhitespace :%s/\s\+$//e


enable plugins

filetype plugin indent on


project explorer

This adds a toggleable pane to the left of the editor that shows the current directory. Vim has a built in PE called netrw, but generally the nerdtree plugin is much popular.

fuzzy finder

Used to find things via typing some of what you want to find, and the finder guessing what you mean. Can be used to find files, and they generally hook into any search commands.


Fzf also has a version outside vim thats usefull for finding files straight from the terminal.

preview colors

Allows you to preview colors in vim, when you type a color its name reflects its background color.


Integration with git version control.

  • Use git commands from vim
  • Allows fugitive :Gbrowse
  • Visual repersentation of git diff left of line numbers, will show what lines have been added/removed/changed since last commit.


Snippets of code, this will autocomplete characters into a predefiend snippet.

  • Snippet engine that autocomplete them and defines their syntax.
  • Predefined snippets for most langauges.

EG autocomplete java System.out.println() to sout


Saves all open files as a session, you can save multiple sessions persistently. So you can log off/on and resume on to where you where.

  • Scripts needed for most of xoloxs plugins.
  • Session management enhancement.

language packs

Collection of language packs, extends vims built-in syntax and language specifc options.


    indentation line

    Vertical jotted line that shows indentation between horizontal lines.

Ethan Hullett

Ethan Hullett
Student at Kent University