summaryrefslogtreecommitdiffstats
path: root/pairs.lua
diff options
context:
space:
mode:
authorGeorgi Kirilov <>2020-11-22 15:10:49 +0200
committerGeorgi Kirilov <>2023-10-04 18:24:59 +0800
commit5296a1f45f11358cfbe2695a8edd7ffc78e7dc20 (patch)
tree34775453d8cd798a30678d0d0c66b3206f6ba5c6 /pairs.lua
parentc98ea46a7057f94026197c66e32f02ff49d2927d (diff)
downloadvis-pairs-5296a1f45f11358cfbe2695a8edd7ffc78e7dc20.tar.gz
Remove the universal text object for quotes
Better not introduce new mappings to memorize.
Diffstat (limited to 'pairs.lua')
-rw-r--r--pairs.lua4
1 files changed, 1 insertions, 3 deletions
diff --git a/pairs.lua b/pairs.lua
index 2c772a8..014abf6 100644
--- a/pairs.lua
+++ b/pairs.lua
@@ -204,16 +204,14 @@ vis.events.subscribe(vis.events.INIT, function()
local tex_environment = {"\\begin{" * l.Cg(l.C(l.R("az", "AZ")^1), "t") * "}", l.Cmt("\\end{" * l.Cb("t") * l.C((1 - l.P"}")^1) * "}", function(_, _, c1, c2) return c1 == c2 end), {"\\begin{\255\253}", "\\end{\255\253}"}, "environment name"}
local tag = {"<" * l.Cg(l.C((l.S"_:" + l.R("az", "AZ")) * (l.R("az", "AZ", "09") + l.S"_:.-")^0), "t") * (1 - l.S"><")^0 * (">" - l.B"/"), l.Cmt("</" * l.Cb("t") * l.C((1 - l.P">")^1) * ">", function(_, _, c1, c2) return c1 == c2 end), {"<\255\253>", "</\255\253>"}, "tag name"}
local function any_pair(set, default) return {l.Cg(l.C(l.S(set)), "s"), l.Cmt(l.Cb("s") * l.C(1), function(_, _, c1, c2) return builtin_textobjects[c1][2] == c2 end), builtin_textobjects[default]} end
- local any_quote = any_pair("'`\"")
local any_bracket = any_pair("({[", "(")
local presets = {
- {q = any_quote},
html = {t = tag},
xml = {t = tag},
scheme = {b = any_bracket},
lisp = {b = any_bracket},
clojure = {b = any_bracket},
- latex = {t = tex_environment}
+ latex = {t = tex_environment},
}
for syntax, bindings in pairs(presets) do
if not M.map[syntax] then