Skip to content

Commit 68d8789

Browse files
docs: add command palette documentation (#777)
* docs: add command palette documentation * docs(command-palette): add image and script setup to command palette documentation * docs: refine command palette readme placement * docs(command-palette): update HTTP environment and import images
1 parent 4441228 commit 68d8789

7 files changed

Lines changed: 99 additions & 1 deletion

File tree

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,15 @@ Built-in utilities for the small tasks that usually send you to a browser tab:
131131
- **Encoders:** URL, Base64, JSON to TOML/XML/YAML, Color Converter
132132
- **Generators:** JSON Generator, Lorem Ipsum
133133

134+
### Command Palette
135+
136+
Jump to spaces, snippets, notes, HTTP requests, and common actions from anywhere with a keyboard-first command palette.
137+
138+
- Open with <kbd>Cmd+P</kbd> on macOS or <kbd>Ctrl+P</kbd> on Windows and Linux
139+
- Search across snippets, notes, HTTP requests, spaces, and commands
140+
- Run create actions for snippets, notes, HTTP requests, and folders
141+
- Scope search to a space with `@` or open command mode with `>`
142+
134143
## Markdown Vault
135144

136145
Your snippets, notes, and HTTP requests live as plain `.md` files on disk with frontmatter metadata, so the data stays readable and portable.

docs/website/.vitepress/config.mts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ export default defineConfig({
9999
text: 'General',
100100
items: [
101101
{ text: 'Overview', link: '/documentation/' },
102+
{ text: 'Command Palette', link: '/documentation/command-palette' },
102103
{ text: 'Storage', link: '/documentation/storage' },
103104
{ text: 'Sync', link: '/documentation/sync' },
104105
{ text: 'Themes', link: '/documentation/themes' },
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
title: Command Palette
3+
description: "Use the massCode Command Palette to jump between spaces, find snippets, notes, and HTTP requests, run commands, and create new items from anywhere."
4+
---
5+
6+
# Command Palette
7+
8+
<AppVersion text=">=5.4" />
9+
10+
The Command Palette gives you a keyboard-first way to move around massCode without reaching for the Space rail or sidebars. Use it to jump to spaces, open snippets, notes, and HTTP requests, run common actions, and create new items from any space.
11+
12+
Open it with <kbd>Cmd+P</kbd> on macOS or <kbd>Ctrl+P</kbd> on Windows and Linux.
13+
14+
<img :src="withBase('/command-palette.png')">
15+
16+
## What You Can Find
17+
18+
The palette searches by title across searchable content:
19+
20+
- snippets in Code
21+
- notes in Notes
22+
- HTTP requests in HTTP
23+
- spaces
24+
- commands
25+
- recently opened items
26+
27+
Search results are ranked with your recent usage, so items you open often move higher over time.
28+
29+
## Run Commands
30+
31+
Commands create new content or open app-level actions without switching spaces first.
32+
33+
Examples:
34+
35+
- create a new snippet
36+
- create a new note
37+
- create a new HTTP request
38+
- create folders in Code, Notes, or HTTP
39+
- open Preferences
40+
41+
Press <kbd>Cmd+Shift+P</kbd> on macOS or <kbd>Ctrl+Shift+P</kbd> on Windows and Linux to open the palette directly in command mode. You can also type `>` after opening the palette.
42+
43+
## Search Commands
44+
45+
Use command mode when you want to run an action instead of opening existing content.
46+
47+
1. Open the palette.
48+
2. Type `>`.
49+
3. Type the command name, such as `new snippet`, `new note`, or `preferences`.
50+
4. Press <kbd>Enter</kbd> to run the selected command.
51+
52+
Press <kbd>Esc</kbd> to leave command mode and return to the full palette.
53+
54+
## Search In A Space
55+
56+
Use space mode when you want to search only one part of massCode.
57+
58+
1. Open the palette.
59+
2. Type `@`.
60+
3. Select a space, such as **Code**, **Notes**, or **HTTP**.
61+
4. Type your search query.
62+
63+
You can also type the scope directly, for example `@code auth` or `@notes release`.
64+
65+
Press <kbd>Esc</kbd> to leave the active scope and return to the full palette.
66+
67+
## Create From Search
68+
69+
If a search has no exact match, the palette can create a new item from the query.
70+
71+
- Create a snippet in Code Inbox.
72+
- Create a note in Notes Inbox.
73+
- Create an HTTP request in HTTP Inbox.
74+
- Create an HTTP request from a URL.
75+
76+
When create fallbacks are shown, press <kbd>Shift+Enter</kbd> to run the first create action.
77+
78+
## Actions Panel
79+
80+
Open the actions panel for the selected result with <kbd>Right Arrow</kbd> or <kbd>Cmd+K</kbd> on macOS and <kbd>Ctrl+K</kbd> on Windows and Linux.
81+
82+
Actions depend on the selected result. For example, you can copy a title, copy snippet content, copy an HTTP request URL, or run the selected command.
83+
84+
Use <kbd>Left Arrow</kbd> or <kbd>Esc</kbd> to close the actions panel.
85+
86+
<script setup>
87+
import { withBase } from 'vitepress'
88+
</script>

docs/website/documentation/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: "Explore the massCode documentation for code snippets, markdown not
77

88
massCode is a free and open source developer workspace for code snippets, markdown notes, HTTP requests, calculations, and quick developer utilities. Instead of scattering everyday work across an editor, a notes app, an HTTP client, a calculator, and a handful of websites, you keep it in focused Spaces inside one local-first desktop app.
99

10-
Switch between Spaces using the rail on the left side of the app.
10+
Switch between Spaces using the rail on the left side of the app, or use the [Command Palette](/documentation/command-palette) to jump to spaces, content, and actions from the keyboard.
1111

1212
<img :src="withBase('/preview.png')">
1313

47.8 KB
Loading

docs/website/public/http-envs.png

-3.19 KB
Loading
-540 Bytes
Loading

0 commit comments

Comments
 (0)