[PATCH] runtime: indent: fix assignment match

25 views
Skip to first unread message

Felipe Contreras

unread,
Apr 23, 2021, 5:57:35 AM4/23/21
to vim...@vim.org, Nikolai Weibull, Felipe Contreras
In Makefiles assignments can also be ':='.

Signed-off-by: Felipe Contreras <felipe.c...@gmail.com>
---
runtime/indent/make.vim | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/runtime/indent/make.vim b/runtime/indent/make.vim
index 66a8a4017..4483efdbd 100644
--- a/runtime/indent/make.vim
+++ b/runtime/indent/make.vim
@@ -20,8 +20,8 @@ let s:comment_rx = '^\s*#'
let s:rule_rx = '^[^ \t#:][^#:]*:\{1,2}\%([^=:]\|$\)'
let s:continued_rule_rx = '^[^#:]*:\{1,2}\%([^=:]\|$\)'
let s:continuation_rx = '\\$'
-let s:assignment_rx = '^\s*\h\w*\s*[+?]\==\s*\zs.*\\$'
-let s:folded_assignment_rx = '^\s*\h\w*\s*[+?]\=='
+let s:assignment_rx = '^\s*\h\w*\s*[+:?]\==\s*\zs.*\\$'
+let s:folded_assignment_rx = '^\s*\h\w*\s*[+:?]\=='
" TODO: This needs to be a lot more restrictive in what it matches.
let s:just_inserted_rule_rx = '^\s*[^#:]\+:\{1,2}$'
let s:conditional_directive_rx = '^ *\%(ifn\=\%(eq\|def\)\|else\)\>'
--
2.31.0

Reply all
Reply to author
Forward
0 new messages