summaryrefslogtreecommitdiff
path: root/rc/javascript.kak
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2015-09-02 13:30:34 +0100
committerMaxime Coste <frrrwww@gmail.com>2015-09-02 13:30:34 +0100
commitf14f87d2d84d5f6620cdccd2bd02421580f058e1 (patch)
treeb8906fb06395829323df50bfb23d84da6bb1e9d8 /rc/javascript.kak
parent52c2214391bbc765b8e05a18c0252bb57fbf0b28 (diff)
javascript.kak: Fix indent functions
"..." strings do expand the %{...} strings in them, so "eval -opt %{haha haha}" is the same as 'eval -opt haha haha'.
Diffstat (limited to 'rc/javascript.kak')
-rw-r--r--rc/javascript.kak16
1 files changed, 8 insertions, 8 deletions
diff --git a/rc/javascript.kak b/rc/javascript.kak
index 6ace8dad..690ff396 100644
--- a/rc/javascript.kak
+++ b/rc/javascript.kak
@@ -46,15 +46,15 @@ def -hidden _javascript_filter_around_selections %{
}
}
-def -hidden _javascript_indent_on_char "
- eval -draft -itersel %_
+def -hidden _javascript_indent_on_char %<
+ eval -draft -itersel %<
# align closer token to its opener when alone on a line
try %/ exec -draft <a-h> <a-k> ^\h+[]}]$ <ret> m s \`|.\' <ret> 1<a-&> /
- _
-"
+ >
+>
-def -hidden _javascript_indent_on_new_line "
- eval -draft -itersel '
+def -hidden _javascript_indent_on_new_line %<
+ eval -draft -itersel %<
# preserve previous line indent
try %{ exec -draft <space> K <a-&> }
# filter previous line
@@ -63,8 +63,8 @@ def -hidden _javascript_indent_on_new_line "
try %{ exec -draft k x s ^\h*\K#\h* <ret> y j p }
# indent after lines beginning / ending with opener token
try %_ exec -draft k x <a-k> ^\h*[[{]|[[{]$ <ret> j <a-gt> _
- '
-"
+ >
+>
# Initialization
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