File tree 3 files changed +29
-25
lines changed
3 files changed +29
-25
lines changed Original file line number Diff line number Diff line change 1
1
The MIT License (MIT)
2
2
3
- Copyright (c) 2015 Evan Sheehan
3
+ Copyright (c) 2015 Evan Sheehan, Eduardo San Martin Morote
4
4
5
5
Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
of this software and associated documentation files (the "Software"), to deal
Original file line number Diff line number Diff line change 3
3
Vim syntax highlighting for [ Vue
4
4
components] ( http://vuejs.org/guide/application.html#Single_File_Components ) .
5
5
6
- ## Installation
7
-
8
- ### Install with [ Vundle] [ ]
9
-
10
- Add this line to your vimrc:
6
+ This was initially forked from
7
+ [ darthmall/vim-vue] ( https://github.com/darthmall/vim-vue ) . I already have an
8
+ implementation for this but found his code much cleaner. That's why I created a
9
+ new version instead of a PR.
11
10
12
- ` Plugin 'darthmall/vim-vue' `
13
-
14
- Then reload your vim configuration and run ` PluginInstall ` :
11
+ ## Installation
15
12
16
- ``` vim
17
- :source ~/.vimrc
18
- :PluginInstall
19
- ```
13
+ ### Install with [ Vundle] ( https://github.com/VundleVim/Vundle.vim )
20
14
21
- ### Manual Installation
15
+ ` Plugin 'posva/vim-vue' `
22
16
23
- ``` bash
24
- $ git clone https://github.com/darthmall/vim-vue.git
25
- $ cp vim-vue/ftdetect/vue.vim ~ /.vim/ftdetect/
26
- $ cp vim-vue/syntax/vue.vim ~ /.vim/syntax
27
- ```
17
+ ## Contributing
28
18
29
- [ Vundle ] : https://github.com/gmarik/Vundle.vim
19
+ If your language is not getting highlighted open an issue or a PR with the fix.
20
+ You only need to add some lines to the ` syntax/vue.vim ` file.
Original file line number Diff line number Diff line change 1
1
" Vim syntax file
2
- " Language: Vue.js
3
- " Maintainer: W. Evan Sheehan
2
+ " Language: Vue.js
3
+ " Maintainer: Eduardo San Martin Morote
4
4
5
5
if exists (" b:current_syntax" )
6
6
finish
7
7
endif
8
8
9
9
syntax include @HTML syntax/html.vim
10
10
unlet b: current_syntax
11
- syntax region template keepend start =/ <template\( lang="[a-zA-Z]\+ "\)\? >/ end =" </template>" contains =@HTML fold
11
+ syntax region template keepend start =/ <template>/ end =" </template>" contains =@HTML fold
12
+
13
+ syntax include @JADE syntax/jade.vim
14
+ unlet b: current_syntax
15
+ syntax region jade keepend start =/ <template lang="[^"]*jade[^"]*">/ end =" </template>" contains =@JADE fold
12
16
13
17
syntax include @JS syntax/javascript.vim
14
18
unlet b: current_syntax
15
- syntax region script keepend start =/ <script\( lang="[a-zA-Z]\+ "\)\? >/ end =" </script>" contains =@JS fold
19
+ syntax region script keepend start =/ <script>/ end =" </script>" contains =@JS fold
20
+
21
+ syntax include @COFFEE syntax/coffee.vim
22
+ unlet b: current_syntax
23
+ " Matchgroup seems to be necessary for coffee
24
+ syntax region coffee keepend matchgroup =Delimiter start =" <script lang=\" coffee\" >" end =" </script>" contains =@COFFEE fold
16
25
17
26
syntax include @CSS syntax/css.vim
18
27
unlet b: current_syntax
19
- syntax region style keepend start =/ <style\( lang="[a-zA-Z]\+ "\)\? >/ end =" </style>" contains =@CSS fold
28
+ syntax region style keepend start =/ <style\( \+ scoped\)\? >/ end =" </style>" contains =@CSS fold
29
+
30
+ syntax include @stylus syntax/stylus.vim
31
+ unlet b: current_syntax
32
+ syntax region stylus keepend start =/ <style lang="[^"]*stylus[^"]*"\( \+ scoped\)\? >/ end =" </style>" contains =@stylus fold
20
33
21
34
let b: current_syntax = " vue"
You can’t perform that action at this time.
0 commit comments