git.shiar.nl
/
sheet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
eb99584
)
digraphs: mkdigraphs-vim: escape mnemonics
author
Mischa POSLAWSKY
<perl@shiar.org>
Sun, 22 Feb 2015 01:25:41 +0000
(
02:25
+0100)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Tue, 9 Jun 2015 03:43:42 +0000
(
05:43
+0200)
tools/mkdigraphs-vim
patch
|
blob
|
history
diff --git
a/tools/mkdigraphs-vim
b/tools/mkdigraphs-vim
index a94812fe942f52a8eb4a513e3c28906e3ffa6fc5..5386010dd9c4479c551f5772a75fe093da8e97cc 100755
(executable)
--- a/
tools/mkdigraphs-vim
+++ b/
tools/mkdigraphs-vim
@@
-7,7
+7,11
@@
vim -e -c'echo version' -cdigraphs -cq | perl -CSD -nE '
say "# digraphs list from vim version ", s/\s*\z//r;
say "+{";
} else { # body
say "# digraphs list from vim version ", s/\s*\z//r;
say "+{";
} else { # body
- say "q{$1} => $3," while /\G(\S\S) (.[^ ]*) +([0-9]+)\s+/g;
+ while (/\G(\S\S) (.[^ ]*) +([0-9]+)\s+/g) {
+ my ($mnem, $chr, $cp) = ($1, $2, $3);
+ $mnem =~ s/(?=[\\}])/\\/g; # escape string delimiter
+ say "q{$mnem} => $cp,";
+ }
} END { # foot
say "}";
exit warn "only $. lines of :digraphs output\n" if $. < 6;
} END { # foot
say "}";
exit warn "only $. lines of :digraphs output\n" if $. < 6;