mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-29 01:24:52 +03:00
rc/: Escaping cleanups in bundled scripts
Remove escapes that trigger errors when experimenting with doubling-up escaping.
This commit is contained in:
parent
6ce248b59c
commit
5ad188e14c
@ -7,19 +7,19 @@ declare-option -docstring "colon separated list of paths to tag files to parse w
|
||||
str-list ctagsfiles 'tags'
|
||||
|
||||
define-command -params ..1 \
|
||||
-shell-candidates '
|
||||
-shell-candidates %{
|
||||
realpath() { ( path=$(readlink "$1"); cd "$(dirname "$1")"; printf "%s/%s\n" "$(pwd -P)" "$(basename "$1")" ) }
|
||||
printf %s\\n "$kak_opt_ctagsfiles" | tr \':\' \'\n\' |
|
||||
printf %s\\n "$kak_opt_ctagsfiles" | tr ':' '\n' |
|
||||
while read -r candidate; do
|
||||
[ -f "$candidate" ] && realpath "$candidate"
|
||||
done | awk \'!x[$0]++\' | # remove duplicates
|
||||
done | awk '!x[$0]++' | # remove duplicates
|
||||
while read -r tags; do
|
||||
namecache="${tags%/*}/.kak.${tags##*/}.namecache"
|
||||
if [ -z "$(find "$namecache" -prune -newer "$tags")" ]; then
|
||||
cut -f 1 "$tags" | uniq > "$namecache"
|
||||
fi
|
||||
cat "$namecache"
|
||||
done' \
|
||||
done} \
|
||||
-docstring %{ctags-search [<symbol>]: jump to a symbol's definition
|
||||
If no symbol is passed then the current selection is used as symbol name} \
|
||||
ctags-search \
|
||||
|
@ -12,7 +12,7 @@ hook global BufCreate .*[.](hs) %{
|
||||
# ‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
|
||||
add-highlighter shared/ regions -default code haskell \
|
||||
string '(?<!\'\\)(?<!\')"' (?<!\\)(\\\\)*" '' \
|
||||
string (?<!'\\)(?<!')" (?<!\\)(\\\\)*" '' \
|
||||
macro ^\h*?\K# (?<!\\)\n '' \
|
||||
pragma \{-# '#-\}' \{- \
|
||||
comment \{- -\} \{- \
|
||||
|
@ -12,10 +12,10 @@ hook global BufCreate .*\.p[lm] %{
|
||||
# ‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
|
||||
add-highlighter shared/ regions -default code perl \
|
||||
command '(?<!\$)(?<!\\)`' (?<!\\)(\\\\)*` '' \
|
||||
double_string '(?<!\$)(?<!\\)"' (?<!\\)(\\\\)*" '' \
|
||||
single_string "(?<!\\$)(?<!\\\\)'" (?<!\\)(\\\\)*' '' \
|
||||
comment '(?<!\$)(?<!\\)#' $ ''
|
||||
command (?<!\$)(?<!\\)` (?<!\\)(\\\\)*` '' \
|
||||
double_string (?<!\$)(?<!\\)" (?<!\\)(\\\\)*" '' \
|
||||
single_string (?<!\$)(?<!\\\\)' (?<!\\)(\\\\)*' '' \
|
||||
comment (?<!\$)(?<!\\)# $ ''
|
||||
|
||||
add-highlighter shared/perl/command fill magenta
|
||||
add-highlighter shared/perl/double_string fill string
|
||||
|
Loading…
Reference in New Issue
Block a user