Hi y’all,

I’m using keyboard macros heavily in one of my tools, with one of the
macros going as long as

"\C-x)": 
"s/(\\(\\(\\([[({]\\(\\([[({]\\(\\([[({]\\([^][(){}]\\{0,1\\}\\)*[]})]\\)\\{0,1\\}[^][(){}]\\{0,1\\}\\)*[]})]\\)\\{0,1\\}[^][(){}]\\{0,1\\}\\)*[]})]\\)\\{0,1\\}[^][(){}]\\{0,1\\}\\)*\\))[[:space:]]\\{1,\\}\\(\\(\\([[({]\\(\\([[({]\\(\\([[({]\\([^][(){}]\\{0,1\\}\\)*[]})]\\)\\{0,1\\}[^][(){}]\\{0,1\\}\\)*[]})]\\)\\{0,1\\}[^][(){}]\\{0,1\\}\\)*[]})]\\)\\{0,1\\}[^][(){}
 ]\\{0,1\\}\\)*\\)/(\\1 \\9)/n"

When I press the key bound to it, it takes 50+ seconds to type itself
in. As discussed in
https://github.com/hanslub42/rlwrap/issues/209#issuecomment-3419634786
the problem is blinking parens, slowing down the input per each
parenthesis/bracket/brace included.

Is this considered a bug? I do want to have it instantaneous, but also
want to retain paren matching, as I’m doing Lisp from time to time.

Here’s my full config. ~/.inputrc:

set editing-mode emacs
set bell-style visible
set colored-completion-prefix on
set blink-matching-paren on
set completion-query-items 1000
set mark-symlinked-directories on
set search-ignore-case on
set visible-stats on
TAB: complete
"\M-\C-m": rlwrap-accept-line-and-forget
"\ep": previous-history
"\en": next-history
"\er": reverse-search-history
"\es": forward-search-history
"\eb": vi-prev-word
"\ef": vi-next-word
"\C-xb": vi-match
"\C-xf": vi-match
"\C-xx": vi-match
"\C-x\C-`": set-mark
"\ew": copy-region-as-kill
"\C-w": kill-region
$include ~/.local/share/aed/inputrc


~/.local/share/aed/inputrc:

$if aed
"\C-xG": "w\C-m!git fetch; git pull; git status -vv\C-m"
"\C-xC": "w\C-m!EDITOR=aed git fetch && git pull && git add -p % && git commit 
-e\C-m"
"\C-xA": "w\C-m!aspell -H --warn --suggest --camel-case -c %\C-mE\C-m"
"\C-xI": "!indent -linux --procnames-start-lines %\C-mE\C-m"
"\C-xM": "!make clean ; make all -j 4\C-m"
"\C-xL": "!lisp ecl --load *.asd ; cd .. ; lisp ecl --load *.asd ; cd .. ;  
lisp ecl --load *.asd"
"\C-x^": 
"s/\\([[:space:]]*\\)[[({]\\(\\(\\([[({]\\(\\([[({]\\([^][(){}]\\{0,1\\}\\)*[]})]\\)\\{0,1\\}[^][(){}]\\{0,1\\}\\)*[]})]\\)\\{0,1\\}[^][(){}]\\{0,1\\}\\)*\\)[]})]/\\1\\2/n"
"\C-x(": 
"s/\\([[:space:]]*\\)\\(\\(\\([[({]\\(\\([[({]\\(\\([[({]\\([^][(){}]\\{0,1\\}\\)*[]})]\\)\\{0,1\\}[^][(){}]\\{0,1\\}\\)*[]})]\\)\\{0,1\\}[^][(){}]\\{0,1\\}\\)*[]})]\\)\\{0,1\\}[^][(){}]\\{0,1\\}\\)*\\)/\\1(\\2)/n"
"\C-x)": 
"s/(\\(\\(\\([[({]\\(\\([[({]\\(\\([[({]\\([^][(){}]\\{0,1\\}\\)*[]})]\\)\\{0,1\\}[^][(){}]\\{0,1\\}\\)*[]})]\\)\\{0,1\\}[^][(){}]\\{0,1\\}\\)*[]})]\\)\\{0,1\\}[^][(){}]\\{0,1\\}\\)*\\))[[:space:]]\\{1,\\}\\(\\(\\([[({]\\(\\([[({]\\(\\([[({]\\([^][(){}]\\{0,1\\}\\)*[]})]\\)\\{0,1\\}[^][(){}]\\{0,1\\}\\)*[]})]\\)\\{0,1\\}[^][(){}]\\{0,1\\}\\)*[]})]\\)\\{0,1\\}[^][(){}
 ]\\{0,1\\}\\)*\\)/(\\1 \\9)/n"
