Documentation
For scripting, see the API Reference.
Welcome to Peeknext
Peeknext is configured using a single human-readable configuration file. The configuration format is designed to be simple to edit, version control, and share. Most settings can be changed without restarting the editor unless otherwise noted.
Open the configuration file at any time with ⌘command , or Open config file from the Command Palette.
The latest default configuration is always available from our GitHub.
The configuration file
The configuration file is divided into sections:
[license]
path_to_license_file -- path to license file, /path/to/license.json
[editor]
font SF Mono
font_size 14
...
[models]
code_completion qwen2.5-coder:1.5b
inline_chat glm-5.3-flash:cloud
[keybinds]
new_file Cmd + N
new_window Cmd + Shift + N
open_file Cmd + O
save_file Cmd + S
...
[user]
word_count Cmd + J
Sections can be removed or commented out if not needed. Theme names are their own sections, like this:
[koi-dark]
background #1f272a
foreground #f7f7f4
text_color #ffffff
...
[dracula]
background #282A36
foreground #6272A4
text_color #F8F8F2
...
See Appearance.
[license]
[license]
-- Peeknext is free for non-commercial use.
-- For commercial use, purchase a license at:
-- https://peeknext.com/
path_to_license_file -- path to license file, /path/to/license.json
Set path_to_license_file to the absolute path of your Peeknext license file, for example /Users/michael/license.json.
Peeknext is free for non-commercial use. A license is required for commercial use.
License files are delivered after purchase and can be stored anywhere on your system. License verification works entirely offline, without an account or internet connection.
For teams and businesses, the license file can be placed in a shared location and referenced by multiple installations, subject to the purchased license's user limit. If no valid license is configured, Peeknext operates in non-commercial mode.
[editor]
[editor]
font SF Mono
font_weight -- light, normal, medium, bold
font_size 14
line_extra_height 2
tab_width 4
theme adaptive
adaptive_theme koi, koi-dark
auto_indent true
auto_complete true
file_explorer_root -- absolute path; default: Desktop
file_types_to_exclude .dmg, .app, .git, ...
files_to_open_on_startup -- comma-separated absolute paths
inline_command_in_files txt, md, org
inline_shell_symbol %
inline_chat_symbol >
bookmark_prefix !>
annotation_words TODO, NOTE, MARK, FIXME
scripts_enabled false
allow_unsafe_scripts false -- allow imports
click_on_links false -- if false, use an inline command to activate
accept_auto_completion -- tab, newline, move_caret_line_end; default: newline
accept_code_completion -- tab, newline, move_caret_line_end; default: tab
| Setting | Description |
|---|---|
font |
Editor font. Uses installed fonts or fonts placed in ~/Library/Application Support/Peeknext/fonts. |
font_weight |
Font weight: light, normal, medium, or bold. |
font_size |
Editor font size in points. |
line_extra_height |
Additional vertical spacing between lines, in pixels. |
tab_width |
Display width of tab characters, measured in spaces. |
theme |
Editor color theme. Use adaptive to follow the system appearance. |
adaptive_theme |
Light and dark themes used when theme is set to adaptive, respectively. |
auto_indent |
Automatically indent new lines based on the preceding line. |
auto_complete |
Enable context-aware text auto complete. |
file_explorer_root |
Default root directory for the File Explorer and project-wide search. Defaults to Desktop. |
file_types_to_exclude |
Comma-separated files, directories, or extensions excluded from file navigation. |
files_to_open_on_startup |
Comma-separated absolute paths to files opened when Peeknext starts. |
inline_command_in_files |
File extensions in which inline commands are enabled. |
inline_shell_symbol |
Prefix used to execute shell commands inline. |
inline_chat_symbol |
Prefix used to invoke inline chat. |
annotation_words |
Words recognized as annotations, such as TODO and FIXME. |
scripts_enabled |
Enable user-defined scripts. |
allow_unsafe_scripts |
Allow scripts to import Python modules. |
click_on_links |
Enable opening links by clicking them. When disabled, links can be activated through an inline command. |
accept_auto_completion |
Additional keys or actions that accept auto complete suggestions. |
accept_code_completion |
Additional keys or actions that accept code completion suggestions. |
User interface
Show or hide individual elements of the editor interface.
-- ui
show_line_numbers true
show_scrollbar true
show_minimap false
show_indent_guides true
show_annotations true
show_ui_borders false
show_splitter_handle false
| Setting | Description |
|---|---|
show_line_numbers |
Show line numbers in the editor margin. |
show_scrollbar |
Show the vertical scrollbar. |
show_minimap |
Show the document minimap. |
show_indent_guides |
Show vertical indentation guides. |
show_annotations |
Show annotations, such as Lines folded. |
show_ui_borders |
Show borders around editor interface elements. |
show_splitter_handle |
Show the handle between split editor views. |
Cursor
Configure the cursor size, shape, line highlighting, blinking, and trail effect.
-- cursor
cursor_width 2
cursor_extra_height 8
cursor_as_block false
cursor_line_highlight true
cursor_blink false
cursor_blink_period 530 -- milliseconds; default: 530
cursor_trail_effect false
| Setting | Description |
|---|---|
cursor_width |
Cursor width in pixels. |
cursor_extra_height |
Additional cursor height in pixels. |
cursor_as_block |
Display the cursor as a block instead of a vertical line. |
cursor_line_highlight |
Highlight the line containing the cursor. |
cursor_blink |
Enable cursor blinking. |
cursor_blink_period |
Cursor blink interval in milliseconds. Default: 530. |
cursor_trail_effect |
Enable a visual trail effect when the cursor moves. |
Statusbar
Choose which file, editor, and model information is displayed in the status bar.
-- statusbar
show_line_info true
show_file_explorer_root true
show_file_with_path false
show_model_info true
show_active_lexer true
| Setting | Description |
|---|---|
show_line_info |
Show the current line and column information. |
show_file_explorer_root |
Show the current File Explorer root directory. |
show_file_with_path |
Show the current file name with its full path. |
show_model_info |
Show information about the active AI model. |
show_active_lexer |
Show the active syntax highlighting lexer. |
Miscellaneous
Additional settings for interface typography, scrolling, line endings, terminals, opacity, whitespace, and rulers.
-- misc
ui_font SF Mono
ui_font_weight -- default: normal
ui_font_size -- default: 12pt
scrollbar_width 4
minimap_width 64
open_on_largest_screen true
eol_mode lf -- crlf, cr, lf
eol_symbols_visible false
terminal_to_use -- Ghostty, Warp; default: Terminal
window_opacity 1
selection_opacity 0.2
indent_guides_opacity 0.1
whitespace_opacity 0.1
whitespace_symbol ▪
vertical_rulers -- comma-separated list of columns
| Setting | Description |
|---|---|
ui_font |
Font used for interface elements. |
ui_font_weight |
Interface font weight. Default: normal. |
ui_font_size |
Interface font size in points. Default: 12. |
scrollbar_width |
Width of the vertical scrollbar in pixels. |
minimap_width |
Width of the document minimap in pixels. |
open_on_largest_screen |
Open new windows on the largest connected display. |
eol_mode |
Line ending format: lf, crlf, or cr. |
eol_symbols_visible |
Show line ending symbols in the editor. |
terminal_to_use |
Terminal application used to open external terminals. Supports Ghostty, Warp, or the default macOS Terminal. |
window_opacity |
Window opacity, from 0 (transparent) to 1 (opaque). |
selection_opacity |
Opacity of text selection highlights, from 0 to 1. |
indent_guides_opacity |
Opacity of indentation guides, from 0 to 1. |
whitespace_opacity |
Opacity of visible whitespace symbols, from 0 to 1. |
whitespace_symbol |
Character used to represent visible whitespace. |
vertical_rulers |
Comma-separated list of column positions at which to display vertical rulers. |
TODO: add all config sections here, then refer to usage for explanation.
[models]
[models]
-- code_completion qwen2.5-coder:1.5b
-- inline_chat gpt-oss:120b-cloud
See Usage.
[keybinds]
All editor commands and active key bindings are listed in the Command Palette.
[keybinds]
new_file Cmd + N
new_window Cmd + Shift + N
open_file Cmd + O
save_file Cmd + S
save_file_as Cmd + Shift + S
...
Multiple key bindings can be assigned to the same editor command by separating them with commas, or omitted to only be called via Command Palette.
...
extend_selection_back_word Option + Shift + Left, Option + Shift + B
extend_selection_forward_word
...
Use Comma for ,, Period for ., Plus for +, and Minus for -.
See Editor commands for all available editor commands.
[user]
This is where you assign key bindings to your own functions.
[user]
word_count Cmd + J
See API Reference.
Usage
Peeknext provides keyboard-driven editing, document-based auto completion, optional AI code completion, inline commands, and file navigation. Most functionality is accessible through the Command Palette.
Command Palette
The Command Palette provides access to editor commands without requiring keyboard shortcuts.
Open it with ⌘⇧P.
Start typing to filter available commands by name. Select a command using the arrow keys and press Return to execute it.
The Command Palette can be used to perform editing operations, navigate files, change editor settings, and access commands without remembering their keyboard shortcuts.
Commands include:
- File operations, such as saving, reopening, and reloading documents.
- Editing operations, including indentation, sorting, and line manipulation.
- Navigation, selections, and multi-cursor editing.
- Changing line endings, tab width, and syntax highlighting.
- Opening editor panels and switching between views.
Commands can also be assigned custom keyboard shortcuts in the [keybinds] configuration section.
See Editor commands for the complete list of available commands and their descriptions.
Editing
Peeknext supports automatic indentation, configurable tab width, multiple selections, and multi-cursor editing.
Indentation behavior can be configured using auto_indent, tab_width, and tabs_over_spaces in [editor].
Multi-cursor editing
Multiple cursors allow you to edit several locations in a document simultaneously. You can create multiple cursors using:
- ⌘Click to add a cursor at the clicked position
- ⌥Drag to add cursor vertically across multiple lines
- Add cursors on adjacent lines using editor commands
- Select additional occurrences of the current selection
- Place a cursor at the beginning of each selected line
Each cursor supports normal text insertion, deletion, and selection operations. Use the corresponding commands in the Command Palette to remove the last cursor or merge multiple cursors into one.
Tab multi-select
Peeknext supports selecting multiple tabs, allowing several files to remain active together. Use the tab selection commands to extend the current selection.
| Command | Description |
|---|---|
next_tab_extend |
Extend the selection to the next tab. |
previous_tab_extend |
Extend the selection to the previous tab. |
extend_to_buffer_1 - extend_to_buffer_9 |
Extend the selection to a specific buffer position. |
unselect_other_active_tabs |
Deselect other tabs, leaving only the current tab selected. |
Normal tab navigation remains available through next_tab, previous_tab, and switch_to_buffer_1 through switch_to_buffer_9.
Tab selection is independent of text selection within a document.
Multiple views
Peeknext supports multiple editor views within the same window and same editor view in multiple windows.
Use Toggle split editor to show or hide a second view of the active document. This is the document dual pane view.
The same document can also be opened in two windows. Changes made in one view are immediately reflected in the other, while each view maintains its own cursor position and scroll position.
Use the following commands to navigate between panes.
| Command | Description |
|---|---|
toggle_split_editor |
Show or hide the split editor. |
focus_main_editor |
Move keyboard focus to the main editor. |
focus_split_editor |
Move keyboard focus to the split editor. |
All editor views support normal editing, syntax highlighting, selections, and navigation.
Auto completion
Peeknext provides context-aware auto completion using text from the current document.
As you type, Peeknext suggests words, identifiers, and other text already present in the file. Suggestions update as the document changes.
Auto completion does not require an AI model, language server, or internet connection.
Project-wide auto completion is currently not supported. Suggestions are generated from the current document only.
Accepting suggestions
Auto completion suggestions can be accepted using a configurable editor command.
[editor]
auto_complete true
accept_auto_completion newline
With this configuration, ⏎Return accepts the selected suggestion when auto completion is active. Otherwise, Return inserts a newline normally.
Code completion
Peeknext supports optional AI-powered code completion through Ollama.
Unlike document-based auto completion, code completion uses a language model to suggest text based on the surrounding code. Code completion is disabled until a model is configured.
Setting up Ollama
Install and configure Ollama, then download a compatible code completion model. For example:
ollama pull qwen2.5-coder:1.5b
Configure the model in your Peeknext configuration file:
[models]
code_completion qwen2.5-coder:1.5b
Code completion works best with models that support fill-in-the-middle (FIM) generation. Smaller models generally provide faster suggestions, particularly when running locally.
Accepting code completion
Code completion suggestions appear as ghost text in the editor. Configure the command used to accept a suggestion:
[editor]
accept_code_completion tab
When a suggestion is available, ⇥Tab accepts it. Otherwise, Tab retains its normal editing behavior.
Auto completion and code completion have independent acceptance settings.
Inline commands
Inline commands allow you to execute shell commands, evaluate Python expressions, and submit AI chat prompts directly from a document. Invoke them with ⌘⇧⏎, or Inline command through the Command Palette.
By default, inline commands are available in txt, md, and org files.
Additional file types can be configured through inline_command_in_files.
Shell commands
Prefix a command with % to execute it using the system shell.
% pwd
Place the cursor on the command line and invoke Inline command.
Shell commands have a hard execution timeout of 10 seconds. They are intended for short commands and scripts rather than interactive programs or long-running processes.
The prefix can be changed using inline_shell_symbol in [editor].
Python expressions
Python expressions can be evaluated directly without a prefix.
print("hello there")
Place the cursor on the expression and invoke Inline command.
Inline chat
Inline chat allows you to submit prompts to an AI model without leaving the editor.
Configure a model in [models]:
[models]
inline_chat gpt-oss:120b-cloud
Prompts begin with the configured inline chat prefix, which defaults to >.
> Explain why this function may be slow.
Place the cursor on the prompt line and invoke Inline command.
Peeknext sends the current document as context and writes the model's response directly into the file.
The prefix can be changed using inline_chat_symbol in [editor].
Both inline chat and code completion are optional. Peeknext can operate entirely offline without either feature.
Search and replace
Peeknext provides search within the current document and project-wide search across files.
Search within a document
Use ⌘F or the Find in file command to search the current document. Search operates on the active buffer without requiring a project or file index.
Project-wide search
Use ⌘⇧F or the Show search explorer command to search across files in the current File Explorer root. Project-wide search uses ripgrep and searches recursively through the selected directory.
Results update as you type, allowing you to locate text, identifiers, and references across multiple files.
The search scope follows the File Explorer root. To search a different directory, change the root before searching.
Files and directories excluded through file_types_to_exclude are omitted from the file index.
Files and navigation
Peeknext uses a folder-based workflow without project files or project-specific configuration. Any directory can serve as the working root for file navigation and project-wide search.
File Explorer
The File Explorer displays files and directories under the current root.
By default, the root is the Desktop.
You can change it using file_explorer_root in [editor] or navigate to another directory from the File Explorer.
Use Reset file explorer to return to the default location.
Startup files
Peeknext can automatically open specific files when it launches.
Configure files_to_open_on_startup in [editor] with a comma-separated list of absolute paths.
File comparison
Peeknext provides commands for comparing files against Git and other open buffers.
| Command | Description |
|---|---|
open_diff_from_git |
Compare the current file against its Git version. |
open_diff_from_buffers |
Compare the contents of open buffers. |
diff_open_buffers_word_indicators |
Display word-level difference indicators between open buffers. |
Git comparison
Use Open diff from Git to compare the current document with its Git version. This is useful for reviewing local modifications without leaving the editor.
Buffer comparison
Use Open diff from buffers to compare documents already open in Peeknext. Word-level difference indicators provide additional detail when examining changes within individual lines.
Diff colors are controlled by the active theme.
| Style | Description |
|---|---|
_error |
Deleted lines. |
_warning |
Modified lines. |
_success |
Added lines. |
See Appearance for theme customization.
Syntax highlighting
Peeknext includes built-in syntax highlighting for supported programming and markup languages.
The editor automatically selects a lexer based on the file type. Lexers identify language elements such as keywords, strings, comments, operators, and function names.
Supported languages include:
- C and C++
- Python
- Rust
- HTML
- Markdown
- Bash
- Assembly
- Odin
- PHP
Additional lexers may be available depending on the installed version.
Lexer selection
Syntax highlighting is normally selected automatically when opening a file. The following commands are available through the Command Palette.
| Command | Description |
|---|---|
auto_detect_lexer |
Automatically detect and apply a lexer to the current document. |
detach_lexer |
Remove the active lexer and display the document without syntax highlighting. |
The active lexer can be displayed in the status bar using show_active_lexer.
Syntax colors
All built-in lexers use a shared set of theme styles, allowing the same theme to provide consistent highlighting across different languages. Colors for keywords, strings, comments, types, functions, and other language elements are configured through the active theme.
See Appearance for the complete syntax style reference.
Line endings
Peeknext supports three line ending formats:
lf, Unix/macOS line feedcrlf, Windows carriage return and line feedcr, legacy Mac carriage return
The default line ending mode can be configured using eol_mode.
[editor]
eol_mode lf -- crlf, cr, lf
eol_symbols_visible false
Changing line endings
The line ending mode can also be changed for the current buffer using the Command Palette. Peeknext provides separate commands to:
- Change the active EOL mode for subsequent editing.
- Convert all existing line endings in the document to the selected format.
Changing the active mode does not necessarily convert existing line endings. Use the conversion command when you want to normalize an entire file.
Line ending symbols can be displayed using eol_symbols_visible in the configuration.
Editor commands
Peeknext provides editor commands for file management, navigation, text editing, selections, multi-cursor editing, and workspace control. Commands can be executed through the Command Palette or assigned keyboard shortcuts.
Files and windows
| Command | Description |
|---|---|
new_file |
Create a new empty document. |
new_window |
Open a new editor window. |
open_file |
Open a file from disk. |
save_file |
Save the current document. |
save_file_as |
Save the current document under a new name or location. |
save_file_copy_as |
Save a copy of the current document without changing the original file. |
close_file |
Close the current document. |
close_window |
Close the current editor window. |
close_other_files |
Close all files except the current document. |
reopen_last_closed_file |
Reopen the most recently closed file. |
reload_from_disk |
Reload the current document from disk. |
open_file_in_new_window |
Open the current file in a new editor window. |
copy_path_to_file |
Copy the current file's absolute path to the clipboard. |
reveal_in_finder |
Reveal the current file in Finder. |
toggle_read_only |
Toggle read-only mode for the current document. |
Workspace and interface
| Command | Description |
|---|---|
toggle_split_editor |
Show or hide the split editor view. |
focus_main_editor |
Move keyboard focus to the main editor. |
focus_split_editor |
Move keyboard focus to the split editor. |
show_file_explorer |
Open the File Explorer. |
show_buffer_explorer |
Open the Buffer Explorer. |
show_outline_panel |
Open the document outline panel. |
show_command_palette |
Open the Command Palette. |
show_search_explorer |
Open project-wide search. |
open_terminal |
Open an external terminal. |
open_config_file |
Open the Peeknext configuration file. |
open_scripts_file |
Open the user scripts file. |
reset_window_position |
Reset the editor window position. |
reset_file_explorer |
Reset the File Explorer to its default root. |
reload_file_explorer |
Refresh the File Explorer contents. |
show_license_info |
Display license information. |
Tabs and buffers
| Command | Description |
|---|---|
previous_tab |
Switch to the previous tab. |
previous_tab_extend |
Switch to the previous tab while extending the tab selection. |
next_tab |
Switch to the next tab. |
next_tab_extend |
Switch to the next tab while extending the tab selection. |
unselect_other_active_tabs |
Deselect all other selected tabs. |
switch_to_buffer_1 - switch_to_buffer_9 |
Switch to the corresponding buffer position. |
extend_to_buffer_1 - extend_to_buffer_9 |
Extend the active tab selection to the corresponding buffer position. |
Basic editing
| Command | Description |
|---|---|
undo |
Undo the last editing operation. |
redo |
Redo the last undone operation. |
copy |
Copy the selected text. |
cut |
Cut the selected text. |
paste |
Paste text from the clipboard. |
select_all |
Select the entire document. |
cancel |
Cancel the current operation or selection. |
newline |
Insert a new line. |
tab |
Insert a tab or indentation. |
backtab |
Reduce indentation. |
line_indent |
Increase indentation of the current line or selection. |
line_unindent |
Decrease indentation of the current line or selection. |
line_comment |
Toggle line comments for the current line or selection. |
lowercase |
Convert selected text to lowercase. |
uppercase |
Convert selected text to uppercase. |
duplicate_line |
Duplicate the current line. |
selection_duplicate |
Duplicate the current selection. |
move_line_up |
Move the current line or selected lines upward. |
move_line_down |
Move the current line or selected lines downward. |
insert_line_above |
Insert a new line above the current line. |
insert_line_below |
Insert a new line below the current line. |
delete_line |
Delete the current line. |
sort_selected_lines |
Sort selected lines in ascending order. |
sort_selected_lines_reverse |
Sort selected lines in descending order. |
format_csv_columns |
Align comma-separated values into columns. |
Selections and multiple cursors
| Command | Description |
|---|---|
select_next_match |
Add the next occurrence of the selected text to the selection. |
unselect_last_match |
Remove the most recently added matching selection. |
select_matches |
Select all matching occurrences of the current selection. |
add_cursors_to_line_starts |
Add cursors at the beginning of selected lines. |
line_add_caret_up |
Add a cursor on the line above. |
line_add_caret_down |
Add a cursor on the line below. |
Cursor movement
| Command | Description |
|---|---|
move_caret_back |
Move the cursor one character backward. |
move_caret_forward |
Move the cursor one character forward. |
line_up |
Move the cursor up one line. |
line_down |
Move the cursor down one line. |
home |
Move the cursor to the beginning of the line. |
move_caret_line_start |
Move the cursor to the start of the current line. |
move_caret_line_end |
Move the cursor to the end of the current line. |
document_start |
Move the cursor to the beginning of the document. |
document_end |
Move the cursor to the end of the document. |
move_caret_back_word |
Move backward to the beginning of a word. |
move_caret_forward_word |
Move forward to the beginning of the next word. |
move_caret_back_word_end |
Move backward to a word boundary. |
move_caret_forward_word_end |
Move forward to the end of a word. |
move_caret_back_word_part |
Move backward to the previous word-part boundary. |
move_caret_forward_word_part |
Move forward to the next word-part boundary. |
move_caret_paragraph_above |
Move to the previous paragraph. |
move_caret_paragraph_below |
Move to the next paragraph. |
move_up_to_empty_line |
Move to the previous empty line. |
move_down_to_empty_line |
Move to the next empty line. |
line_up_start |
Move to the beginning of the line above. |
line_down_end |
Move to the end of the line below. |
go_to_line |
Navigate to a specified line number. |
center_on_cursor |
Center the editor view on the current cursor position. |
Extending selections
Commands ending in _extend move the cursor while extending the current selection.
| Command | Description |
|---|---|
extend_selection_back |
Extend the selection one character backward. |
extend_selection_forward |
Extend the selection one character forward. |
line_up_extend |
Extend the selection one line upward. |
line_down_extend |
Extend the selection one line downward. |
home_extend |
Extend the selection to the beginning of the line. |
extend_selection_line_start |
Extend the selection to the start of the current line. |
extend_selection_line_end |
Extend the selection to the end of the current line. |
document_start_extend |
Extend the selection to the beginning of the document. |
document_end_extend |
Extend the selection to the end of the document. |
extend_selection_back_word |
Extend the selection backward by one word. |
extend_selection_forward_word |
Extend the selection forward by one word. |
extend_selection_back_word_end |
Extend the selection backward to a word boundary. |
extend_selection_forward_word_end |
Extend the selection forward to the end of a word. |
extend_selection_back_word_part |
Extend the selection backward by one word part. |
extend_selection_forward_word_part |
Extend the selection forward by one word part. |
extend_selection_paragraph_above |
Extend the selection to the previous paragraph. |
extend_selection_paragraph_below |
Extend the selection to the next paragraph. |
move_up_to_empty_line_extend |
Extend the selection to the previous empty line. |
move_down_to_empty_line_extend |
Extend the selection to the next empty line. |
line_up_start_extend |
Extend the selection to the beginning of the line above. |
line_down_end_extend |
Extend the selection to the end of the line below. |
Scrolling and display
| Command | Description |
|---|---|
line_scroll_up |
Scroll the editor upward by one line. |
line_scroll_down |
Scroll the editor downward by one line. |
page_up |
Move upward by one page. |
page_down |
Move downward by one page. |
page_up_stuttered |
Scroll upward using stuttered page movement. |
page_down_stuttered |
Scroll downward using stuttered page movement. |
zoom_in |
Increase the editor font size. |
zoom_out |
Decrease the editor font size. |
reset_zoom |
Restore the default editor zoom level. |
toggle_word_wrap |
Toggle line wrapping. |
toggle_indent_guides |
Show or hide indentation guides. |
Deleting text
| Command | Description |
|---|---|
delete_back |
Delete the character before the cursor. |
delete_back_not_newline |
Delete backward without joining lines. |
delete_forward |
Delete the character after the cursor. |
delete_back_word |
Delete the word before the cursor. |
delete_forward_word |
Delete the word after the cursor. |
delete_to_line_start |
Delete text from the cursor to the beginning of the line. |
delete_to_line_end |
Delete text from the cursor to the end of the line. |
Search and comparison
| Command | Description |
|---|---|
find_in_file |
Search for text within the current document. |
open_diff_from_git |
Open a comparison against the Git version of the file. |
open_diff_from_buffers |
Open a comparison between buffers. |
diff_open_buffers_word_indicators |
Display word-level differences between open buffers. |
Folding
| Command | Description |
|---|---|
fold_line |
Toggle folding at the current line. |
fold_all |
Fold or unfold all available regions. |
move_caret_to_fold_above |
Move the cursor to the previous fold point. |
move_caret_to_fold_below |
Move the cursor to the next fold point. |
extend_selection_to_fold_above |
Extend the selection to the previous fold point. |
extend_selection_to_fold_below |
Extend the selection to the next fold point. |
Indentation and line endings
| Command | Description |
|---|---|
detect_tab_width |
Detect indentation width from the current document. |
tab_width_2_spaces |
Set the tab width to two spaces. |
tab_width_4_spaces |
Set the tab width to four spaces. |
tab_width_8_spaces |
Set the tab width to eight spaces. |
indent_with_spaces |
Use spaces for indentation. |
indent_with_tabs |
Use tab characters for indentation. |
eol_mode_lf |
Set the line ending mode to LF. |
eol_mode_crlf |
Set the line ending mode to CRLF. |
eol_mode_cr |
Set the line ending mode to CR. |
replace_all_eol |
Convert all line endings to the active EOL mode. |
toggle_eol_symbols |
Show or hide line ending symbols. |
replace_tabs_with_spaces |
Replace tab characters with spaces. |
Syntax highlighting
| Command | Description |
|---|---|
detach_lexer |
Remove syntax highlighting from the current document. |
auto_detect_lexer |
Automatically detect and apply a syntax highlighter. |
Inline commands and AI
| Command | Description |
|---|---|
inline_command |
Execute an inline shell command, evaluate an expression, or submit an inline chat prompt. |
python_eval_line |
Evaluate Python code on the current line. REMOVED |
submit_prompt |
Submit a prompt to the configured AI model. REMOVED |
Appearance
Peeknext includes built-in color themes and supports custom themes defined directly in the configuration file. Themes control editor colors, syntax highlighting, selections, and interface appearance.
Built-in themes
The following themes are included with Peeknext:
koi koi-dark koi-mono
hackerman focus writer
github-dark kujukuju ayu-dark
chatgpt dracula gruvbox
jblow mono-light tokyo-night
catppuccin nord monokai
Select a theme using the theme setting in [editor].
[editor]
theme koi-dark
To automatically switch themes based on the macOS appearance, use adaptive.
[editor]
theme adaptive
adaptive_theme koi, koi-dark
The first theme is used in light mode and the second in dark mode.
Custom themes
Themes are defined as named sections in the configuration file. You can create a custom theme by adding a section with your preferred name and defining its colors.
For example:
[my-theme]
background #1f272a
foreground #f7f7f4
text_color #ffffff
cursor #C6E5FF
default #f7f7f4
keyword #E67D74
class #D0C5A9
name #D0C5A9
function #D0C5A9
string #D4BC7D
number #D699B5
operator #E0AD82
comment #87919D
special #C6E5FF
type #C6E5FF
constant #D699B5
builtin #E0AD82
_highlight #D4BC7D
_link #C6E5FF, #C6E5FF
Activate the theme by setting:
[editor]
theme my-theme
Each theme maps colors to a shared set of syntax styles. Peeknext lexers use these styles to provide consistent syntax highlighting across supported languages.
Theme styles
Interface colors
Four base colors control the editor's appearance.
| Style | Description |
|---|---|
background |
Editor background color. |
foreground |
Interface foreground color. |
text_color |
Text color for highlighted or selected interface elements. |
cursor |
Text cursor color. |
Other interface colors, including dialog backgrounds, selections, and active states, are derived automatically from these values.
Syntax colors
Syntax styles determine how different elements of source code are highlighted.
| Style | Description |
|---|---|
default |
Default text color. |
keyword |
Language keywords. |
class |
Class names. |
name |
Names and identifiers, including function names. |
function |
Function definitions. |
string |
String literals. |
number |
Numeric literals. |
operator |
Operators. |
comment |
Comments. |
special |
Language-specific symbols and special syntax. |
type |
Type names. |
constant |
Constants. |
builtin |
Built-in functions and identifiers. |
The exact styles used depend on the active lexer.
Optional styles
Optional styles provide additional control over selections, search results, rich-text syntax, annotations, and diff indicators. When omitted, these styles use default colors or fall back to another defined style.
| Style | Description |
|---|---|
_selection |
Text selection color. |
_highlight |
Match text highlights. |
_link |
Links in Markdown and Org. Falls back to special. |
_bold |
Bold rich-text syntax. Falls back to builtin. |
_italic |
Italic rich-text syntax. Falls back to name. |
_underline |
Underlined rich-text syntax. Falls back to default. |
_verbatim |
Verbatim rich-text syntax. Falls back to name. |
_code |
Inline code in Markdown and Org. Falls back to comment. |
_annotation |
Editor annotations. Falls back to comment. |
_error |
Deleted diff lines. |
_warning |
Warnings, status indicators, and modified diff lines. |
_success |
Added diff lines. |
Style formatting
Styles support foreground colors, optional background colors, and text formatting.
Foreground color
Specify a hexadecimal color to set the text color.
keyword #FF79C6
Foreground and background
Add a second hexadecimal color to specify the background.
_link #0081FF, #0081FF
Peeknext automatically applies opacity to style backgrounds, allowing the foreground and background to use the same color without obscuring the text.
Text formatting
Add bold or italic to change the text appearance.
keyword #FF79C6, bold
Foreground color, background color, and formatting can also be combined.
keyword #FF79C6, #282A36, italic
Currently supported text formats are bold and italic.