Skip to content

Commit a19d034

Browse files
committed
Fix --- rendering and update commands
1 parent e7e3f26 commit a19d034

3 files changed

Lines changed: 23 additions & 3 deletions

File tree

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,17 @@ Built with Electron, React, TypeScript, and Vite.
6868
| ------------- | ---------------------------------------- |
6969
| `Cmd+Shift+C` | Toggle visibility (global, configurable) |
7070
| `Cmd+Shift+N` | New note (global, configurable) |
71+
| `Cmd+Shift+S` | Open settings panel |
72+
| `Cmd+N` | New note (in-app) |
7173
| `Cmd+K` | Main action menu |
7274
| `Cmd+P` | Search notes |
7375
| `Cmd+G` | Graph view |
7476
| `Cmd+H` | Highlight selected text |
77+
| `Cmd+E` | Export note |
7578
| `Cmd+Click` | Follow internal link |
79+
| `Cmd + / -` | Zoom in / out |
80+
| `Cmd + 0` | Reset zoom |
81+
| `Esc` | Close menus or modals |
7682

7783
---
7884

electron/main.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,15 @@ fs.writeFileSync(
4141
- **New Note**: \`Cmd + N\` from anywhere when app is running.
4242
- **Note Search**: \`Cmd + P\` to search across all your notes.
4343
- **Main Menu**: \`Cmd + K\` to open the action menu.
44+
- **Export Note**: \`Cmd + E\` to export the current note as markdown.
45+
- **Graph View**: \`Cmd + G\` to see how your notes connect.
46+
- **Highlight**: \`Cmd + H\` to highlight selected text.
4447
- **Cancel/Close**: Press \`Esc\` to exit modals.
4548
4649
## Global Shortcuts
4750
- **Toggle Visibility**: \`Cmd+Shift+C\` from anywhere on your OS to hide or show PaperCache.
48-
- **Global New Note**: \`Cmd+Shift+S\` (default \`Cmd+Shift+N\`) to spawn a new floating note anywhere.
51+
- **Global New Note**: \`Cmd+Shift+N\` to spawn a new floating note anywhere.
52+
- **Settings**: \`Cmd+Shift+S\` to open the settings panel.
4953
5054
*Example use:* Press \`Cmd+K\` right now, select "Settings", and set your global hotkey!
5155

src/App.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -523,13 +523,13 @@ const hideMarkdownPlugin = ViewPlugin.fromClass(
523523
to: end,
524524
deco: Decoration.replace({
525525
widget: new (class extends WidgetType {
526+
eq() { return true }
526527
toDOM() {
527528
const hr = document.createElement('hr')
528529
hr.className = 'cm-hr'
529530
return hr
530531
}
531-
})(),
532-
block: true,
532+
})()
533533
}),
534534
})
535535
}
@@ -876,6 +876,16 @@ function App() {
876876
window.electronAPI.saveNote(id, '')
877877
}
878878

879+
if (e.key === 'e' && (e.metaKey || e.ctrlKey)) {
880+
e.preventDefault()
881+
e.stopPropagation()
882+
const note = notesRef.current[currentNoteIndexRef.current]
883+
if (note) {
884+
const filename = note.id.replace(/\.md$/, '')
885+
window.electronAPI.exportNote(filename, note.content)
886+
}
887+
}
888+
879889
if (e.key === 'p' && (e.metaKey || e.ctrlKey)) {
880890
e.preventDefault()
881891
e.stopPropagation()

0 commit comments

Comments
 (0)