Skip to content

jbmartino/doomcode

ย 
ย 

Repository files navigation

Doom Code โ€“ VS Code Extension

screenshot

Bring the power and elegance of Doom Emacs to VS Code. This configuration transforms VS Code into a modal, keyboard-driven editor that closely mirrors Doom Emacs' workflows and philosophy โ€“ designed for developers who either want to learn Doom Emacs or are forced to use VS Code but prefer an Emacs-like experience.

How it works: This project is packaged as a VS Code extension that builds on top of the excellent VSCodeVim and VSpaceCode extensions, which provide the core modal editing and which-key menu system. The primary contribution of this extension is a carefully crafted which-key configuration that extends VSpaceCode's standard bindings and organizes them to closely match Doom Emacs' command structure and philosophy. Both dependencies are installed automatically alongside this extension.

๐ŸŽฏ Purpose

Doom Emacs is known for its efficient keybindings, modal editing, and a clean, distraction-free interface. However, not everyone can use Emacs โ€“ whether due to ecosystem constraints, team workflows, or specific tool requirements.

doomcode bridges this gap by curating and configuring the existing ecosystem of VS Code extensions:

  • VSCodeVim provides authentic evil-mode keybindings (Vim-like modal editing)
  • VSpaceCode provides the which-key menu system for leader-key navigation
  • This extension configures these extensions to recreate Doom Emacs' command structure and workflows

The result is a configuration-based adaptation that brings Doom's philosophy to VS Code developers with minimal friction.

This configuration works best for developers who value efficiency over mouse usage and want a predictable, modal editing experience.

โœจ Features

This configuration includes:

Navigation & Buffers

  • File finder (SPC . / SPC SPC) โ€“ Quick file navigation
  • Buffer switcher (SPC <) โ€“ Switch between open editors
  • Show all buffers (SPC b B) โ€“ View all open editors/buffers
  • File history (SPC s u) โ€“ Access timeline/file history

Code Intelligence

  • Jump to definition (SPC c d) โ€“ Go to function/class definition
  • Jump to references (SPC c D) โ€“ Find all references
  • Find implementations (SPC c i) โ€“ Locate implementations
  • Find type definition (SPC c t) โ€“ Jump to type definition
  • Format code (SPC c f) โ€“ Format document or selection
  • List errors (SPC c x) โ€“ Show all diagnostics in Problems panel
  • Trim trailing whitespace (SPC c w) โ€“ Clean up whitespace
  • Compile/Build (SPC c c) โ€“ Run build tasks

Search

  • Search in file (SPC s s) โ€“ Find in current editor using fuzzy-search (required dependency)
  • Search project (SPC s p) โ€“ Find across all files in project
  • Find symbol (SPC s j) โ€“ Jump to symbol in current file
  • Find symbol workspace (SPC s J) โ€“ Find symbol across all files
  • Find all references (SPC s r) โ€“ Show all usages (in side panel)
  • Find all references (side view) (SPC s R) โ€“ Open references in references panel
  • Search and replace (Ctrl+S) โ€“ Open find widget with multi-state navigation
  • File history (SPC s u) โ€“ Access timeline/file history

Project & Sidebar

  • Toggle project sidebar (SPC o p) โ€“ Show/hide file explorer
  • New file (c f in explorer) โ€“ Create new file
  • New folder (c d in explorer) โ€“ Create new folder
  • Rename file (Shift+R in explorer) โ€“ Rename selection
  • Delete file (d in explorer) โ€“ Delete selection

Terminal & Debug

  • Toggle terminal (SPC o t) โ€“ Open/close integrated terminal
  • Start debugger (SPC o d) โ€“ Open debug sidebar
  • Debug console (SPC o D) โ€“ Open REPL/debug console

AI Assistants

  • Copilot Chat (SPC o a a) โ€“ Toggle Copilot Chat
  • Codex Chat (SPC o a c) โ€“ Open Codex Chat
  • Gemini Chat (SPC o a g) โ€“ Open Gemini Chat

Window Management

  • Close editor group (SPC w c) โ€“ Close current editor group
  • New workspace (SPC Tab n) โ€“ Create new VS Code window
  • Switch workspaces (SPC Tab Tab) โ€“ Switch between windows
  • Command palette (SPC :) โ€“ M-x equivalent for VS Code

UI Cleanliness

  • Activity bar hidden for minimal distractions
  • Tab bar disabled โ€“ modal navigation replaces tab clicking
  • Breadcrumbs disabled โ€“ cleaner editor view
  • Command center hidden
  • Menu bar in compact mode

๐ŸŽฎ Modal Editing

All keybindings follow Vim/Evil conventions:

  • leader = Space (configure via leader key)
  • Alternative which-key trigger = Alt+Space and Ctrl+Space (only where SPC is not working)
  • Which-key menus activate automatically with a short delay
  • All standard movement keys work in modal contexts

File Explorer bindings:

  • c f โ€“ New file
  • c d โ€“ New folder
  • r โ€“ Refresh
  • Shift+R โ€“ Rename
  • d โ€“ Delete
  • q โ€“ Close sidebar

