From a1118be7d97d2126e3f59b4545ebcf693c159045 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Wed, 15 Jul 2015 21:57:33 +0900 Subject: [PATCH] Extend default = rule to include `?=` Close #65 --- autoload/easy_align.vim | 2 +- test/fixed.vader | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/autoload/easy_align.vim b/autoload/easy_align.vim index e57f5be..c5829bd 100644 --- a/autoload/easy_align.vim +++ b/autoload/easy_align.vim @@ -31,7 +31,7 @@ set cpo&vim let s:easy_align_delimiters_default = { \ ' ': { 'pattern': ' ', 'left_margin': 0, 'right_margin': 0, 'stick_to_left': 0 }, -\ '=': { 'pattern': '===\|<=>\|\(&&\|||\|<<\|>>\)=\|=\~[#?]\?\|=>\|[:+/*!%^=><&|.-]\?=[#?]\?', +\ '=': { 'pattern': '===\|<=>\|\(&&\|||\|<<\|>>\)=\|=\~[#?]\?\|=>\|[:+/*!%^=><&|.-?]\?=[#?]\?', \ 'left_margin': 1, 'right_margin': 1, 'stick_to_left': 0 }, \ ':': { 'pattern': ':', 'left_margin': 0, 'right_margin': 1, 'stick_to_left': 1 }, \ ',': { 'pattern': ',', 'left_margin': 0, 'right_margin': 1, 'stick_to_left': 1 }, diff --git a/test/fixed.vader b/test/fixed.vader index 46b2e8d..876bb67 100644 --- a/test/fixed.vader +++ b/test/fixed.vader @@ -198,4 +198,18 @@ Expect: a | bbb | c aa | bb | cc +* #65 ?= +Given: + a?=b + aa?=bb + aaa?=bbb + +Do (#65 Alignment around ?=): + \Aip= + +Expect: + a ?= b + aa ?= bb + aaa ?= bbb + Include: include/teardown.vader