23 Commits

Author SHA1 Message Date
Le Tan
844b644972 eliminate the compiler warning on Linux 2017-03-17 21:04:51 +08:00
Le Tan
38b18af4ab refine Chinese translations 2017-03-04 13:49:22 +08:00
Le Tan
238983ed0d refine all messages 2017-02-27 22:30:35 +08:00
Le Tan
46988f5bef refine editing shortcuts
1. Ctrl+[ behaves exactly like ESC;
2. Ctrl+W should delete the selected text if there has one.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-19 23:48:00 +08:00
Le Tan
336d9ad109 add shortcut Ctrl+O to insert backquotes
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-19 23:47:01 +08:00
Le Tan
f533dd6f95 bugfix: QUrl adds extra %0A to the copied url
Let the base class handle inserting urls.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-19 23:46:01 +08:00
Le Tan
59611872d4 use "image" as the default image title
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-14 09:26:48 +08:00
Le Tan
3005d9bf5c implement Find/Replace logics
Supports Find/Replace in both edit and preview modes.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-08 21:09:00 +08:00
Le Tan
eaab820d8b add find and replace dialog
Logic is not implemented yet.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-01 14:43:28 +08:00
Le Tan
059e8dacd2 change cursorline color in Vim mode
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-29 22:23:20 +08:00
Le Tan
c44928e1d8 remove Ctrl+Alt Vim mode
1. Remove Ctrl+ALT Vim mode. Now Ctrl+D will enter the Vim mode
tempararily and only expires after NOT hitting commands for a while;
2. Add d and dd to delete text. 'd2j' is not supported;
3. x will cut the selected text.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-27 09:59:26 +08:00
Le Tan
76bd2c7d64 support more Vim key bindings
1. Esc or Ctrl + [ to clear selection or exit Vim mode;
2. v to enter visual mode;
3. y to copy selected text; "y2j" is not supported yet;

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-25 11:24:49 +08:00
Le Tan
52af2ef9e9 add more Vim mode key bindings
1. x, w, e, b;
2. gg, G;
2. 0, $, ^;

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-22 22:33:16 +08:00
Le Tan
9d975c4bdb Refine Ctrl+B and Ctrl+I
If there are ** or * after current cursor, just skip them or it when
hitting Ctrl+B or Ctrl+I.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-21 21:39:09 +08:00
Le Tan
26016dd44a support Vim mode key bindings
After hitting `Ctrl+D` or keeping pressing `Ctrl+Alt`, VNote will enter Vim
normal pending mode.

1. Support <num>h,j,k,l to move cursor around;

TODO: Design a finite state machine to handle more Vim commands
elegantly.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-20 22:23:41 +08:00
Le Tan
d2f61bc605 add shortcuts
1. `Ctrl + W`, `Ctrl + R`, `Ctrl + Q`, `Ctrl + S` for edit and view mode;
2. `Ctrl + E` to toggle expand view;
3. `Ctrl + N` to create note in current directory;
4. `Ctrl + H` in edit mode to delete previous char;
5. `Ctrl + W` in edit mode to delete till the start of previous word;
6. `Ctrl + U` in edit mode to delete till the start of current line;
7. `Tab`, `Shift + Tab` to indent or unindent selected lines;
8. `Ctrl + B`, `Ctrl + I` to make selected text bold or italic;

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-18 22:26:01 +08:00
Le Tan
5ff46d6237 implement insert image menu action
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-12 23:14:53 +08:00
Le Tan
a884991150 refactor: add VMdEdit to inherit VEdit for markdown edit
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-11 14:42:01 +08:00
Le Tan
e7c42ba5be refactor: add VFile and VDirectory
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-30 22:58:00 +08:00
Le Tan
ac2552603b clear unused images when finishing editing markdown
1. Clear existing images deleted by this edit;
2. Clear newly inserted images which were deleted before saving the
file;

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-20 21:48:07 +08:00
Le Tan
00982eaacc fix images inserting when images folder does not exist
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-16 21:54:52 +08:00
Le Tan
435d47bb74 support downloading image from URL
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-01 22:58:19 +08:00
Le Tan
047c26b598 support pasting image in markdown
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-31 22:43:59 +08:00