The spacer provides additional context-aware bindings for Open Editors and other panels.

๐Ÿ“‹ Requirements

This configuration requires three essential extensions:

Core Dependencies

All dependencies are declared as extensionDependencies and are installed automatically when you install Doom Code:

  1. VSCodeVim โ€“ Vim/Evil-mode emulation
    • Provides modal editing (normal, insert, visual modes)
    • Handles all Vim motions and operators
  2. VSpaceCode โ€“ Which-key menu system
    • Displays keyboard command menus (like Doom's prefix menu)
    • The entire custom configuration is built on which-key's binding system
    • Standard VS Code command menus have been extended to match Doom Emacs' style as closely as possible
  3. fuzzy-search โ€“ Fuzzy in-file search
    • Required for SPC s s (Search in file)
    • Provides a fuzzy-matching find experience similar to Doom Emacs' swiper

๐Ÿš€ Installation

Step 1: Install the Extension

Search for Doom Code in the VS Code Extensions marketplace and click Install. VSCodeVim and VSpaceCode are declared as dependencies and will be installed automatically.

Step 2: Let Doom Code Apply Its Defaults

On first activation, Doom Code automatically writes its install defaults to your user settings when those settings are not already configured.

This gives a fresh setup the required defaults automatically while leaving any existing user-defined settings untouched.

If you want to run the setup again later, open the Command Palette, run Install Doom Code, and confirm the prompt.

Step 3: Configure UI Layout

For the configuration to work optimally:

  1. Open the Explorer panel (SPC o p)
  2. Drag "Timeline" from the top to the bottom panel
  3. Drag "Open Editors" to make it its own tab inside the primary side bar for a cleaner UI

This creates a clean primary editor area with file navigation and history in the bottom panel, matching Doom Emacs' layout philosophy.

Step 4: Clean Up Your UI (Recommended)

The configuration assumes a clean UI. For best results:

  • Hide the Activity bar (already configured)
  • Disable tab bars (already configured)
  • Remove unnecessary sidebar icons
  • Keep only essential panels visible

A minimal UI reduces distractions and makes keyboard-driven navigation more effective.

๐ŸŽจ UI Philosophy

This configuration emphasizes:

  • Keyboard-first workflow โ€“ Everything accessible via leader key
  • Minimal visual noise โ€“ Hidden tabs, breadcrumbs, and command center
  • Modal paradigm โ€“ Use Vim modes instead of mouse-based selection
  • Consistent keybindings โ€“ Doom Emacs conventions throughout

The cleaner your UI, the more effective the modal experience becomes.

โš™๏ธ Customization

The main customization happens through which-key bindings in the VS Code settings. You can customize bindings by editing whichkey.bindings in your user settings.json, or by forking this extension and editing the contributes.configurationDefaults section of its package.json. Edit the whichkey.bindings array to:

  • Add new leader-key shortcuts
  • Modify existing bindings
  • Create nested command groups

Refer to the VSpaceCode documentation for advanced configuration options.

โš ๏ธ Known Issues

  • doom.cleanup only affects the default profile โ€“ When using VS Code profiles, the cleanup command currently reads and writes settings from the default profile only. Settings in non-default profiles are not scanned or modified.

๐Ÿ™ Credits & Inspiration

This configuration stands on the shoulders of amazing projects:

  • Doom Emacs โ€“ The philosophical foundation and keybinding inspiration that makes this configuration possible
  • VSCodeVim โ€“ Bringing authentic Vim/Evil modal editing to VS Code
  • VSpaceCode โ€“ The which-key implementation that enables Doom-like leader-key menus

Thank you to all contributors and maintainers of these projects for their dedication to improving the developer experience.

๐Ÿ“„ License

MIT License โ€“ Feel free to use, modify, and share this extension.

๐Ÿ’ก Tips

  • Use SPC : to access the VS Code command palette with a Doom-like menu
  • Press SPC once to see all available commands (the which-key menu)
  • Combine SPC commands with Vim motions for powerful editing
  • Explore different language servers for enhanced code intelligence
  • Customize the theme and icon theme to match your own preferences

๐Ÿค Contributing

Found improvements or better keybindings? Contributions are welcome!

For users: Feel free to submit issues and pull requests to enhance the doomcode experience.

For developers: Want to contribute code? See CONTRIBUTING.md for setup instructions, build commands, and development workflow.

๐Ÿšข Release Automation (Maintainers)

Releases are automated with GitHub Actions.

  1. Bump package.json version and update CHANGELOG.md
  2. Push changes to main
  3. Push a matching version tag (example: v0.0.3)

That tag triggers a workflow that runs checks, creates a GitHub Release with a .vsix asset, and publishes the same package to the VS Code Marketplace.


Make VS Code feel like Doom Emacs. Happy coding! ๐Ÿš€

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • TypeScript 88.8%
  • Nix 5.9%
  • JavaScript 5.3%