42 Commits
Author SHA1 Message Date
shuchenliu 9f9d8a66a1 Add auto-complete support for Guillemets 2018-05-02 18:36:50 -07:00
Tzu-ping Chung 87f7755e9e Check for underflow when applying selection change
Fix #546
2016-02-27 13:13:09 +08:00
Tzu-ping Chung 565e6384c7 Process the corrent input on pattern-toggling
Fix #475. I am an idiot.
2015-11-07 16:54:36 +08:00
Tzu-ping Chung b102bcdc12 Also process empty lines in block syntax toggle
Make behaviour consistent with 61e4a73, 4d98888 and 8291dd4.
2015-08-15 13:05:28 +08:00
Tzu-ping Chung 8291dd4ec6 Insert blockquote prefix for blank lines too
Similar logic to blank-line indentation. See 61e4a73 and 4d98888.

Fix #383.

Side effect: This patch also make list item insertion work with
empty lines - a backward-incompatible behaviAoural change. But this
seems to be what people want, so let's roll with it for now. We can
always change this later if reports appear.
2015-07-26 22:42:48 +08:00
Tzu-ping Chung 4d988889a9 Remove redundant indentation on last line
Previously, if the selection includes the trailing newline, the line
*after* the selection will be indented, which is not correct.

Introduced in 61e4a73.
2015-07-26 22:39:38 +08:00
Tzu-ping Chung 61e4a736d5 Always indent line on cmd-tab
Extra boundary checks added to take care of empty line situations.
Fix #402.
2015-07-26 21:57:32 +08:00
Tzu-ping Chung 3fce265a90 Unindent size should be 4, like indentation
Fix #347
2015-05-04 17:49:59 +08:00
Tzu-ping Chung c785d67f62 Generalize treats 2015-02-15 01:20:32 +08:00
Tzu-ping Chung 0ffb239988 Allow completion even if a matching char follows
This seems to match what normal editor does, and "corrects" the
strange behaviour of not completing the second closing character
if you input them consecutively (e.g. the inner pair of `{{}}`)
2014-11-09 18:24:33 +08:00
Tzu-ping Chung 874f9f7d47 Ignore IM-generated ASCII characters 2014-10-18 18:14:14 +08:00
Tzu-ping Chung 9f73636241 Fix matching deletion 2014-10-09 17:33:54 +08:00
Tzu-ping Chung 69862df55f Fix undo support for programmatic text replacement 2014-10-03 10:51:16 +08:00
Tzu-ping Chung cdd1be0f8a Fix whitespaces calculation logic for deletion
Fix #176
2014-10-03 10:44:33 +08:00
Tzu-ping Chung 2731ecc42e Make deleting methods self-contained
This makes them true to their names, instead of rely on and need to
be used with built-in deletion.
2014-10-03 10:41:45 +08:00
Tommy Goode ca57a2bfa8 Add preference toggle for auto-incrementing numbered lists 2014-09-18 12:25:15 -05:00
Tzu-ping Chung daa5bd7c7f Prevent conflicts with built-in quote substution
Extend matching criteria to both whitespaces and punctuations (which
matches criteria of built-in substution), and prevent built-in
substitution from happening while mimicking the same behaviour.

Fix #152.
2014-09-07 23:14:57 +08:00
Tzu-ping Chung d48f15c7cf Fix regression: list items don't autocomplete
Fix #109
2014-08-06 18:34:40 +08:00
Tzu-ping Chung d97a6807e5 Fix trailing whitespace on list item clearance 2014-08-04 10:36:15 +08:00
Tzu-ping Chung a5c57bcdea Fix list item autocomplete indentation generation
Fix #87
2014-07-28 14:46:30 +08:00
Tzu-ping Chung 2e23a49837 Implement auto indentation from previous line 2014-07-28 00:31:47 +08:00
Tzu-ping Chung a22f836b31 Allow empty blockquote lines 2014-07-12 00:34:43 +08:00
Tzu-ping Chung 35c18f5c0a Implement blockquote completion
Fix #55
2014-07-11 17:41:25 +08:00
Tzu-ping Chung 16a847c25d Make -completeNextListItem fall thru on non-match 2014-07-11 16:11:23 +08:00
Tzu-ping Chung 83426bca23 Rename -completeNextLine to -completeNextListItem 2014-07-11 16:10:09 +08:00
Tzu-ping Chung 6d58deba39 Group resources together 2014-07-02 03:05:52 +08:00
Tzu-ping Chung 60eb55f11f Add shortcuts to convert line(s) to headers
Also introduce an extra one converting header back to paragraphs.
The last one is assigned with shortcut cmd-0. The "reset split"
menu item, which was assigned to cmd-0, is now changed to use
cmd-opt-0.

Fix #6.
2014-06-27 17:32:10 +08:00
Tzu-ping Chung a0807d95e1 Allow unmatched completion if preceded by non-delimiter 2014-06-20 16:26:26 +08:00
Tzu-ping Chung 0b7191febe Fix overdone autocompletion 2014-06-20 16:19:55 +08:00
Tzu-ping Chung 3d710329f4 Narrow autocomplete logic on matching characters 2014-06-19 18:05:09 +08:00
Tzu-ping Chung d036c8e40a Fix matching char deleting doesn’t trigger updates 2014-06-19 17:57:15 +08:00
Tzu-ping Chung 5570e5390e Simplify post-indent selection range logic 2014-06-17 23:18:14 +08:00
Tzu-ping Chung 3580f2cddb Implement UL and blockquote toggle 2014-06-17 23:15:52 +08:00
Tzu-ping Chung a749d50c9d Make regex pattern a global constant 2014-06-17 16:24:23 +08:00
Tzu-ping Chung 97d41f6193 Implement right/left shift 2014-06-17 15:32:06 +08:00
Tzu-ping Chung 08faf84139 Allow multiple spaces after list marker 2014-06-17 08:22:25 +08:00
Tzu-ping Chung 3c8f1e1978 Fix another crashing from typo 2014-06-16 22:13:49 +08:00
Tzu-ping Chung c4ac167665 Fix list continuation logic 2014-06-16 17:04:45 +08:00
Tzu-ping Chung e2fe11351e Add link and image insertion shortcut 2014-06-16 16:20:30 +08:00
Tzu-ping Chung 9fdf6d2f4f Try to intelligently accept list marks in newline 2014-06-16 16:03:48 +08:00
Tzu-ping Chung b6c798a293 Add rangeOfLinesInRange and tests 2014-06-16 15:45:36 +08:00
Tzu-ping Chung 60f5d02b3d Restructure project 2014-06-13 13:58:32 +08:00