40 Commits

Author SHA1 Message Date
Le Tan
0a91037f71 Num keys in Captain mode to switch to given edit tab
1. Num keys 1 - 9 will activate the specified sequence edit tab;
2. Num key 0 will alternate between the current and last tab;
2017-04-04 13:21:51 +08:00
Le Tan
e1c09a83ec add sequence to edit tab 2017-04-04 13:21:51 +08:00
Le Tan
584472f902 fix tab order and TOC level in edit mode
1. Fix tab order of left and right corner widgets;
2. Insert [EMPTY] header when header level is not continuous in edit mode.
2017-04-04 13:21:51 +08:00
Le Tan
3406eab29c Captain mode 2017-03-27 19:44:23 +08:00
Le Tan
aee1b9d571 bugfix: use QTabBar.mapToGlobal() in tabbarContextMenuRequested 2017-03-17 21:14:54 -07:00
Le Tan
94ad4adc1c fix tabbar of the edit area in macOS
1. revert a3b83b7f81192bdbeabb1ba8a7eed57beb4 to avoid flashing;
2. Explicitly specify usesScrollButtons in VEditWindow;
2017-03-17 21:07:29 -07:00
Le Tan
238983ed0d refine all messages 2017-02-27 22:30:35 +08:00
Le Tan
fb1a172acf propagate key press event from QWebEngineView to VDocument
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-21 09:42:48 +08:00
Le Tan
901c477705 utilize ExtraSelection for special highlighting
1. Highlight current line;
2. Highlight selected word;
3. Highlight searched word;

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-12 21:00:06 +08:00
Le Tan
7ed92ed7eb fix bug in VEditWindow
Bug: when we press the scroll button to the end and click the first/last
tab, it won't set current tab correctly.

We should not change anything related to current index in handling
tabbarClicked().

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-09 23:01:12 +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
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
58c8506855 use different color of the corner icon in current window
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-24 15:52:05 +08:00
Le Tan
16858d7474 support moving tabs between windows
Add two menu item on the tab's context menu to move one split
left/right.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-24 15:02:14 +08:00
Le Tan
1aa264adc8 support locating current note
Support locating the notebook and directory of current note.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-24 13:09:19 +08:00
Le Tan
b14d15e266 add icon to indicate the read/edit mode of tab
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-24 09:32:56 +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
8b26e4424d use bold to identify current tab in corner widget
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-08 23:17:45 +08:00
Le Tan
9413ef875b modify stylesheet
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-08 22:42:34 +08:00
Le Tan
a3b83b7f81 dynamically show or hide left corner tab list widget
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-07 22:53:02 +08:00
Le Tan
6c72267788 add padding to QTreeWidgetItem and QListWidgetItem
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-07 22:01:58 +08:00
Le Tan
9a197b5087 refactor: add VNotebookSelector for notebook management
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-04 22:26:48 +08:00
Le Tan
02d5300821 support copy and paste directory
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-03 11:42:11 +08:00
Le Tan
787d54c808 update tab list menu dynamically when menu show up
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-30 23:38:29 +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
8e8d69c85f refactor: VNote and VNotebook
regression: notebook renaming logics does not work for now

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-26 12:45:29 +08:00
Le Tan
3722e6cb71 close all files before closing app
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-21 22:07:01 +08:00
Le Tan
85d9456f02 support copy and paste notes
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-18 22:25:14 +08:00
Le Tan
4fcdba7a11 display star in tab if modified
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-16 22:29:46 +08:00
Le Tan
a6c2416cc8 add note info button in tool bar
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-15 14:48:16 +08:00
Le Tan
62c75427e7 complete rename logics
1. Handle directory rename correctly;
2. Handle file rename correctly;

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-14 22:40:38 +08:00
Le Tan
5e97ca8060 display current file in window title
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-13 16:15:13 +08:00
Le Tan
dcc7e6a0f7 add vnote.qss for style sheet
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-13 08:05:43 +08:00
Le Tan
454072c9ba update current header in outline correctly
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-09 21:41:57 +08:00
Le Tan
849fdf05bd support synchronization between preview page and outline
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-08 23:21:22 +08:00
Le Tan
ab91f755c0 add dock widget to display outline
1. Support displaying outline of Markdown in read mode;
2. Support navigating by outline using Marked;

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-07 21:53:33 +08:00
Le Tan
db0797a538 add left corner widget to VEditWindow to display a list of tab
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-06 15:36:30 +08:00
Le Tan
29a41e8285 change VEditor to VEditTab
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-06 14:12:09 +08:00
Le Tan
d8aa464653 add removeSplitAct to context menu of VEditWindow
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-06 13:34:00 +08:00
Le Tan
915c25e1a5 support spliting edit windows
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-06 13:03:16 +08:00