Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: tools/gn/misc/vim/syntax/gn.vim

Issue 2672573002: Add vim support for highlighting GN target names (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 " Copyright 2014 The Chromium Authors. All rights reserved. 1 " Copyright 2014 The Chromium Authors. All rights reserved.
2 " Use of this source code is governed by a BSD-style license that can be 2 " Use of this source code is governed by a BSD-style license that can be
3 " found in the LICENSE file. 3 " found in the LICENSE file.
4 " 4 "
5 " gn.vim: Vim syntax file for GN. 5 " gn.vim: Vim syntax file for GN.
6 " 6 "
7 " Quit when a (custom) syntax file was already loaded 7 " Quit when a (custom) syntax file was already loaded
8 "if exists("b:current_syntax") 8 "if exists("b:current_syntax")
9 "finish 9 "finish
10 "endif 10 "endif
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 syn keyword gnVariable args asmflags cflags cflags_c cflags_cc cflags_objc 45 syn keyword gnVariable args asmflags cflags cflags_c cflags_cc cflags_objc
46 syn keyword gnVariable cflags_objcc check_includes complete_static_lib 46 syn keyword gnVariable cflags_objcc check_includes complete_static_lib
47 syn keyword gnVariable configs data data_deps defines depfile deps 47 syn keyword gnVariable configs data data_deps defines depfile deps
48 syn keyword gnVariable include_dirs inputs ldflags lib_dirs libs 48 syn keyword gnVariable include_dirs inputs ldflags lib_dirs libs
49 syn keyword gnVariable output_extension output_name outputs public 49 syn keyword gnVariable output_extension output_name outputs public
50 syn keyword gnVariable public_configs public_deps scripte sources testonly 50 syn keyword gnVariable public_configs public_deps scripte sources testonly
51 syn keyword gnVariable visibility 51 syn keyword gnVariable visibility
52 hi def link gnVariable Keyword 52 hi def link gnVariable Keyword
53 53
54 " Strings 54 " Strings
55 syn region» gnString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=@Spe ll 55 syn region gnString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell,g nTargetName
56 syn match gnTargetName '\v:[^"]+' contained
56 hi def link gnString String 57 hi def link gnString String
58 hi def link gnTargetName Special
57 59
58 " Comments 60 " Comments
59 syn keyword gnTodo contained TODO FIXME XXX BUG NOTE 61 syn keyword gnTodo contained TODO FIXME XXX BUG NOTE
60 syn cluster gnCommentGroup contains=gnTodo 62 syn cluster gnCommentGroup contains=gnTodo
61 syn region gnComment start="#" end="$" contains=@gnCommentGroup,@ Spell 63 syn region gnComment start="#" end="$" contains=@gnCommentGroup,@ Spell
62 64
63 hi def link gnComment Comment 65 hi def link gnComment Comment
64 hi def link gnTodo Todo 66 hi def link gnTodo Todo
65 67
66 " Operators; I think this is a bit too colourful. 68 " Operators; I think this is a bit too colourful.
67 "syn match gnOperator /=/ 69 "syn match gnOperator /=/
68 "syn match gnOperator /!=/ 70 "syn match gnOperator /!=/
69 "syn match gnOperator />=/ 71 "syn match gnOperator />=/
70 "syn match gnOperator /<=/ 72 "syn match gnOperator /<=/
71 "syn match gnOperator /==/ 73 "syn match gnOperator /==/
72 "syn match gnOperator /+=/ 74 "syn match gnOperator /+=/
73 "syn match gnOperator /-=/ 75 "syn match gnOperator /-=/
74 "syn match gnOperator /\s>\s/ 76 "syn match gnOperator /\s>\s/
75 "syn match gnOperator /\s<\s/ 77 "syn match gnOperator /\s<\s/
76 "syn match gnOperator /\s+\s/ 78 "syn match gnOperator /\s+\s/
77 "syn match gnOperator /\s-\s/ 79 "syn match gnOperator /\s-\s/
78 "hi def link gnOperator Operator 80 "hi def link gnOperator Operator
79 81
80 syn sync minlines=500 82 syn sync minlines=500
81 83
82 let b:current_syntax = "gn" 84 let b:current_syntax = "gn"
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698