[PATCH resend] <Enter> is not highlighted when editing Vim configuration files

17 views
Skip to first unread message

Alex Henrie

unread,
Jun 30, 2016, 3:05:40 PM6/30/16
to vim...@vim.org, Br...@vim.org, Alex Henrie
Hi,

I noticed a small problem with Vim's syntax highlighting: When editing
my keybindings in ~/.vimrc, the keyword <Return> is highlighted, but the
keyword <Enter> is not. I checked the documentation and they are both
synonyms, neither is preferred above the other. Editing the regex in
$VIMRUNTIME/syntax/vim.vim to include "enter" alongside "return" seems
to work fine. Please consider making this change in the officially
distributed vim.vim.

-Alex
---
runtime/syntax/vim.vim | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index a04261a..c6c0ddc 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -414,7 +414,7 @@ syn match vimMenuBang "!" contained skipwhite nextgroup=@vimMenuList
" Angle-Bracket Notation (tnx to Michael Geddes) {{{2
" ======================
syn case ignore
-syn match vimNotation "\(\\\|<lt>\)\=<\([scamd]-\)\{0,4}x\=\(f\d\{1,2}\|[^ \t:]\|cr\|lf\|linefeed\|return\|k\=del\%[ete]\|bs\|backspace\|tab\|esc\|right\|left\|help\|undo\|insert\|ins\|k\=home\|k\=end\|kplus\|kminus\|kdivide\|kmultiply\|kenter\|kpoint\|space\|k\=\(page\)\=\(\|down\|up\|k\d\>\)\)>" contains=vimBracket
+syn match vimNotation "\(\\\|<lt>\)\=<\([scamd]-\)\{0,4}x\=\(f\d\{1,2}\|[^ \t:]\|cr\|lf\|linefeed\|enter\|return\|k\=del\%[ete]\|bs\|backspace\|tab\|esc\|right\|left\|help\|undo\|insert\|ins\|k\=home\|k\=end\|kplus\|kminus\|kdivide\|kmultiply\|kenter\|kpoint\|space\|k\=\(page\)\=\(\|down\|up\|k\d\>\)\)>" contains=vimBracket
syn match vimNotation "\(\\\|<lt>\)\=<\([scam2-4]-\)\{0,4}\(right\|left\|middle\)\(mouse\)\=\(drag\|release\)\=>" contains=vimBracket
syn match vimNotation "\(\\\|<lt>\)\=<\(bslash\|plug\|sid\|space\|bar\|nop\|nul\|lt\)>" contains=vimBracket
syn match vimNotation '\(\\\|<lt>\)\=<C-R>[0-9a-z"%#:.\-=]'he=e-1 contains=vimBracket
--
2.9.0

Reply all
Reply to author
Forward
0 new messages