1
1
# vim-javascript v0.10.0
2
2
3
- JavaScript bundle for vim, this bundle provides syntax and indent plugins.
3
+ JavaScript bundle for vim, this bundle provides syntax highlighting and
4
+ improved indentation.
4
5
5
- ## A Quick Note on Regexes
6
6
7
- Vim 7.4 was released recently, and unfortunately broke how this plugin
8
- handles regexes. There was no real easy way for us to fix this unless we
9
- completely rewrote how regexes work.
7
+ ## Installation
10
8
11
- Good News: There was a recent update to Vim 7.4 that fixes this issue.
9
+ ### Install with [ Vundle ] ( https://github.com/gmarik/vundle )
12
10
13
- Make sure you are at least using Vim 7.4, with patches 1-7.
11
+ Add to vimrc:
14
12
15
- If you are stuck on an older version of Vim 7.4 with no way to update,
16
- then simply perform the following commands to fix your current buffer:
13
+ Plugin 'pangloss/vim-javascript'
17
14
18
- ```
19
- :set regexpengine=1
20
- :syntax enable
21
- ```
15
+ And install it:
22
16
23
- ## Installation
17
+ :so ~/.vimrc
18
+ :PluginInstall
24
19
25
- ### Install with [ Vundle ] ( https://github.com/gmarik/vundle )
20
+ ### Install with [ vim-plug ] ( https://github.com/junegunn/vim-plug )
26
21
27
22
Add to vimrc:
28
23
29
- Plugin 'pangloss/vim-javascript'
24
+ Plug 'pangloss/vim-javascript'
30
25
31
26
And install it:
32
27
33
28
:so ~/.vimrc
34
- :PluginInstall
29
+ :PlugInstall
35
30
36
31
### Install with [ pathogen] ( https://github.com/tpope/vim-pathogen )
37
32
38
33
cd ~/.vim/bundle
39
34
git clone https://github.com/pangloss/vim-javascript.git
40
35
41
- ## Configuration
36
+
37
+ ## Configuration Variables
42
38
43
39
The following variables control certain syntax highlighting features. You can
44
40
add them to your ` .vimrc ` to enable/disable their features.
45
41
46
- #### javascript_enable_domhtmlcss
42
+ ```
43
+ let g:javascript_enable_domhtmlcss = 1
44
+ ```
47
45
48
46
Enables HTML/CSS syntax highlighting in your JavaScript file.
49
47
50
48
Default Value: 0
51
49
52
- #### b : javascript_fold
50
+ -----------------
53
51
54
- Enables JavaScript code folding.
52
+ ```
53
+ let g:javascript_ignore_javaScriptdoc = 1
54
+ ```
55
55
56
- Default Value: 1
56
+ Disables JSDoc syntax highlighting
57
57
58
+ Default Value: 0
58
59
59
- #### javascript_ignore_javaScriptdoc
60
+ -----------------
60
61
61
- Disables JSDoc syntax highlighting
62
+ ```
63
+ set foldmethod=syntax
64
+ ```
65
+
66
+ Enables code folding based on our syntax file.
67
+
68
+ Please note this can have a dramatic effect on performance and because it is a
69
+ global vim option, we do not set it ourselves.
62
70
63
- Default Value: 0
64
71
65
- #### Concealing Characters
72
+ ## Concealing Characters
66
73
67
74
You can customize concealing characters by defining one or more of the following
68
75
variables:
@@ -78,6 +85,7 @@ variables:
78
85
let g:javascript_conceal_super = "Ω"
79
86
let g:javascript_conceal_arrow_function = "⇒"
80
87
88
+
81
89
## Contributing
82
90
83
91
This project uses the [ git
@@ -88,10 +96,24 @@ the price of admission is 1 pull request. Please follow the general code style
88
96
guides (read the code) and in your pull request explain the reason for the
89
97
proposed change and how it is valuable.
90
98
91
- ## Bug report
99
+
100
+ ## Bug Reports
92
101
93
102
Report a bug on [ GitHub Issues] ( https://github.com/pangloss/vim-javascript/issues ) .
94
103
104
+
105
+ ## A Quick Note on Regexes
106
+
107
+ Vim 7.4 with patches LESS than 1-7 exhibits a bug that broke how we handle
108
+ javascript regexes. Please update to a newer version or run the following
109
+ commands to fix:
110
+
111
+ ```
112
+ :set regexpengine=1
113
+ :syntax enable
114
+ ```
115
+
116
+
95
117
## License
96
118
97
119
Distributed under the same terms as Vim itself. See ` :help license ` .
0 commit comments