Shortcuts, settings, and troubleshooting
Keyboard shortcuts
On macOS, Cmd replaces Ctrl for the editor shortcuts below. Plugin-specific shortcuts retain their documented behavior.
| Shortcut | Action |
|---|---|
| Ctrl+N / Ctrl+O | New document / open files |
| Ctrl+S / Ctrl+Shift+S | Save / Save As |
| Ctrl+Shift+A | Save All |
| Ctrl+W / Ctrl+Q | Close file / quit |
| Ctrl+P | Quick Open |
| Ctrl+Shift+P | Command palette |
| Ctrl+F / Ctrl+G | Find / Find Next |
| Ctrl+Space | PHP completion in PHP documents |
| Enter / Shift+Enter | Send / 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
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-sessionSafe mode prevents plugin execution while retaining Plugin Manager through Settings. No-session skips both restoring and writing recovery snapshots.
Settings and local files
| File | Purpose |
|---|---|
| pocket_editor_settings.json | Font, wrapping, line numbers, tab width, vertical plugin tabs, disabled plugins |
| editor_about.py | Published read-only author/contact details |
| pocket_editor_session.json | Session tabs, cursor/scroll positions, unsaved text/formatting snapshots |
| pocket_editor_session.lock | Session ownership lock; another editor instance avoids overwriting recovery data |
| pocket_editor_session.invalid.json | Preserved malformed recovery snapshot |
| pocket_editor_plugins/project_terminal_settings.json | Saved project commands and global _appearance preferences |
| pocket_editor_plugins/ai_assistant_settings.json | Custom AI provider/model/API format/reasoning/limits; excludes API keys |
| pocket_editor_plugins/code_theme_settings.json | Document theme and language selection |
| pocket_editor_plugins/php_completion_settings.json | PHP completion project/library preferences |
| pocket_editor_plugins/php_formatter_settings.json | PHP formatting preferences, when saved |
| pocket_editor_plugins/python_formatter_settings.json | Optional 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.
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_documentationThe 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.