"\C-x[": 
"s/\\([[:space:]]*\\)\\(\\(\\([[({]\\(\\([[({]\\(\\([[({]\\([^][(){}]\\{0,1\\}\\)*[]})]\\)\\{0,1\\}[^][(){}]\\{0,1\\}\\)*[]})]\\)\\{0,1\\}[^][(){}]\\{0,1\\}\\)*[]})]\\)\\{0,1\\}[^][(){}]\\{0,1\\}\\)*\\)/\\1[\\2]/n"
"\C-x]": 
"s/\\[\\(\\(\\([[({]\\(\\([[({]\\(\\([[({]\\([^][(){}]\\{0,1\\}\\)*[]})]\\)\\{0,1\\}[^][(){}]\\{0,1\\}\\)*[]})]\\)\\{0,1\\}[^][(){}]\\{0,1\\}\\)*[]})]\\)\\{0,1\\}[^][(){}]\\{0,1\\}\\)*\\)\\][[:space:]]\\{1,\\}\\(\\(\\([[({]\\(\\([[({]\\(\\([[({]\\([^][(){}]\\{0,1\\}\\)*[]})]\\)\\{0,1\\}[^][(){}]\\{0,1\\}\\)*[]})]\\)\\{0,1\\}[^][(){}]\\{0,1\\}\\)*[]})]\\)\\{0,1\\}[^][(){}
 ]\\{0,1\\}\\)*\\)/[\\1 \\9]/n"
"\C-x{": 
"s/\\([[:space:]]*\\)\\(\\(\\([[({]\\(\\([[({]\\(\\([[({]\\([^][(){}]\\{0,1\\}\\)*[]})]\\)\\{0,1\\}[^][(){}]\\{0,1\\}\\)*[]})]\\)\\{0,1\\}[^][(){}]\\{0,1\\}\\)*[]})]\\)\\{0,1\\}[^][(){}]\\{0,1\\}\\)*\\)/\\1{\\2}/n"
"\C-x}": 
"s/{\\(\\(\\([[({]\\(\\([[({]\\(\\([[({]\\([^][(){}]\\{0,1\\}\\)*[]})]\\)\\{0,1\\}[^][(){}]\\{0,1\\}\\)*[]})]\\)\\{0,1\\}[^][(){}]\\{0,1\\}\\)*[]})]\\)\\{0,1\\}[^][(){}]\\{0,1\\}\\)*\\)}[[:space:]]\\{1,\\}\\(\\(\\([[({]\\(\\([[({]\\(\\([[({]\\([^][(){}]\\{0,1\\}\\)*[]})]\\)\\{0,1\\}[^][(){}]\\{0,1\\}\\)*[]})]\\)\\{0,1\\}[^][(){}]\\{0,1\\}\\)*[]})]\\)\\{0,1\\}[^][(){}
 ]\\{0,1\\}\\)*\\)/{\\1 \\9}/n"
"\C-xq": "Q\C-m"
"\C-xp": "-15,-1n\C-m-14n\C-m"
"\C-xn": "+1,+15n\C-m"
"\C-xi": "s/^[ ]\\{0,2\\}[      ]\\{0,1\\}/&&/n"
"\C-x\C-i": "s/^[ ]\\{0,2\\}[   ]\\{0,1\\}/&&/n"
$endif

Thanks,
-- 
Artyom Bologov
https://aartaka.me

Reply via email to