Commit graph

100 commits

Author SHA1 Message Date
Sebastian Gniazdowski
586fb6be17 Updated README.md 2016-10-15 14:46:44 +02:00
Sebastian Gniazdowski
60710d31b5 *highlighting: Optimization – remove *add-highlight function
parse.zsh -o, before changes:

Running time: 0.9516510000
num  calls                time                       self            name
-----------------------------------------------------------------------------------
 1)  350         945,28     2,70  100,00%    632,08     1,81   66,87%  -hsmw-highlight-process
 2) 3150          62,92     0,02    6,66%     62,92     0,02    6,66%  -hsmw-add-highlight
 3)  950          80,01     0,08    8,46%     58,97     0,06    6,24%  -hsmw-highlight-check-path
 4)  300          58,21     0,19    6,16%     57,09     0,19    6,04%  -hsmw-highlight-string
 5) 1950          43,18     0,02    4,57%     43,18     0,02    4,57%  -hsmw-highlight-expand-path
 6) 1000          36,50     0,04    3,86%     36,50     0,04    3,86%  -hsmw-highlight-main-type
 7) 1000          28,77     0,03    3,04%     28,77     0,03    3,04%  (anon)
 8) 3100          19,17     0,01    2,03%     19,17     0,01    2,03%  -hsmw-highlight-is-redirection

parse.zsh -o, after changes:

Running time: 0.8807530000
num  calls                time                       self            name
-----------------------------------------------------------------------------------
 1)  350         874,42     2,50  100,00%    630,15     1,80   72,06%  -hsmw-highlight-process
 2)  950          78,16     0,08    8,94%     57,66     0,06    6,59%  -hsmw-highlight-check-path
 3)  300          57,42     0,19    6,57%     57,42     0,19    6,57%  -hsmw-highlight-string
 4) 1950          41,83     0,02    4,78%     41,83     0,02    4,78%  -hsmw-highlight-expand-path
 5) 1000          33,57     0,03    3,84%     33,57     0,03    3,84%  -hsmw-highlight-main-type
 6) 1000          28,36     0,03    3,24%     28,36     0,03    3,24%  (anon)
 7) 3100          18,92     0,01    2,16%     18,92     0,01    2,16%  -hsmw-highlight-is-redirection
 8)  200           3,20     0,02    0,37%      3,20     0,02    0,37%  -hsmw-highlight-check-assign

( 1084 - 847 ) / 1084.0 = 0.2186
2016-10-15 14:40:02 +02:00
Sebastian Gniazdowski
8acdd8bd5b *highlight: Use $REPLY, don't create additional variables 2016-10-15 13:31:04 +02:00
Sebastian Gniazdowski
05cb4c6073 *highlight: 7ms opt: (#m) doesn't need match, mend, mbegin 2016-10-15 13:01:16 +02:00
Sebastian Gniazdowski
a051f6a6cb *highlight: Fix lack of (#m) flag (for $MATCH), result of regex->pattern 2016-10-15 12:53:02 +02:00
Sebastian Gniazdowski
6c9e1f83cc *highlight: Copyright note 2016-10-15 11:34:04 +02:00
Sebastian Gniazdowski
b4e3d994d4 *highlight: In-string paremeter indexing [...] allowed, highlighted 2016-10-15 11:29:53 +02:00
Sebastian Gniazdowski
8c33857c56 *highlighting: In-string ${(...)...} flags – two left characters # and % 2016-10-15 11:22:47 +02:00
Sebastian Gniazdowski
ecc4a34a7e *highlight: Allow in-string ${...} to contain flags like: (z@) 2016-10-15 11:20:32 +02:00
Sebastian Gniazdowski
9e8148083c hsmw: Make from regex to patterns conversion complete 2016-10-15 11:03:47 +02:00
Sebastian Gniazdowski
de167176a5 *highlight: Simpler region_highlight gathering function
parse.zsh, before change:

Running time: 1.0912980000
num  calls                time                       self            name
-----------------------------------------------------------------------------------
 1)  350        1084,72     3,10  100,00%    658,39     1,88   60,70%  -hsmw-highlight-process
 2) 3100         152,66     0,05   14,07%    152,66     0,05   14,07%  -hsmw-add-highlight
 3)  300          68,71     0,23    6,33%     68,71     0,23    6,33%  -hsmw-highlight-string
 4)  950          83,72     0,09    7,72%     62,34     0,07    5,75%  -hsmw-highlight-check-path
 5) 1950          43,76     0,02    4,03%     43,76     0,02    4,03%  -hsmw-highlight-expand-path
 6) 1000          36,57     0,04    3,37%     36,57     0,04    3,37%  -hsmw-highlight-main-type
 7) 1000          35,66     0,04    3,29%     35,66     0,04    3,29%  (anon)
 8) 3100          19,93     0,01    1,84%     19,93     0,01    1,84%  -hsmw-highlight-is-redirection

parse.zsh, after change:

Running time: 0.9645980000
num  calls                time                       self            name
-----------------------------------------------------------------------------------
 1)  350         958,25     2,74  100,00%    635,22     1,81   66,29%  -hsmw-highlight-process
 2)  300          67,91     0,23    7,09%     67,91     0,23    7,09%  -hsmw-highlight-string
 3) 3100          60,76     0,02    6,34%     60,76     0,02    6,34%  -hsmw-add-highlight
 4)  950          78,50     0,08    8,19%     57,73     0,06    6,02%  -hsmw-highlight-check-path
 5) 1950          42,46     0,02    4,43%     42,46     0,02    4,43%  -hsmw-highlight-expand-path
 6) 1000          34,58     0,03    3,61%     34,58     0,03    3,61%  (anon)
 7) 1000          34,06     0,03    3,55%     34,06     0,03    3,55%  -hsmw-highlight-main-type
 8) 3100          19,01     0,01    1,98%     19,01     0,01    1,98%  -hsmw-highlight-is-redirection
