11# vim-javascript v0.10.0
22
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.
45
5- ## A Quick Note on Regexes
66
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
108
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 )
1210
13- Make sure you are at least using Vim 7.4, with patches 1-7.
11+ Add to vimrc:
1412
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'
1714
18- ```
19- :set regexpengine=1
20- :syntax enable
21- ```
15+ And install it:
2216
23- ## Installation
17+ :so ~/.vimrc
18+ :PluginInstall
2419
25- ### Install with [ Vundle ] ( https://github.com/gmarik/vundle )
20+ ### Install with [ vim-plug ] ( https://github.com/junegunn/vim-plug )
2621
2722Add to vimrc:
2823
29- Plugin 'pangloss/vim-javascript'
24+ Plug 'pangloss/vim-javascript'
3025
3126And install it:
3227
3328 :so ~/.vimrc
34- :PluginInstall
29+ :PlugInstall
3530
3631### Install with [ pathogen] ( https://github.com/tpope/vim-pathogen )
3732
3833 cd ~/.vim/bundle
3934 git clone https://github.com/pangloss/vim-javascript.git
4035
41- ## Configuration
36+
37+ ## Configuration Variables
4238
4339The following variables control certain syntax highlighting features. You can
4440add them to your ` .vimrc ` to enable/disable their features.
4541
46- #### javascript_enable_domhtmlcss
42+ ```
43+ let g:javascript_enable_domhtmlcss = 1
44+ ```
4745
4846Enables HTML/CSS syntax highlighting in your JavaScript file.
4947
5048Default Value: 0
5149
52- #### b : javascript_fold
50+ -----------------
5351
54- Enables JavaScript code folding.
52+ ```
53+ let g:javascript_ignore_javaScriptdoc = 1
54+ ```
5555
56- Default Value: 1
56+ Disables JSDoc syntax highlighting
5757
58+ Default Value: 0
5859
59- #### javascript_ignore_javaScriptdoc
60+ -----------------
6061
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.
6270
63- Default Value: 0
6471
65- #### Concealing Characters
72+ ## Concealing Characters
6673
6774You can customize concealing characters by defining one or more of the following
6875variables:
@@ -78,6 +85,7 @@ variables:
7885 let g:javascript_conceal_super = "Ω"
7986 let g:javascript_conceal_arrow_function = "⇒"
8087
88+
8189## Contributing
8290
8391This project uses the [ git
@@ -88,10 +96,24 @@ the price of admission is 1 pull request. Please follow the general code style
8896guides (read the code) and in your pull request explain the reason for the
8997proposed change and how it is valuable.
9098
91- ## Bug report
99+
100+ ## Bug Reports
92101
93102Report a bug on [ GitHub Issues] ( https://github.com/pangloss/vim-javascript/issues ) .
94103
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+
95117## License
96118
97119Distributed under the same terms as Vim itself. See ` :help license ` .
0 commit comments