Skip to content

Commit 1db1d38

Browse files
committed
Merge branch 'feat/nano-memo' into chore/all-my-stuffs
# Conflicts: # components.d.ts # src/tools/index.ts
2 parents 6cb0019 + fb343ea commit 1db1d38

File tree

4 files changed

+151
-0
lines changed

4 files changed

+151
-0
lines changed

src/tools/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ import { tool as jsonEscaper } from './json-escaper';
125125
import { tool as jsonLinter } from './json-linter';
126126
import { tool as markdownCheatsheet } from './markdown-cheatsheet';
127127
import { tool as markdownEditor } from './markdown-editor';
128+
import { tool as nanoMemo } from './nano-memo';
128129
import { tool as pdfSignatureChecker } from './pdf-signature-checker';
129130
import { tool as numeronymGenerator } from './numeronym-generator';
130131
import { tool as macAddressGenerator } from './mac-address-generator';
@@ -416,6 +417,13 @@ export const toolsByCategory: ToolCategory[] = [
416417
fileType,
417418
],
418419
},
420+
{
421+
name: 'CheatSheets',
422+
components: [
423+
gitMemo,
424+
nanoMemo,
425+
],
426+
},
419427
{
420428
name: 'Network',
421429
components: [

src/tools/nano-memo/index.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { FileText } from '@vicons/tabler';
2+
import { defineTool } from '../tool';
3+
4+
export const tool = defineTool({
5+
name: 'Nano CheatSheet',
6+
path: '/nano-memo',
7+
description: 'Nano Editor Cheatsheet',
8+
keywords: ['nano', 'memo', 'cheatsheet', 'sheet'],
9+
component: () => import('./nano-memo.vue'),
10+
icon: FileText,
11+
createdAt: new Date('2024-04-20'),
12+
});
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
Overview of nano's shortcuts      
2+
=====================================
3+
4+
# The editor's keystrokes and their functions         
5+
6+
## File handling**
7+
8+
| Shortcut | Description |
9+
|:--|:--|
10+
| Ctrl+S | Save current file |
11+
| Ctrl+O | Offer to write file ("Save as") |
12+
| Ctrl+R | Insert a file into current one |
13+
| Ctrl+X | Close buffer, exit from nano |
14+
15+
## **Editing**
16+
17+
| Shortcut | Description |
18+
|:--|:--|
19+
| Ctrl+K | Cut current line into cutbuffer |
20+
| Alt+6 | Copy current line into cutbuffer |
21+
| Ctrl+U | Paste contents of cutbuffer |
22+
| Alt+T | Cut until end of buffer |
23+
| Ctrl+\] | Complete current word |
24+
| Alt+3 | Comment/uncomment line/region |
25+
| Alt+U | Undo last action |
26+
| Alt+E | Redo last undone action |
27+
28+
## **Search and replace**
29+
30+
| Shortcut | Description |
31+
|:--|:--|
32+
| Ctrl+Q | Start backward search |
33+
| Ctrl+W | Start forward search |
34+
| Alt+Q | Find next occurrence backward |
35+
| Alt+W | Find next occurrence forward |
36+
| Alt+R | Start a replacing session |
37+
38+
## Deletion
39+
40+
| Shortcut | Description |
41+
|:--|:--|
42+
| Ctrl+H | Delete character before cursor |      
43+
| Ctrl+D | Delete character under cursor |
44+
| Alt+Bsp | Delete word to the left |
45+
| Ctrl+Del | Delete word to the right |
46+
| Alt+Del | Delete current line |
47+
48+
## Operations
49+
50+
| Shortcut | Description |
51+
|:--|:--|
52+
| Ctrl+T | Execute some command |
53+
| Ctrl+J | Justify paragraph or region |
54+
| Alt+J | Justify entire buffer |
55+
| Alt+B | Run a syntax check |
56+
| Alt+F | Run a formatter/fixer/arranger |
57+
| Alt+: | Start/stop recording of macro |
58+
| Alt+; | Replay macro |
59+
60+
## Moving around
61+
62+
| Shortcut | Description |
63+
|:--|:--|
64+
| Ctrl+B | One character backward |
65+
| Ctrl+F | One character forward |
66+
| Ctrl+**** | One word backward |
67+
| Ctrl+**** | One word forward |
68+
| Ctrl+A | To start of line |
69+
| Ctrl+E | To end of line |
70+
| Ctrl+P | One line up |
71+
| Ctrl+N | One line down |
72+
| Ctrl+**** | To previous block |
73+
| Ctrl+**** | To next block |
74+
| Ctrl+Y | One page up |
75+
| Ctrl+V | One page down |
76+
| Alt+\\ | To top of buffer |
77+
| Alt+/ | To end of buffer |
78+
79+
## Special movement
80+
81+
| Shortcut | Description |
82+
|:--|:--|
83+
| Alt+G | Go to specified line |
84+
| Alt+\] | Go to complementary bracket |
85+
| Alt+**** | Scroll viewport up |
86+
| Alt+**** | Scroll viewport down |
87+
| Alt+< | Switch to preceding buffer |
88+
| Alt+> | Switch to succeeding buffer |
89+
90+
## Information
91+
92+
| Shortcut | Description |
93+
|:--|:--|
94+
| Ctrl+C | Report cursor position |
95+
| Alt+D | Report line/word/character count |
96+
| Ctrl+G | Display help text |
97+
98+
## Various
99+
100+
| Shortcut | Description |
101+
|:--|:--|
102+
| Alt+A | Turn the mark on/off |
103+
| Tab | Indent marked region |
104+
| Shift+Tab | Unindent marked region |
105+
| Alt+V | Enter next keystroke verbatim |
106+
| Alt+N | Turn line numbers on/off |
107+
| Alt+P | Turn visible whitespace on/off |
108+
| Alt+X | Hide or unhide the help lines |
109+
| Ctrl+L | Refresh the screen |

src/tools/nano-memo/nano-memo.vue

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<script setup lang="ts">
2+
import { useThemeVars } from 'naive-ui';
3+
import Memo from './nano-memo.content.md';
4+
5+
const themeVars = useThemeVars();
6+
</script>
7+
8+
<template>
9+
<div>
10+
<Memo />
11+
</div>
12+
</template>
13+
14+
<style lang="less" scoped>
15+
::v-deep(pre) {
16+
margin: 0;
17+
padding: 15px 22px;
18+
background-color: v-bind('themeVars.cardColor');
19+
border-radius: 4px;
20+
overflow: auto;
21+
}
22+
</style>

0 commit comments

Comments
 (0)