2016-10-15 10:28:06 +02:00
Sebastian Gniazdowski
3e296a3db9 *highlight: Remove long comments 2016-10-15 10:06:24 +02:00
Sebastian Gniazdowski
1bb5ebd43a parse.zsh: Use zprof 2016-10-15 09:56:08 +02:00
Sebastian Gniazdowski
8b79ecd6fc hsmw: autoload is-at-least 2016-10-15 09:36:08 +02:00
Sebastian Gniazdowski
8b6c59a086 parse.zsh: autoload is-at-least 2016-10-15 09:33:14 +02:00
Sebastian Gniazdowski
4e687eed48 parse.zsh: Line wise mode on own input 2016-10-15 09:06:52 +02:00
Sebastian Gniazdowski
ecbd667df0 test/parse.zsh 2016-10-15 08:52:21 +02:00
Sebastian Gniazdowski
5e4af0bb4b Updated README.md 2016-10-15 08:24:50 +02:00
Sebastian Gniazdowski
841bbcf54f Updated README.md 2016-10-13 08:46:09 +02:00
Sebastian Gniazdowski
c26fd37dbe Updated README.md 2016-10-12 17:46:55 +02:00
Sebastian Gniazdowski
07fab8d179 Updated README.md (asciinema) 2016-10-12 17:26:49 +02:00
Sebastian Gniazdowski
b2468b2d99 Updated README.md 2016-10-12 16:31:44 +02:00
Sebastian Gniazdowski
3dec932aa9 Updated README.md 2016-10-12 16:24:55 +02:00
Sebastian Gniazdowski
607dc2a73a Updated README.md (syntax highlighting customization) 2016-10-12 16:23:42 +02:00
Sebastian Gniazdowski
6df72f0890 Updated README.md (no manual installation, zstyles) and default Zstyles 2016-10-12 15:50:35 +02:00
Sebastian Gniazdowski
21384c6991 hsmw: Ability to disable syntax highlighting 2016-10-11 10:19:07 +02:00
Sebastian Gniazdowski
ab9d2fc162 hsmw: Default highlight color: bold yellow 2016-10-11 09:49:33 +02:00
Sebastian Gniazdowski
9253ad8b0d Updated README.md (NEWS) 2016-10-11 09:28:05 +02:00
Sebastian Gniazdowski
3e4c359bdd hsmw: Manually handle SIGINT 2016-10-11 09:07:43 +02:00
Sebastian Gniazdowski
e8e01e6258 hsmw: Bind Ctrl-A, Ctrl-E to original Zle widgets 2016-10-11 08:54:36 +02:00
Sebastian Gniazdowski
ca39f019ef *highlight: Fix style for path and path prefix – magenta is a color 2016-10-11 08:47:30 +02:00
Sebastian Gniazdowski
20da936ec1 *highlight: Remove $WIDGET reference 2016-10-11 08:36:36 +02:00
Sebastian Gniazdowski
8d43634e15 *highlight: Remove $BUFFER reference 2016-10-11 08:35:00 +02:00
Sebastian Gniazdowski
bb36f8068a *highlight: Remove $BUFFER reference 2016-10-11 08:32:58 +02:00
Sebastian Gniazdowski
7b109e615f *highlight: Remove $PREBUFFER reference 2016-10-11 08:30:01 +02:00
Sebastian Gniazdowski
4691732e6a *highlight: Color blue -> bold blue 2016-10-11 08:23:43 +02:00
Sebastian Gniazdowski
eee000e0c5 *highlight: Replace almost all regular expressions with patterns 2016-10-11 08:21:40 +02:00
Sebastian Gniazdowski
d6e300f757 Vim modeline for hsmw-highlighting 2016-10-11 08:04:04 +02:00
Sebastian Gniazdowski
1addd366b4 Correctly highlight history, i.e. each line separately 2016-10-11 08:02:15 +02:00
Sebastian Gniazdowski
df91d236b5 Syntax-highlight history, slight cleanup 2016-10-10 20:38:57 +02:00
Sebastian Gniazdowski
ef2fd4cdb5 Namespacing z-sy-h code ended 2016-10-09 09:52:50 +02:00
Sebastian Gniazdowski
0110eb24d9 Set of code simplifications (e.g. removal of *predicate), substitutions 2016-10-09 09:31:00 +02:00
Sebastian Gniazdowski
c80503faac No need of dash in -hsmw-highlight file name, it's not autoload function 2016-10-09 09:25:30 +02:00
Sebastian Gniazdowski
c585d3deb5 Immediate commit after obtaining first working highlighting 2016-10-09 09:24:03 +02:00
Sebastian Gniazdowski
208165d220 Initial commit if z-sy-h's main-highlighter 2016-10-09 09:06:50 +02:00
Sebastian Gniazdowski
faf7208387 Free memory when exiting widget (the array that holds history is freed) 2016-09-27 10:22:58 +02:00
Sebastian Gniazdowski
8347d80f08 Override ^R with hsmw so that regular i-search doesn't interfere 2016-09-25 10:34:11 +02:00
Sebastian Gniazdowski
8e04160835 Missing deinitialization of page up / page down widgets 2016-09-23 18:33:49 +02:00
Sebastian Gniazdowski
0b9e3fc153 All overloading widgets should call _hsmw_simulate_widget 2016-09-20 15:50:58 +02:00
Sebastian Gniazdowski
8e4866ceeb Updated README.md 2016-09-20 09:09:06 +02:00