From 3032456c31be1add0563e07dc17e7599a0ef525b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20K=C3=B6cher?= Date: Fri, 8 Jul 2016 08:05:05 +0200 Subject: [PATCH] Optianal suppor for C++ style single line comments This adds 'g:gasCppComments' option to highlight C++ single line comments (// ...). Fixes #6 --- syntax/gas.vim | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/syntax/gas.vim b/syntax/gas.vim index 3d19e6e..0deb9d2 100644 --- a/syntax/gas.vim +++ b/syntax/gas.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: GNU as (AT&T) assembler for X86 " Maintainer: Rene Koecher -" Last Change: 2016 Mar 22 -" Version: 0.10 +" Last Change: 2016 Jul 08 +" Version: 0.11 " Remark: Intel compatible instructions only (for now) " License: BSD (3 clause), see LICENSE " @@ -84,6 +84,9 @@ syn match gasOperator /[+-/*=|&~<>]\|<=\|>=\|<>/ syn region gasComment start=/\/\*/ end=/\*\// syn region gasCommentSingle start=/#/ end=/$/ syn region gasCommentSingle start=/@/ end=/$/ +if exists('g:gasCppComments') + syn region gasCommentSingle start=/\/\// end=/$/ +endif " ARM specific directives syn keyword gasDirectiveStoreARM .2byte .4byte .8byte