Skip to content

Last minute tweaks #398

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 24, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 49 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,68 +1,75 @@
# vim-javascript v0.10.0

JavaScript bundle for vim, this bundle provides syntax and indent plugins.
JavaScript bundle for vim, this bundle provides syntax highlighting and
improved indentation.

## A Quick Note on Regexes

Vim 7.4 was released recently, and unfortunately broke how this plugin
handles regexes. There was no real easy way for us to fix this unless we
completely rewrote how regexes work.
## Installation

Good News: There was a recent update to Vim 7.4 that fixes this issue.
### Install with [Vundle](https://github.com/gmarik/vundle)

Make sure you are at least using Vim 7.4, with patches 1-7.
Add to vimrc:

If you are stuck on an older version of Vim 7.4 with no way to update,
then simply perform the following commands to fix your current buffer:
Plugin 'pangloss/vim-javascript'

```
:set regexpengine=1
:syntax enable
```
And install it:

## Installation
:so ~/.vimrc
:PluginInstall

### Install with [Vundle](https://github.com/gmarik/vundle)
### Install with [vim-plug](https://github.com/junegunn/vim-plug)

Add to vimrc:

Plugin 'pangloss/vim-javascript'
Plug 'pangloss/vim-javascript'

And install it:

:so ~/.vimrc
:PluginInstall
:PlugInstall

### Install with [pathogen](https://github.com/tpope/vim-pathogen)

cd ~/.vim/bundle
git clone https://github.com/pangloss/vim-javascript.git

## Configuration

## Configuration Variables

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

#### javascript_enable_domhtmlcss
```
let g:javascript_enable_domhtmlcss = 1
```

Enables HTML/CSS syntax highlighting in your JavaScript file.

Default Value: 0

#### b:javascript_fold
-----------------

Enables JavaScript code folding.
```
let g:javascript_ignore_javaScriptdoc = 1
```

Default Value: 1
Disables JSDoc syntax highlighting

Default Value: 0

#### javascript_ignore_javaScriptdoc
-----------------

Disables JSDoc syntax highlighting
```
set foldmethod=syntax
```

Enables code folding based on our syntax file.

Please note this can have a dramatic effect on performance and because it is a
global vim option, we do not set it ourselves.

Default Value: 0

#### Concealing Characters
## Concealing Characters

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


## Contributing

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

## Bug report

## Bug Reports

Report a bug on [GitHub Issues](https://github.com/pangloss/vim-javascript/issues).


## A Quick Note on Regexes

Vim 7.4 with patches LESS than 1-7 exhibits a bug that broke how we handle
javascript regexes. Please update to a newer version or run the following
commands to fix:

```
:set regexpengine=1
:syntax enable
```


## License

Distributed under the same terms as Vim itself. See `:help license`.
6 changes: 0 additions & 6 deletions syntax/javascript.vim
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ if !exists('g:javascript_conceal')
let g:javascript_conceal = 0
endif

"" Drop fold if it is set but VIM doesn't support it.
let b:javascript_fold='true'
if version < 600 " Don't support the old version
unlet! b:javascript_fold
endif

"" dollar sign is permittd anywhere in an identifier
setlocal iskeyword+=$

Expand Down