Repository navigation
Editing Code
The editor has the everyday tools of an IDE editor: syntax colors, code completion, multiple cursors, line commands in a Code menu, and folding. How text looks (line spacing, whitespace, the cursor, word wrap, indentation and zoom) is on Code Appearance. Tabs, saving and change markers are on Editor and Tabs.
The editor has line numbers, bracket matching, Tab to indent, and syntax colors for JavaScript, TypeScript, JSX, Rust, PHP, HTML, Vue, Svelte, Blade, CSS, SCSS, Less, JSON, Markdown, Python, YAML, SQL, Go, Java, Kotlin, Swift, Ruby, shell scripts, TOML, XML, Dockerfile, C, C++ and C#. A language loads the first time you open one of its files.
Edit > Undo (Cmd+Z) and Redo (Shift+Cmd+Z) work on the editor that has the focus, with its own history per tab.
To find text in the file, press Cmd+F. See Find and Replace.
You can type in several places at once:
- Option+Shift+click adds a cursor where you click.
- Cmd+D (Select Next Occurrence) selects the word at the cursor, then adds the next place where it appears, one at a time.
- Ctrl+Cmd+G (Edit > Select All Occurrences) selects every place at once.
Press Esc to go back to one cursor.

Completion for this.disc, indent guides, and fold arrows with one folded block.
Each one has a switch in Settings, Editor, Editing features. Turning one off removes it from open editors and frees its memory.
Typing (, [, { or a quote adds the closing one. Typing the closer steps over it; Backspace deletes both.
A list of suggestions opens while you type: words from the file plus the language's own keywords and names. Ctrl+Space opens it by hand. Up and Down pick, Enter or Tab accepts, Esc closes. Turn off Show completion while typing to open it only with Ctrl+Space. In Markdown and plain text it always waits for Ctrl+Space, so writing prose stays quiet.
Arrows beside the line numbers fold and unfold blocks. They show while the pointer is over the gutter; a folded block keeps its arrow.
Faint vertical lines mark each indent level, showing which block a line belongs to.
Other uses of the word at the cursor get a soft background.
The last line can scroll up to the top of the editor.
Hold Option and drag to select a rectangle: one cursor per line, at the same columns. Option+Shift+click still adds a cursor.
A thin line at a column. It is off by default; turn it on and pick the column (120 is common).
Diffs and the merge tool get indent guides, word highlights, column selection and the margin line. Folding and scrolling past the end stay in the file editor, so the panes keep lining up.
The Code menu in the menu bar acts on the editor that has the focus. Its keys work without the menu, too.
| Item | Key | What it does |
|---|---|---|
| Comment with Line Comment | Cmd+/ | Comments the lines out, or back in |
| Comment with Block Comment | Option+Cmd+/ (or Ctrl+Shift+A) | Wraps the selection in a block comment |
| Duplicate Line or Selection | Shift+Cmd+D | Copies the selection right after itself, or the line below |
| Delete Line | Shift+Cmd+K | Deletes the line |
| Join Lines | Ctrl+Shift+J | Joins the line with the next one, with one space between |
| Move Line Up / Down | Option+Up / Option+Down | Moves the line, or the selected lines |
| Indent Line / Unindent Line | Cmd+] / Cmd+[ | Moves the lines one indent level right or left |
| Toggle Case | Shift+Cmd+U | Upper case, or lower case if it already is |
| Sort Lines | Sorts the selected lines, or the whole file | |
| Folding > Expand / Collapse | Option+Cmd+] / Option+Cmd+[ | Opens or folds the block at the cursor |
| Folding > Expand All / Collapse All | Ctrl+Option+] / Ctrl+Option+[ | Opens or folds every block |
| Go to Line... | Cmd+L | Jumps to a line |
| Select Next Occurrence | Cmd+D | Adds the next match to the selection |
Items that change the text are greyed out in a read-only pane (such as a diff) or while no editor has the focus.
Duplicate takes Shift+Cmd+D because Cmd+D adds the next occurrence. Option+Shift+Up and Down copy the line up or down.
Code > Go to Line... (Cmd+L) asks for a line number. Type 42, or 42:7 for line 42 at column 7, and press Go. The field starts with where the cursor is now. The older key Option+Cmd+G still opens a small line field too.
These pages are generated from docs/wiki. To correct something, open a pull request against the source file; edits made here are overwritten.
Using Nibtree
- Getting Started
- Welcome Screen
- Workspaces
- Files Panel
- File Operations
- File Icons
- Rounded Panels
- Editor and Tabs
- Pin Reorder and Wrap Tabs
- Single Tab Title
- Split Editor
- New File and Unsaved Changes
- Unload Hidden Tabs
- Editing Code
- Code Appearance
- Markdown Editor
- Image and PDF Preview
- Search Everywhere
- Recent Files
- Navigation Bar
- Find and Replace
- Changes and Commits
- Sign In Prompts
- Commit Box Layout
- Repository Actions
- Commit Options
- Ignoring Files
- Diffs
- Inline Diffs
- Staging View
- Revert a Change
- Resolving Conflicts
- Merge Tool
- Blame
- History and Log
- Merge Commits
- Branches and Tags
- Branches Popup
- Remotes
- Stashes
- Shelf
- Git Menu
- Git Dialogs
- Interactive Rebase
- Worktrees
- AI Agents
- AI Tasks
- AI Usage
- Keep Computer Awake
- Submodules
- Git LFS
- GitHub
- Git Console
- Terminal
- Terminal Features
- Scripts
- Navigation
- Menus
- Settings
- Settings Search
- Color Themes
- Settings Terminal and Automation
- Settings Files
- Updates
- Status Bar and Help
- Notifications
- Memory Use
- Clear Cache
- MCP and CLI
- Git Mergetool
- Keyboard Shortcuts
- Keyboard Shortcuts Editor
- Troubleshooting
- Troubleshooting Git
Developers
- Developer Guide
- Architecture
- Project Layout
- Backend
- How Folder Watching Works
- Folder Watching Bugs We Fixed
- How Workspace Files Work
- How the Preview Scheme Works
- Backend Services
- How Terminal Features Work
- Terminal Bugs We Fixed
- Frontend
- How the Rich Markdown Editor Works
- Rich Markdown Bugs We Fixed
- Git Menu Links
- Menu Keys and Routing
- Frontend Modules
- Blame Bugs We Fixed
- Project Color And Title Bar
- One Diff View
- Diff Bugs We Fixed
- Merge Tool Layouts
- Merge Tool Bugs We Fixed
- Color Theme Bugs We Fixed
- How the Connected Diff Works
- Rounded Panels Bugs We Fixed
- Update Bugs We Fixed
- Status Bar Bugs We Fixed
- MCP and CLI Bugs We Fixed
- Repository Actions Bugs We Fixed
- How the Changes Tab Works
- CodeMirror Patterns
- How the Cursor Works
- How Editor Features Work
- How the Path Bar Works
- Commands and Events
- Settings Reference
- Commands Workspace and Changes
- Commands Branches and Remotes
- Commands History and Extras
- Commands App and Tools
- Testing
- Test Suites
- Debugging
- Debugging with MCP
- Measuring Setting Memory
- How Terminal Memory Is Measured
- How Markdown Diagrams Work
- Releases and CI
- Publishing the Wiki
- Versioning and Changelog
- Browser Version Packages
- Browser Release Checks
- Docker Image
- Platforms and Signing
- Windows Support
- Windows Bugs We Fixed
- Windows MCP and CLI
- Docs and Screenshots
- UI Library
- UI Library MCP
- UI Library Bugs
- UI Library Migration
- Contributing
How features work
- Welcome screen
- Workspaces and folders
- Files panel
- File operations
- File icons
- Editor and tabs
- Pin, reorder and wrap tabs
- Single tab title
- Split editor
- New File and unsaved changes
- Unload hidden tabs
- Editing code
- Code appearance
- Markdown editor
- Image and PDF preview
- Search Everywhere
- Recent Files
- Navigation Bar
- Find and replace
- Changes and commits
- Sign-in prompts
- Commit box layout
- Repository actions
- Commit options
- Ignoring files
- Diffs
- Inline diffs
- Staging view
- Revert a change
- Resolving conflicts
- Merge tool
- Blame
- History and log
- Merge commits
- Commit tabs
- Branches and tags
- Branches popup
- Remotes
- Stashes
- Shelf
- Git menu
- Git dialogs
- Interactive rebase
- Worktrees
- AI agents
- AI usage
- Keep computer awake
- AI tasks
- Submodules
- Git LFS
- GitHub account
- Git Console
- Back and Forward
- Integrated terminal
- Scripts tool window
- Menu bar
- Settings
- Search in Settings
- Color themes
- Rounded panels
- Updates and release channels
- Status bar and help links
- Notifications
- Memory readout and memory log
- Clear Cache
- MCP server and command line tool
- git mergetool mode