NimisAn AI editor for VS Code that solves engineering problems through Vim. The AI thinks and operates in Vim — reading, navigating, and editing files with the same commands you would use, while you stay in the conversation. How It WorksYou describe a problem in the chat sidebar. The AI reads your code with
Features
Vim Commands SupportedThe Vim subsystem is not a gimmick — it's a full implementation that the AI uses as its primary editing interface. Ex Commands
Normal Mode
Visual Line Mode (
|
| Backend | Type | Default URL | Notes |
|---|---|---|---|
| llama.cpp | Local | localhost:8080 |
GGUF models, SSE streaming |
| vLLM | Local/Remote | localhost:8000 |
OpenAI-compatible API |
| SGLang | Local/Remote | localhost:30000 |
OpenAI-compatible /v1/completions API |
| Mistral AI | Cloud | api.mistral.ai |
Requires API key |
Set the backend with the nimis.serverType setting (llama, vllm, sglang, or mistral).
Getting Started
Prerequisites
A running LLM server. For local use with llama.cpp:
./server -m path/to/model.gguf -c 2048 --host 127.0.0.1 --port 8080
Install
git clone https://github.com/dashtotherock/nimis.git
cd nimis
npm install
npm run compile
Press F5 in VS Code to launch with the extension loaded.
Usage
- Click the Nimis icon in the Activity Bar
- Check the connection status at the top of the chat panel
- Describe your problem and press Ctrl+Enter
- Toggle the Vim button to watch the AI edit in real time
Chat Directives
@vim <cmd>— run a direct Vim command immediately (example:@vim :e src/index.ts)@@...— escape a leading@and send literal text@file ...and@mcp ...are parsed, but currently routed as normal chat messages
Configuration
All settings live under the nimis.* namespace in VS Code settings.
| Setting | Default | Description |
|---|---|---|
nimis.serverType |
llama |
Backend: llama, vllm, sglang, or mistral |
nimis.serverUrl |
(auto) | LLM server URL |
nimis.llamaServerUrl |
"" |
Deprecated; use nimis.serverUrl |
nimis.apiKey |
API key for cloud providers | |
nimis.model |
Model name or path | |
nimis.temperature |
0.7 |
Sampling temperature (0–2) |
nimis.maxTokens |
2048 |
Max tokens to generate (1–32768) |
nimis.mcpServers |
[] |
MCP server configurations |
nimis.rules |
[] |
Inline rule definitions |
nimis.rulesPaths |
[] |
Paths to rule files |
nimis.benchPath |
"" |
Absolute path to bench.json (e.g. ~/bench/bench.json) |
nimis.bench |
null |
Inline bench config (alternative to benchPath) |
nimis.stepMode |
false |
Pause after each tool call and wait for Next Step |
nimis.vimValidationMode |
normal |
Vim validation strictness: none, normal, high |
Commands
| Command | Description |
|---|---|
Nimis: Open Chat |
Open the chat sidebar |
Nimis: Explain Selected Code |
Explain selected code in the editor |
Nimis: Insert Code at Cursor |
Insert AI-generated code at cursor |
Nimis: Run Bench |
Run all AI benchmark tests |
Nimis: Run Bench Test |
Run a single bench test (pick from list) |
Nimis: Run Bench Selected |
Run selected tests (used by Bench tab multi-select flow) |
Bench
Bench runs the AI against problem definitions (e.g. LeetCode-style). Each test has a .md prompt file and an output path. The AI uses Vim tool calls to solve and save the solution. Configure via nimis.benchPath (path to bench.json) or nimis.bench (inline JSON).
bench.json:
{
"tests": [
{
"id": "two_sum",
"promptPath": "two_sum/two_sum.md",
"outputPath": "outputs/two_sum/solution.py",
"timeout": 120000
}
]
}
Project Structure
nimis/
├── src/
│ ├── extension.ts # Entry point
│ ├── toolExecutor.ts # Tool dispatch (vim → native → MCP)
│ ├── mcpManager.ts # MCP server orchestration
│ ├── rulesManager.ts # Rule loading and matching
│ ├── api/
│ │ ├── llmClient.ts # ILLMClient interface
│ │ ├── llamaClient.ts # llama.cpp client
│ │ ├── vllmClient.ts # vLLM client
│ │ ├── mistralClient.ts # Mistral AI client
│ │ ├── nativeToolServer.ts # Native tool registration
│ │ ├── vimToolServer.ts # Vim tool registration
│ │ ├── mcpToolServer.ts # MCP tool registration
│ │ └── ruleServer.ts # Rule server
│ ├── utils/
│ │ ├── nimisManager.ts # Prompt building and state
│ │ ├── nimisStateTracker.ts # Session persistence
│ │ ├── responseParser.ts # LLM response parsing
│ │ ├── chatDirectiveParser.ts # @vim / @file / @mcp parser
│ │ ├── chat/ # Chat streaming logger exports
│ │ ├── HarmonyParser.ts # Structured output protocol
│ │ ├── ToolCallXmlValidator.ts # Tool-call XML validation and feedback
│ │ ├── xmlProcessor.ts # XML tool-call extraction/parsing
│ │ ├── toolCallExtractor.ts # XML tool call extraction
│ │ ├── nativeToolManager.ts # File and terminal tools
│ │ ├── editFileHandler.ts # Precise text replacement
│ │ ├── bench/ # Bench (types, loader, runner)
│ │ └── vim/ # Vim subsystem
│ │ ├── VimToolManager.ts # Singleton orchestrator
│ │ ├── models/ # VimBuffer, VimMode, VimRegister
│ │ ├── commands/ # StateMachine, ExHandler, NormalHandler
│ │ ├── operations/ # File, Text, Buffer, Grep, Directory ops
│ │ └── utils/ # RangeParser, PathResolver
│ └── webview/
│ ├── provider.ts # Webview provider and LLM loop
│ └── assets/ # main.js, vimView.js, markdownFormatter.js, styles.css
├── test/ # ~56 test files (Vim, parsers, tools, provider)
├── package.json
├── webpack.config.js
└── tsconfig.json
Development
npm run compile # Production build
npm run watch # Development watch mode
npm test # Run tests
npm run test:coverage # Tests with coverage
Packaging
npm install -g @vscode/vsce
vsce package
License
MIT