Custom Vim configuration focused on minimalism and efficiency. It's BRUTAL!
A fork of Neovim with progressive difficulty modes that force users to master Vim navigation and break bad habits through increasingly challenging constraints. Based on an idea by Laslo Szeremi.
Informally known at my company as "bastardvim."
BrutalVim extends Neovim with four difficulty modes that modify editor behavior through command-line arguments. Each mode provides a different challenge level, from beginner-friendly to absolute chaos.
Perfect for beginners transitioning from other editors. Makes Vim feel like a modern editor while gently introducing modal concepts.
Navigation & Selection (Like Windows/Mac/VSCode):
- Arrow keys: Character-wise movement in all directions
- Ctrl+Arrow: Word-wise jumping (left/right by word)
- Shift+Arrow: Character-wise text selection (starts visual mode automatically)
- Ctrl+Shift+Arrow: Word-wise text selection (bonus combo!)
Windows-Style Editing Shortcuts:
- Ctrl+Z: Undo (maps to
u) - Ctrl+C: Copy selected text (works in visual mode)
- Ctrl+X: Cut selected text (works in visual mode)
- Ctrl+V: Paste (use
"*por"+pfor system clipboard)
Easy Exit Options (No More :q! Confusion):
- Hold
ESCfor 5 seconds β Quit with save prompt - Press
ESCthree times within 5 seconds β Quit prompt - Triple-press
Ctrl+X,Ctrl+C, orCtrl+Qβ Quit prompt - Easter egg: Type "fuck you let me out" anywhere β Instant quit!
Quick Start Workflow:
nvim --easy myfile.txt
# 1. Press 'i' to insert text
# 2. Type your content
# 3. Press ESC to return to normal mode
# 4. Use Shift+Arrow to select text
# 5. Press Ctrl+C to copy, Ctrl+X to cut
# 6. Hold ESC for 5 seconds to quitForces proper Vim navigation habits.
- Disabled: Arrow keys, PageUp/Down, Home/End
- Requires: hjkl navigation, word motions (w/b/e)
- Tracks arrow key attempts and shows stats on quit
All HARD restrictions plus intentional quitting.
- Additionally disabled:
:q,:quit,:qall,zz(center screen) - Must use:
:wq!or:x!to exit - Forces deliberate actions and prevents muscle memory exits
Complete keyboard chaos with randomized keybindings.
- All keybindings randomized within logical groups (motion, edit, visual, search)
- Disabled: All HARDER mode restrictions apply
- Fisher-Yates shuffle: Ensures one-to-one mapping consistency
- Session-based: Different random mappings each launch
- Keys stay within their logical groups (e.g., motion keys remain motion keys)
git clone https://github.com/mcollard0/brutalvim.git
cd brutalvim
make CMAKE_BUILD_TYPE=RelWithDebInfo
sudo make installLaunch with one of the difficulty flags:
nvim --easy myfile.txt # Beginner mode
nvim --hard myfile.txt # No arrow keys
nvim --harder myfile.txt # No easy quit
nvim --hardest myfile.txt # Randomized chaos- HARD Mode: Complete with input filtering in
getchar.c - HARDER Mode: Quit blocking in
ex_docmd.c,zzblocking innormal.c - HARDEST Mode: Full randomization system with Fisher-Yates shuffle
- Startup Banners: ASCII art display for all modes showing restrictions
- EASY Mode: Core features implemented, Windows shortcuts need additional hooks
src/nvim/
βββ brutal.h # Mode enum, global state, function declarations
βββ brutal.c # All brutal mode logic (~350 lines)
βββ main.c # CLI argument parsing integration
βββ getchar.c # Key filtering and remapping
βββ ex_docmd.c # Quit command blocking
βββ normal.c # zz command blocking
- Global enum
BrutalModeinbrutal.h(NONE, EASY, HARD, HARDER, HARDEST) - Initialized during
main.cstartup via CLI parsing - Persists for entire session
brutal_should_block_key()- O(1) checks for arrow/cursor keys- Integrated at lowest input level in
getchar.c - Returns
K_IGNOREfor blocked keys
brutal_init_keymap_hardest()- Fisher-Yates shuffle algorithm- Keys grouped by function: motion (19), edit (21), visual (3), search (6), marks (3)
- Seeded with
time(NULL)for session uniqueness brutal_remap_key()- O(1) array lookup for remapping
brutal_should_block_quit()- Boolean check- Intercepted in
ex_quit()andex_quitall()functions - Forces
:wq!or:x!usage
- Key remapping: O(1) array lookup
- Key blocking: Simple conditional checks
- Startup overhead: Minimal (banner display + mode init)
- Negligible impact on editor operations
architecture.md- Detailed implementation specs (734 lines)BRUTAL_MODES.md- User guide with examples and tips (225 lines)BUILD.md- Build instructionsCONTRIBUTING.md- Development guidelines
- EASY: Remove intimidation, familiarize with Vim concepts
- HARD: Force muscle memory for hjkl navigation
- HARDER: Build discipline through deliberate actions
- HARDEST: Embrace chaos, truly understand modal editing
Manual testing required:
--hard: Verify arrow keys blocked, hjkl functional--harder: Verify quit commands blocked, zz disabled--hardest: Verify randomization, consistency within session--easy: Verify ESC-hold quit, shortcuts functional- Normal mode: Verify no regression without flags
- Complete EASY mode Windows-style shortcuts with proper insert/visual mode hooks
- Persistent randomization seeds for HARDEST mode reproducibility
- Visual feedback for blocked key presses
:BrutalModecommand to query current mode- In-session mode switching capability
- Automated test suite for all modes
- Integration with Neovim help system (
:help brutal)
- New files: 2 (brutal.h, brutal.c)
- Modified files: 4 (main.c, getchar.c, ex_docmd.c, normal.c)
- Lines added: ~437 total
- brutal.c: ~350 lines
- Integration code: ~87 lines
- Build system changes: 0 (automatic via CMake glob)
- Minimal invasiveness: Only 4 files modified with focused changes
- Centralized logic: All mode code in brutal.c/h
- Clean separation: Mode functions provide clear API boundaries
- Efficient implementation: Optimal algorithms at lowest input levels
- Extensible design: Easy to add new modes or modify behavior
- EASY mode incomplete (Windows shortcuts need deeper integration)
- No mode persistence between sessions
- No runtime mode switching
- Limited automated testing coverage
- Silent failure for blocked operations (except quit commands)
- Original Concept: Laslo Szeremi
- Implementation: Fork of Neovim with custom extensions
- Base Project: Neovim
Same as Neovim (Apache 2.0 License). See LICENSE.txt.
See CONTRIBUTING.md for development guidelines.
For issues specific to BrutalVim modes, please check:
BRUTAL_MODES.md- Comprehensive usage guidearchitecture.md- Implementation details- GitHub Issues - Report bugs or request features
Remember: The best way to learn Vim is to embrace the brutality! πͺ
Actual User Reviews:
"It's not a bug, it's a feature that makes you better."
"It's Brutal"
"Bastard Mode Activated!"
"F*ck you let me out!"