Skip to content

Commit af08aae

Browse files
committed
Merge pull request #398 from amadeus/last-minute-tweaks
Last minute tweaks
2 parents c438302 + 48067d6 commit af08aae

File tree

2 files changed

+49
-33
lines changed

2 files changed

+49
-33
lines changed

README.md

Lines changed: 49 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,75 @@
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

2722
Add to vimrc:
2823

29-
Plugin 'pangloss/vim-javascript'
24+
Plug 'pangloss/vim-javascript'
3025

3126
And 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

4339
The following variables control certain syntax highlighting features. You can
4440
add them to your `.vimrc` to enable/disable their features.
4541

46-
#### javascript_enable_domhtmlcss
42+
```
43+
let g:javascript_enable_domhtmlcss = 1
44+
```
4745

4846
Enables HTML/CSS syntax highlighting in your JavaScript file.
4947

5048
Default 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

6774
You can customize concealing characters by defining one or more of the following
6875
variables:
@@ -78,6 +85,7 @@ variables:
7885
let g:javascript_conceal_super = "Ω"
7986
let g:javascript_conceal_arrow_function = "⇒"
8087

88+
8189
## Contributing
8290

8391
This project uses the [git
@@ -88,10 +96,24 @@ the price of admission is 1 pull request. Please follow the general code style
8896
guides (read the code) and in your pull request explain the reason for the
8997
proposed change and how it is valuable.
9098

91-
## Bug report
99+
100+
## Bug Reports
92101

93102
Report 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

97119
Distributed under the same terms as Vim itself. See `:help license`.

syntax/javascript.vim

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@ if !exists('g:javascript_conceal')
1616
let g:javascript_conceal = 0
1717
endif
1818

19-
"" Drop fold if it is set but VIM doesn't support it.
20-
let b:javascript_fold='true'
21-
if version < 600 " Don't support the old version
22-
unlet! b:javascript_fold
23-
endif
24-
2519
"" dollar sign is permittd anywhere in an identifier
2620
setlocal iskeyword+=$
2721

0 commit comments

Comments
 (0)