A pure Vim configuration designed for restricted corporate environments.
No plugins. No external tools. No Python / Node / ripgrep / ctags calls.
Just stock Vim features used effectively.
- Plugin-free
- Self-contained
.vimrc - Works on stock Vim (Linux, macOS, Windows)
- Truecolor support
- Gruvbox fallback to Desert
- Sidebar file explorer
- Project search using
vimgrep - Whitespace visibility (tabs, trailing spaces, nbsp)
- Language-aware indentation (consistent tabstop/shiftwidth/softtabstop per filetype)
- Count-aware
j/kmotion (works with5j,10k, etc.) - Hidden buffers for easier switching between unsaved files
- Smarter built-in completion and command-line matching
- No swap files
- Auto-reload files changed outside Vim
- Auto-save and restore sessions (terminal buffers excluded)
Supported languages:
- SQL
- CSS
- JavaScript
- Python
- JSON
- Markdown
- PHP
- YAML
- TOML
- INI
- Lua
- C / C++
- Java
- Object Pascal
Example editing experience using this configuration.
Editing Python with:
- relative line numbers
- cursor line highlight
- whitespace markers
- color column at 100
- Gruvbox theme
~/.vimrc
%USERPROFILE%\_vimrc
On Windows, Vim also creates its runtime directories under ~/vimfiles/ (backup, undo, sessions) automatically.
Restart Vim after installing.
curl -fsSL https://raw.githubusercontent.com/ikelaiah/vimrc/main/.vimrc -o ~/.vimrcInvoke-WebRequest https://raw.githubusercontent.com/ikelaiah/vimrc/main/.vimrc -OutFile $HOME\_vimrcThe configuration prefers Gruvbox if available.
colorscheme gruvboxIf Gruvbox is unavailable, Vim falls back to:
colorscheme desertOpen the sidebar file explorer:
Space e
This uses Vim's built-in netrw in sidebar mode (Lexplore).
Features:
- left sidebar
- tree view
- quick file navigation
- no plugins required
Leader key: Space
| Action | Shortcut |
|---|---|
| Open file | Space f |
| Sidebar explorer | Space e |
| Switch last file | Space Space |
| Action | Shortcut |
|---|---|
| Search project | Space g |
| Next result | ]q |
| Previous result | [q |
Example:
:vimgrep /TODO/ **/*.py| Action | Shortcut |
|---|---|
| Next buffer | Space bn |
| Previous buffer | Space bp |
| Close buffer | Space bd |
| Action | Shortcut |
|---|---|
| Move left | Ctrl h |
| Move down | Ctrl j |
| Move up | Ctrl k |
| Move right | Ctrl l |
| Cycle to next window | Ctrl w w |
| Split horizontally | Space - |
| Split vertically | Space \ |
| Equalise all windows | Space = |
| Close current split | Space c |
| Keep only current split | Space o |
Resize windows:
Space ← → ↑ ↓
| Action | Shortcut |
|---|---|
| Save | Space w |
| Quit (prompts if unsaved) | Space q |
| Save & quit | Space x |
| Force quit (discard changes) | Space Q |
Sessions save and restore your window layout, open files, and folds. Terminal buffers and missing files are automatically excluded on restore.
| Action | Shortcut |
|---|---|
| Save session | Space ss |
| Restore session | Space sr |
| Delete session | Space sd |
Auto-save / auto-restore: When Vim is opened with no file arguments, the last session is automatically restored on startup and saved on exit.
Safe restore: The following buffer types are automatically discarded on restore:
- Terminal buffers (
term://) — stuck terminals can never block startup - netrw explorer buffers — avoids broken internal tree state errors
- Quickfix / location list windows
- Scratch buffers (help, man pages, previews)
- Files that no longer exist on disk
The recommended ways to exit, from most to least cautious:
| Situation | Command | What it does |
|---|---|---|
| Save and quit current window | Space x |
Writes only if changed, then quits |
| Save and quit current window | :x |
Same as above (built-in command) |
| Save and quit | :wq |
Always writes, then quits |
| Quit with prompt if unsaved | Space q |
Prompts Save/Discard/Cancel |
| Quit (no unsaved changes) | :q |
Quits if buffer is clean |
| Force quit, discard changes | Space Q |
Discards all changes, no prompt |
| Force quit | :q! |
Discards unsaved changes, then quits |
| Quit all windows | :qa |
Quits all windows (fails if unsaved) |
| Quit all, discard all changes | :qa! |
Force-quits everything |
| Save all and quit all | :wqa |
Saves all buffers, quits all windows |
Tip: If you are stuck in insert mode, press
Escfirst, then use any of the above.Tip: If you opened a terminal inside Vim (
:terminal) and it is unresponsive, close it with:bwipeout!or quit all with:qa!.
Clear search highlight:
Space /
Toggle paste mode:
F2
Toggle wrap:
Space z
Toggle whitespace markers:
Space l
Trailing whitespace is visually highlighted but not automatically removed on save.
This configuration focuses on three principles:
Works everywhere Vim runs.
Safe for environments that forbid plugins or external tools.
Navigation should be faster than thinking.
Many corporate environments restrict developers from installing:
- Vim plugins
- external binaries
- scripting runtimes
This repository demonstrates that Vim can still provide a productive editing experience using only built-in functionality.
MIT License
