100 Commits

Author SHA1 Message Date
Le Tan
586f5c0994 support custom doc type suffixes
Add markdown_suffix config.
2017-08-06 15:26:50 +08:00
Le Tan
60e65d1781 system-tray: support system tray icon 2017-07-25 21:41:32 +08:00
Le Tan
8a56dc8b87 support editing external files 2017-07-15 12:46:04 +08:00
Le Tan
cd2ac10509 vim-mode: refine command line mode
1. Support `/` and `?` to search. `N` and `Shift+N` to find next/previous
occurence.
2. `Ctrl+N` and `Ctrl+Shift+N` to navigate through the command history.
3. `:nohlsearch` or `<leader><space>` to clear search highlight.
4. `#` and `*` to search current word under cursor.
2017-07-13 18:26:38 +08:00
Le Tan
ba84489c68 support custom shortcuts 2017-07-11 09:13:32 +08:00
Le Tan
4374f2d8f1 editor: add line number and editor-line-number config 2017-07-07 17:21:15 +08:00
Le Tan
7fe89d816b refine inline functions in VConfigManager 2017-07-07 11:08:45 +08:00
Le Tan
c48d646a55 vim-mode: auto disable input method in non-Insert mode
Add config "enable_smart_im_in_vim_mode".
2017-07-02 13:59:07 +08:00
Le Tan
f911c60c79 support flowchart.js
VNote supports flowchart.js in all for renderers.
2017-07-01 10:19:47 +08:00
Le Tan
eeaeb0b567 enable font-size in editor section in MDHL file 2017-06-28 20:08:01 +08:00
Le Tan
707814909a refactor logics about adding notebook 2017-06-22 19:07:01 +08:00
Le Tan
a8c76d6742 support normal Vim mode
1. Support Insert/Normal/Visual/VisualLine modes:
    - `V`, `v`, `I`, `i`, `A`, `a`, `s`, `Esc`, `Ctrl+[`, `o`, `O`;
2. Support movement commands (with Repeat support):
    - `h`, `j`, `k`, `l`, `gj`, `gk`;
    - `gg`, `G`;
    - `^`, `0`, `$`;
    - `Ctrl+U`, `Ctrl+D`, `PageUp`, `PageDown`, `Ctrl+B`;
2017-06-11 16:31:25 +08:00
Le Tan
5b150a3634 handle HTML comment correctly 2017-06-01 22:05:02 +08:00
Le Tan
73530355fd support highlighting trailing space 2017-05-25 19:52:10 +08:00
Le Tan
9bf3f9394f support custom image folder for both global scope and notebook scope 2017-05-24 19:54:58 +08:00
Le Tan
f43f9c4afc add Showdown renderer 2017-05-18 21:40:02 +08:00
Le Tan
5bb692bcc5 support centering the images and insert the alt text as caption
Add config enable_image_caption.
2017-05-17 21:03:42 +08:00
Le Tan
a154e568de constrain the width of images in read mode 2017-05-10 19:36:07 +08:00
Le Tan
db9903b906 support log file in release mode 2017-05-07 10:58:01 +08:00
Le Tan
2bdf388c7b constrain the width of previewed images to the eidt window's width 2017-05-06 19:13:58 +08:00
Le Tan
a8614839d9 refactor image preview logics by adding VImagePreviewer
1. Support previewing non-relative local images;
2. Support previewing network images;
2017-05-06 12:25:18 +08:00
Le Tan
d0e43db5ad more user friendly messages 2017-05-03 21:39:18 +08:00
Le Tan
2a29456f45 use _vnote.json instead of .vnote.json as the directory config file 2017-04-25 22:55:59 +08:00
Le Tan
d9185d3352 support custom editor style by mdhl files 2017-04-22 17:45:43 +08:00
Le Tan
d0d4e1443d support custom CSS styles
VNote will find CSS files in the "styles" folder under the config folder.
2017-04-22 15:39:12 +08:00
Le Tan
44257913f7 support code block syntax highlihgt in edit mode
In edit mode, highlight code blocks via parsing the result of HighlightJS.
We only highlight fenced code blocks by token-matching.

Support custom style in MDHL file.
2017-04-19 15:08:26 +08:00
Le Tan
b0d3e42647 refine edit mode
1. Support "Ctrl+Alt+<N>" to insert title in Markdown;
2. Support Auto Indent;
3. Support Auto List;
2017-04-04 13:21:51 +08:00
Le Tan
c48fbe16da refine editor style
1. Support editor-current-line and editor-selection style in MDHL;
2. Support vim-background in editor-current-line;
2017-03-31 20:44:30 +08:00
Le Tan
1f845d5ba8 add config setting for Web zoom factor 2017-03-30 20:00:27 +08:00
Le Tan
97dd8c43cc add config web_zoom_factor in vnote.ini
When it is set to -1, VNote will calculate the zoom factor according to
DPI.
This fix is for the hidpi issue on Windows. It is not widely tested on macOS.
2017-03-28 23:15:58 +08:00
Le Tan
a9b34955ee support MathJax
Work well with Hoedown and Markdown-it.
2017-03-23 20:57:31 +08:00
Le Tan
7c7db3fbb8 release v1.1 2017-03-22 21:58:08 +08:00
Le Tan
bed6a0d234 support mermaid diagram 2017-03-22 14:18:00 +08:00
Le Tan
7a51ee5b3d add Markdown renderer markdown-it 2017-03-21 15:43:54 +08:00
Le Tan
d47dd92f59 refine markdown render logics
Add common templates markdown_template.html and
markdown_template.js.

Hoedow provides hoedown.js.
Marked provides marked.js.
2017-03-20 20:45:17 +08:00
Le Tan
b0f7add1bb add editor_font_size in vnote.ini
Change default editor font size to 12.
2017-03-17 21:54:16 -07:00
Le Tan
c83fcf6ce9 add settings dialog and language setting
Add VSettingsDialog to show a settings dialog.
For now, VNote supports setting of language.
Add imcomplete Chinese support.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-02-26 17:13:52 +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
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
768c1632b0 save and restore the sate of the main splitter
Add a config "main_splitter_state" to store the state of the main
splitter.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-02 10:00:59 +08:00
Le Tan
3b442f55a9 highlight curren cursor line
Add configuration "highlight_cursor_line" in vnote.ini.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-25 20:31:59 +08:00
Le Tan
b0ec4c312a support import existing notebook
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-10 15:41:46 +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
3ae3462597 save/restore window state and geometry
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-20 11:12:15 +08:00
Le Tan
53bce98db6 support changing rendering background color
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-28 21:06:26 +08:00
Le Tan
0c3fc3b006 support changing background color of editor
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-27 22:41:41 +08:00
Le Tan
8960358feb expand tab to spaces
Add configuration "tab_stop_width" and "is_expand_tab". Expand tab to
tab_stop_width spaces if is_expand_tab is true.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-27 10:23:38 +08:00
Le Tan
b85bf8bdc7 add menus and toolbars
1. Add menu item "Converter" to choose markdown converter;
2. Add menu item "About" and "About Qt";
3. Change all QMessageBox's parent to "this";

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-23 13:12:32 +08:00
Le Tan
a983026552 add Hoedown for markdown convertion
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-23 10:35:31 +08:00
Le Tan
5fa07864a1 move source stuff into src subdir
Make it convenient to add third-party libraries.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-22 14:11:33 +08:00