From 5fc36c048e75311b5755b667c1aca7f4d50d3562 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Fri, 16 Nov 2018 10:33:01 +0100 Subject: [PATCH] Inline s:skip_search --- indent/python.vim | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/indent/python.vim b/indent/python.vim index e3c2352..b3631a1 100644 --- a/indent/python.vim +++ b/indent/python.vim @@ -94,9 +94,6 @@ if get(g:, 'python_pep8_indent_skip_concealed', 0) endif -let s:skip_search = 'synIDattr(synID(line("."), col("."), 0), "name") ' . - \ '=~? "comment"' - " Use 'shiftwidth()' instead of '&sw'. " (Since Vim patch 7.3.629, 'shiftwidth' can be set to 0 to follow 'tabstop'). if exists('*shiftwidth') @@ -121,7 +118,9 @@ function! s:find_opening_paren(...) endif " Return if cursor is in a comment. - exe 'if' s:skip_search '| return [0, 0] | endif' + if synIDattr(synID(line('.'), col('.'), 0), 'name') =~? 'comment' + return [0, 0] + endif let nearest = [0, 0] for [p, maxoff] in items(s:paren_pairs) -- 2.39.2