Skip to content

Commit 6148d13

Browse files
author
Darrick Wiebe
committed
Merge pull request pangloss#48 from lepture/master
indentation support for html <script>
2 parents a599ac8 + 1066fb6 commit 6148d13

File tree

2 files changed

+591
-0
lines changed

2 files changed

+591
-0
lines changed

README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# vim-javascript
2+
3+
JavaScript bundle for vim, this bundle provides syntax and indent plugins.
4+
5+
> Indentation of javascript in vim is terrible, and this is the very end of it.
6+
7+
## Feature
8+
9+
1. very correct indentation for javascript
10+
2. support javascript indentation in html (provided by [lepture](https://github.com/lepture))
11+
12+
## Installation
13+
14+
- Install with [Vundle](https://github.com/gmarik/vundle)
15+
16+
If you are not using vundle, you really should have a try.
17+
Edit your vimrc:
18+
19+
Bundle "pangloss/vim-javascript"
20+
21+
And install it:
22+
23+
:so ~/.vimrc
24+
:BundleInstall
25+
26+
27+
- Install with [pathogen](https://github.com/tpope/vim-pathogen)
28+
29+
If you prefer tpope's pathogen, that's ok. Just clone it:
30+
31+
cd ~/.vim/bundle
32+
git clone https://github.com/pangloss/vim-javascript.git
33+
34+
## Configuration
35+
36+
[html indentation](http://www.vim.org/scripts/script.php?script_id=2075)
37+
provided by Andy Wokula is faster. But you need to make some configuration.
38+
39+
Suggested configuration:
40+
41+
```vim
42+
let g:html_indent_inctags = "html,body,head,tbody"
43+
let g:html_indent_script1 = "inc"
44+
let g:html_indent_style1 = "inc"
45+
```
46+
47+
Head over to [vim.org](http://www.vim.org/scripts/script.php?script_id=2075)
48+
for more information.
49+
50+
## Bug report
51+
52+
Report a bug on [GitHub Issues](https://github.com/pangloss/vim-javascript/issues).

0 commit comments

Comments
 (0)