From: Richard Si <63936253+ichard26@users.noreply.github.com> Date: Tue, 25 Jan 2022 03:13:34 +0000 (-0500) Subject: Hug power operators if its operands are "simple" (#2726) X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/6417c99bfdbdc057e4a10aeff9967a751f4f85e9?ds=sidebyside;hp=6417c99bfdbdc057e4a10aeff9967a751f4f85e9 Hug power operators if its operands are "simple" (#2726) Since power operators almost always have the highest binding power in expressions, it's often more readable to hug it with its operands. The main exception to this is when its operands are non-trivial in which case the power operator will not hug, the rule for this is the following: > For power ops, an operand is considered "simple" if it's only a NAME, numeric CONSTANT, or attribute access (chained attribute access is allowed), with or without a preceding unary operator. Fixes GH-538. Closes GH-2095. diff-shades results: https://gist.github.com/ichard26/ca6c6ad4bd1de5152d95418c8645354b Co-authored-by: Diego Co-authored-by: Felix Hildén Co-authored-by: Jelle Zijlstra ---