PPocket Editor DOCUMENTATION
Reference / POCKET EDITOR

Shortcuts, settings, and troubleshooting

Keyboard shortcuts

On macOS, Cmd replaces Ctrl for the editor shortcuts below. Plugin-specific shortcuts retain their documented behavior.

ShortcutAction
Ctrl+N / Ctrl+ONew document / open files
Ctrl+S / Ctrl+Shift+SSave / Save As
Ctrl+Shift+ASave All
Ctrl+W / Ctrl+QClose file / quit
Ctrl+PQuick Open
Ctrl+Shift+PCommand palette
Ctrl+F / Ctrl+GFind / Find Next
Ctrl+SpacePHP completion in PHP documents
Enter / Shift+EnterSend / new line in AI composers

Undo, Redo, Cut, Copy, Paste, and Select All are also available in Edit. Split commands are under View; they have no dedicated default shortcut.

Command-line launch

sh
python3 -B pocket_editor.py
python3 -B pocket_editor.py path/to/file.py
python3 -B pocket_editor.py --safe-mode
python3 -B pocket_editor.py --no-session

Safe mode prevents plugin execution while retaining Plugin Manager through Settings. No-session skips both restoring and writing recovery snapshots.

Settings and local files

FilePurpose
pocket_editor_settings.jsonFont, wrapping, line numbers, tab width, vertical plugin tabs, disabled plugins
editor_about.pyPublished read-only author/contact details
pocket_editor_session.jsonSession tabs, cursor/scroll positions, unsaved text/formatting snapshots
pocket_editor_session.lockSession ownership lock; another editor instance avoids overwriting recovery data
pocket_editor_session.invalid.jsonPreserved malformed recovery snapshot
pocket_editor_plugins/project_terminal_settings.jsonSaved project commands and global _appearance preferences
pocket_editor_plugins/ai_assistant_settings.jsonCustom AI provider/model/API format/reasoning/limits; excludes API keys
pocket_editor_plugins/code_theme_settings.jsonDocument theme and language selection
pocket_editor_plugins/php_completion_settings.jsonPHP completion project/library preferences
pocket_editor_plugins/php_formatter_settings.jsonPHP formatting preferences, when saved
pocket_editor_plugins/python_formatter_settings.jsonOptional Black formatting preferences

Plugin setting files are created when needed. Recovery snapshots contain local document content. Custom AI keys come from its memory-only field or environment variables, not from its settings file. The bundled AI backend manages its credentials separately; consult its /keys setup.

Troubleshooting

  • A plugin does not appear: use Load New Plugins, check Plugin Manager for errors/disabled status, and restart after editing a loaded plugin.
  • A plugin breaks startup: launch with --safe-mode, disable it through Settings → Plugin Manager, and restart normally.
  • Text is unsaved: a dot/amber title marks edits. Closing prompts Save, Discard, or Cancel. Save As cancellation and failed writes keep the file open.
  • Formatting vanished after saving text: use Rich Text → Save Formatted Copy for .pocket output. Plain-text Save cannot retain formatting.
  • Terminal text is uncolored: select a preset, enable ANSI or category coloring, or explicitly request force-color if your tool suppresses ANSI for piped output. Check encoding for legacy Windows tools.
  • An AI reply ends early: inspect the reply cap, provider errors, and timeout. Explicitly choose a larger cap if appropriate; this can use more credits.
  • OpenAI rejects authentication: use a Platform API key in AI Assistant, not a Codex subscription login token. No credentials are read from Codex login files.
  • Provider returns 429: wait for the local pause, then check provider rate limits and available quota; retries cannot reset the account limit.
  • Attachments exceed the input budget: remove files/history or raise the limit explicitly. PDFs/images are not supported by the custom example.
  • PHP completion is missing: confirm the file type, local Node tools, project folder, target PHP version, and library folders; reindex after external changes.
  • Python formatting is unavailable: install Black in the interpreter running Pocket Editor. It is optional; do not change the editor’s Python environment accidentally.

Verification and scope

Use the tests relevant to your changes. They require a graphical desktop for real Tk checks.

sh
python3 -B -m unittest -v test_editor
python3 -B -m unittest -v test_plugin_builder test_plugin_manager
python3 -B -m unittest -v test_ai_assistant
python3 -B -m unittest -v test_terminal_colors test_split_editor
python3 -B -m unittest -v test_quick_open test_command_palette test_editor_session
python3 -B -m unittest -v test_syntax_diagnostics test_tabs_about test_php
python3 -B tools/documentation/build_docs.py
python3 -B -m unittest -v test_documentation

The terminal and process integration tests were run on Linux; Windows/macOS runtime behavior is not verified. Mocked AI tests make no real provider requests. No project/framework license is assigned by this documentation.

About

Pocket Editor by Somi Douth. Contact somidouth@gmail.com. Built with Python and Tkinter. Help → About Pocket Editor displays the published author and contact information; it has no editing control.

Created by Somi Douth · Built with Python and Tkinter