diff --git a/src/tools/index.ts b/src/tools/index.ts index 65a16430..f134cebe 100644 --- a/src/tools/index.ts +++ b/src/tools/index.ts @@ -125,6 +125,7 @@ import { tool as jsonEscaper } from './json-escaper'; import { tool as jsonLinter } from './json-linter'; import { tool as markdownCheatsheet } from './markdown-cheatsheet'; import { tool as markdownEditor } from './markdown-editor'; +import { tool as nanoMemo } from './nano-memo'; import { tool as pdfSignatureChecker } from './pdf-signature-checker'; import { tool as numeronymGenerator } from './numeronym-generator'; import { tool as macAddressGenerator } from './mac-address-generator'; @@ -416,6 +417,13 @@ export const toolsByCategory: ToolCategory[] = [ fileType, ], }, + { + name: 'CheatSheets', + components: [ + gitMemo, + nanoMemo, + ], + }, { name: 'Network', components: [ diff --git a/src/tools/nano-memo/index.ts b/src/tools/nano-memo/index.ts new file mode 100644 index 00000000..c4960ff9 --- /dev/null +++ b/src/tools/nano-memo/index.ts @@ -0,0 +1,12 @@ +import { FileText } from '@vicons/tabler'; +import { defineTool } from '../tool'; + +export const tool = defineTool({ + name: 'Nano CheatSheet', + path: '/nano-memo', + description: 'Nano Editor Cheatsheet', + keywords: ['nano', 'memo', 'cheatsheet', 'sheet'], + component: () => import('./nano-memo.vue'), + icon: FileText, + createdAt: new Date('2024-04-20'), +}); diff --git a/src/tools/nano-memo/nano-memo.content.md b/src/tools/nano-memo/nano-memo.content.md new file mode 100644 index 00000000..9e6eccb0 --- /dev/null +++ b/src/tools/nano-memo/nano-memo.content.md @@ -0,0 +1,109 @@ +Overview of nano's shortcuts       +===================================== + +# The editor's keystrokes and their functions          + +## File handling** + +| Shortcut | Description | +|:--|:--| +| Ctrl+S | Save current file | +| Ctrl+O | Offer to write file ("Save as") | +| Ctrl+R | Insert a file into current one | +| Ctrl+X | Close buffer, exit from nano | + +## **Editing** + +| Shortcut | Description | +|:--|:--| +| Ctrl+K | Cut current line into cutbuffer | +| Alt+6 | Copy current line into cutbuffer | +| Ctrl+U | Paste contents of cutbuffer | +| Alt+T | Cut until end of buffer | +| Ctrl+\] | Complete current word | +| Alt+3 | Comment/uncomment line/region | +| Alt+U | Undo last action | +| Alt+E | Redo last undone action | + +## **Search and replace** + +| Shortcut | Description | +|:--|:--| +| Ctrl+Q | Start backward search | +| Ctrl+W | Start forward search | +| Alt+Q | Find next occurrence backward | +| Alt+W | Find next occurrence forward | +| Alt+R | Start a replacing session | + +## Deletion + +| Shortcut | Description | +|:--|:--| +| Ctrl+H | Delete character before cursor |       +| Ctrl+D | Delete character under cursor | +| Alt+Bsp | Delete word to the left | +| Ctrl+Del | Delete word to the right | +| Alt+Del | Delete current line | + +## Operations + +| Shortcut | Description | +|:--|:--| +| Ctrl+T | Execute some command | +| Ctrl+J | Justify paragraph or region | +| Alt+J | Justify entire buffer | +| Alt+B | Run a syntax check | +| Alt+F | Run a formatter/fixer/arranger | +| Alt+: | Start/stop recording of macro | +| Alt+; | Replay macro | + +## Moving around + +| Shortcut | Description | +|:--|:--| +| Ctrl+B | One character backward | +| Ctrl+F | One character forward | +| Ctrl+**←** | One word backward | +| Ctrl+**→** | One word forward | +| Ctrl+A | To start of line | +| Ctrl+E | To end of line | +| Ctrl+P | One line up | +| Ctrl+N | One line down | +| Ctrl+**↑** | To previous block | +| Ctrl+**↓** | To next block | +| Ctrl+Y | One page up | +| Ctrl+V | One page down | +| Alt+\\ | To top of buffer | +| Alt+/ | To end of buffer | + +## Special movement + +| Shortcut | Description | +|:--|:--| +| Alt+G | Go to specified line | +| Alt+\] | Go to complementary bracket | +| Alt+**↑** | Scroll viewport up | +| Alt+**↓** | Scroll viewport down | +| Alt+< | Switch to preceding buffer | +| Alt+> | Switch to succeeding buffer | + +## Information + +| Shortcut | Description | +|:--|:--| +| Ctrl+C | Report cursor position | +| Alt+D | Report line/word/character count | +| Ctrl+G | Display help text | + +## Various + +| Shortcut | Description | +|:--|:--| +| Alt+A | Turn the mark on/off | +| Tab | Indent marked region | +| Shift+Tab | Unindent marked region | +| Alt+V | Enter next keystroke verbatim | +| Alt+N | Turn line numbers on/off | +| Alt+P | Turn visible whitespace on/off | +| Alt+X | Hide or unhide the help lines | +| Ctrl+L | Refresh the screen | \ No newline at end of file diff --git a/src/tools/nano-memo/nano-memo.vue b/src/tools/nano-memo/nano-memo.vue new file mode 100644 index 00000000..db4711ea --- /dev/null +++ b/src/tools/nano-memo/nano-memo.vue @@ -0,0 +1,22 @@ + + + + +