diff options
author | Georgi Kirilov <> | 2020-11-22 15:10:49 +0200 |
---|---|---|
committer | Georgi Kirilov <> | 2023-10-04 18:24:59 +0800 |
commit | 5296a1f45f11358cfbe2695a8edd7ffc78e7dc20 (patch) | |
tree | 34775453d8cd798a30678d0d0c66b3206f6ba5c6 /pairs.lua | |
parent | c98ea46a7057f94026197c66e32f02ff49d2927d (diff) | |
download | vis-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.lua | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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 |