vladislav doster
458e75c16d
style: format zsh and markdown to zinit convention ( #8 )
...
* style: format zsh & markdown files and update copyright notice
Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
2022-07-01 10:41:59 -05:00
Sebastian Gniazdowski
f99f954fe4
Add support for […] patterns.
2020-07-14 21:11:54 +02:00
Sebastian Gniazdowski
5c884b6d2c
hsmw: Reorganize zle calls
2020-03-06 07:20:32 +01:00
Sebastian Gniazdowski
9460dff3d2
hsmw: Trigger syntax-highlighting after selecting
2020-01-17 05:09:14 +01:00
Sebastian Gniazdowski
ee864ea9a5
hsmw: Test for line-pre-redraw first
...
Issue #20
2020-01-15 02:59:14 +01:00
Sebastian Gniazdowski
cb3755a089
hsmw: Block zle-line-pre-redraw to achieve Powerlevel10k compatibility
2020-01-14 02:28:12 +01:00
Sebastian Gniazdowski
3af4990b9b
hsmw: Add comment
2020-01-14 02:27:43 +01:00
Sebastian Gniazdowski
6efbcce604
hsmw: ^ (if first) matches beginning of the string, $ (if last), the end
2019-10-28 14:21:45 +01:00
Sebastian Gniazdowski
ab2cb3444b
*ctx*: Correct handling of the list boundaries
2019-07-07 10:53:28 +02:00
Sebastian Gniazdowski
159aaa5e72
Update for pre-redraw hook enabled Fast-Syntax-Highlighting
2018-10-09 12:54:48 +02:00
Sebastian Gniazdowski
9745d3d67a
hsmw: reset-prompt-protect zstyle – allow users to run zle reset-prompt
...
Set:
zstyle :plugin:history-search-multi-word reset-prompt-protect 1
to be able to use `zle reset-prompt' in your e.g. sched calls, in
presence of zdharma/fast-syntax-highlighting, zsh-users/zsh-syntax-high-
lighting, zsh-users/zsh-autosuggestions and other plugins that hook up
into Zshell by overloading Zle widgets. In general, HSMW should be
loaded in bulk (no gap) with all those plugins, right before them.
Issue #12
2018-08-04 17:23:44 +02:00
Sebastian Gniazdowski
ce48a53e36
hsmw: More typo-like lackings of % substitution
...
Issue #12 , not directly related, but discovered at time of examining it
2018-08-04 16:32:17 +02:00
Sebastian Gniazdowski
7e2d79bb01
hsmw: A somewhat typo, missing % substitution
...
Issue #12 , not directly related, but discovered at time of examining it
2018-08-04 16:20:41 +02:00
Sebastian Gniazdowski
74eb3c46f2
Zstyle to configure if BUFFER should be cleared, default false
2017-06-13 07:20:01 +02:00
Sebastian Gniazdowski
3624e8e8c1
hsmw: Indent whole file via Emacs
2017-06-13 06:57:54 +02:00
Sebastian Gniazdowski
14d0704d91
Emacs mode-lines for all files
2017-06-13 06:50:47 +02:00
Sebastian Gniazdowski
49fea60bf7
hsmw: Optimization – uniquify $history at search, not at store
...
zprof before 1791, after 1479 (17% gain)
2017-04-05 10:12:19 +02:00
Sebastian Gniazdowski
82e639c11e
Input-driven case-sensivity of search
2017-01-27 13:08:52 +01:00
Sebastian Gniazdowski
b0f9de1bb6
hsmw: Inform about bump functionality (Ctrl-J)
2016-12-09 08:35:37 +01:00
Sebastian Gniazdowski
cec22e3e15
hsmw: New feature – jump of history entries (Ctrl-J)
2016-11-30 07:53:44 +01:00
Sebastian Gniazdowski
1dbbb371a0
Support for context of command (Ctrl-K, then Ctrl-N/Ctrl-P)
2016-11-12 15:55:21 +01:00
Sebastian Gniazdowski
4465b57f95
Better handling of "synhl" zstyle, via -T zstyle option
2016-11-05 11:44:50 +01:00
Sebastian Gniazdowski
e6bc8ff0c0
Zstyle to configure whether to check paths for existence
...
parse.zsh -oo, after changes:
Running time: 1.5653990000
num calls time self name
-----------------------------------------------------------------------------------
1) 350 1557,37 4,45 99,99% 1199,04 3,43 76,98% -hsmw-highlight-process
2) 2800 294,91 0,11 18,93% 294,91 0,11 18,93% -hsmw-highlight-string
3) 1750 40,81 0,02 2,62% 40,81 0,02 2,62% -hsmw-highlight-check-path
4) 1400 22,61 0,02 1,45% 22,61 0,02 1,45% -hsmw-highlight-main-type
5) 1 0,12 0,12 0,01% 0,12 0,12 0,01% -hsmw-highlight-fill-option-variables
6) 1 0,02 0,02 0,00% 0,02 0,02 0,00% -hsmw-highlight-init
2016-11-05 11:36:39 +01:00
Sebastian Gniazdowski
c918483dcc
Don't use ^K for kill-whole-line, it is to be used with context feature
2016-11-02 07:38:38 +01:00
Sebastian Gniazdowski
f039d9db63
hsmw: Optimization: switch from [ to [[
2016-11-02 07:35:01 +01:00
Sebastian Gniazdowski
2641b1da89
hsmw: Miracle optimization of query highlighting – via math function
...
For query A|B|C the time is 44 ms vs 502 ms – for the lines of code that
highlight words A,B,C.
No more Zaw license – the borrowed line of code is now removed, and
whole code is licensed under GPLv3 and MIT.
2016-11-01 19:43:55 +01:00
Sebastian Gniazdowski
58faf8d701
hsmw: Fix unclean region_highlight entries by join and split via \0 byte
2016-11-01 18:22:48 +01:00
Sebastian Gniazdowski
13e21cd4d6
hsmw: Optimize shifting indexes by offset – *highlight can take offset
2016-10-31 18:43:48 +01:00
Sebastian Gniazdowski
964fdf7240
Match *highlight's support of \n in the outer hsmw code
2016-10-31 14:51:28 +01:00
Sebastian Gniazdowski
68348d09ee
*higlight,hsmw: No need for is-at-least – test for ZSH_ARGZERO instead
2016-10-31 11:17:00 +01:00
Sebastian Gniazdowski
136d10e0bb
More distinct name of saved-widgets namespace
2016-10-29 17:46:53 +02:00
Sebastian Gniazdowski
aeda2e7be4
Fix for the OMZ workaround – zle-keymap-select doesn't have to exist
2016-10-29 17:44:36 +02:00
Sebastian Gniazdowski
25dae1d616
Workaround for OMZ vi-mode plugin
2016-10-29 17:40:30 +02:00
Sebastian Gniazdowski
2f6393dd0b
Set promptsubst
2016-10-29 14:13:00 +02:00
Sebastian Gniazdowski
619d9c7184
Only define _hsmw_main() once – check $functions before defining
2016-10-27 18:22:58 +02:00
Sebastian Gniazdowski
aee52a54ac
Properly bind ^W – trigger search recomputation
2016-10-27 18:18:46 +02:00
Sebastian Gniazdowski
1a599ee5f0
Use .kill-whole-line instead of .vi-kill-line
2016-10-27 18:15:19 +02:00
Sebastian Gniazdowski
58601435c8
Also bind ^U, as far I know Emacs clears line on that keys
2016-10-27 18:13:02 +02:00
Sebastian Gniazdowski
a44a52e3f2
Bind ^W, ^K – the latter to .vi-kill-line – .kill-line doesn't work
2016-10-27 18:10:56 +02:00
Sebastian Gniazdowski
56e289a40a
Architectural change: recompute highlighting only on page, query change
2016-10-27 16:34:07 +02:00
Sebastian Gniazdowski
ee0201a91b
Faster startup – use ${(@)history} when search pattern is empty
2016-10-27 15:50:18 +02:00
Sebastian Gniazdowski
619c27c2cf
Guard to not run trap handler twice while in .recursive-edit
2016-10-27 15:41:57 +02:00
Sebastian Gniazdowski
b682066065
Set no-op trap after leaving recursive-edit –> ensure code is executed
2016-10-27 15:08:45 +02:00
Sebastian Gniazdowski
2bef2b9343
*highlight: Optimization – save options outside main highlighting fun
...
Lower 18xx are being seen, like below:
Running time: 1.8632000000
num calls time self name
-----------------------------------------------------------------------------------
1) 350 1855,72 5,30 100,00% 1376,89 3,93 74,19% -hsmw-highlight-process
2) 2800 342,38 0,12 18,45% 342,38 0,12 18,45% -hsmw-highlight-string
3) 2450 80,16 0,03 4,32% 80,16 0,03 4,32% -hsmw-highlight-check-path
4) 1400 38,99 0,03 2,10% 38,99 0,03 2,10% -hsmw-highlight-main-type
5) 350 9,83 0,03 0,53% 9,83 0,03 0,53% -hsmw-highlight-stack-pop
6) 350 7,47 0,02 0,40% 7,47 0,02 0,40% -hsmw-highlight-path-separators
7) 1 0,07 0,07 0,00% 0,07 0,07 0,00% -hsmw-highlight-fill-option-variables
8) 1 0,01 0,01 0,00% 0,01 0,01 0,00% -hsmw-highlight-init
2016-10-25 16:17:39 +02:00
Sebastian Gniazdowski
8ff58ae0ec
Optimization: generate disp_list only on page change or query change
2016-10-24 13:35:13 +02:00
Sebastian Gniazdowski
2e4c70638c
Optimization: initialize highlighting's cache only once per run
2016-10-24 13:05:16 +02:00
Sebastian Gniazdowski
eefe1f1149
Re-bind some additional keys (ESC-b, ESC-f, ESC-w)
2016-10-24 10:25:25 +02:00
Sebastian Gniazdowski
1e65c840f4
Escape too cancels search
2016-10-24 10:08:20 +02:00
Sebastian Gniazdowski
a91406590e
Workaround for Zsh versions like 5.0.2 – Ctrl-V to cancel search
2016-10-24 10:00:58 +02:00
Sebastian Gniazdowski
0623cd6d9c
Optimize out array length computation, partially change [ -> [[
2016-10-22 14:31:35 +02:00