My config files
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Buddy Sandidge b2743054e9 Squashed 'vim/bundle/javascript/' changes from d2ccd306f..f71693e27
f71693e27 cleanup (#1099)
73f3d0f2c don't move cursor to find case statement (#1097)
44581860e improve last commit
e110653ae fix for unnested js in <script>
d3d8a9772 cleaning (#1096)
4c0a55442 matchend
7c73d8e1f better conditional for comment
f3bf70a84 date
ee990797a fix chaining arrows scope (#1087)
0922d26d1 dont re-add to cache (#1081)
f973b6f84 Fix jsObjectKey for keys that start with numbers
85804bbfc optimize
a0e1442d8 cleaning (#1079)
b2935feeb make elseif
1f65d0dbd remove unneeded redeclaration
cea724c0e move html var decl
8eba14157 move comment
4a8f6f714 b var making
77e4bf814 one time sourced
0f1f71f2f PToken() optimize (#1070)
3b21b5bad Add WeakSet to syntax keywords (#1069)
7145139cf jsx context fix (#1068)
4bd734e3b more accurate do->while (#1062)
e55c27ea8 Changed recommended foldmethod setting in README (#1061)
9404db5b8 clean: remove cursor call (#1060)
3ed61c9d4 adding optional chaining operator (#1053)
b58952e97 (fix) Match no argument arrow functions (#1059)
e5769400a cleanup of syntax regexes (#1057)
fcef6389a missed
30dcd712a nonstandard multichar ops (#1054)
9802bca51 fill cache holes (#1052)
bc86cbb38 forward parse for switch statement (#1051)
de388ef09 bugfix: skipexpr
1ff6ac3b5 fix class method name (#1049)
9bb06bf1c Update javascript.vim
aeb10fb76 date, to submit to vim/vim
465bff545 use l:var
7709a995b unneed (#1046)
aca57d9a8 keep number type, clean
a32b7b049 remove timeout arg (#1045)
6f3d40cfc fix 'of' keyword in IsBlock() (#1044)
7043d1030 more code erasing (#1043)
c217c783b misc (#1042)
9c3945000 clean (#1041)
00624225c use &synmaxcol (#1039)
7198f32de raise line length guard
1795998a7 Update ISSUE_TEMPLATE.md
93d56325f Update ISSUE_TEMPLATE.md
7da26c25b fix md
745344246 emphasize code snippet
a4fd0773b clean, eval string type,etc (#1036)
31232fe53 collection regex, various (#1035)
ee376ba5c reuse more code, various fixes
867c3ccdb Whitespace
0149cb12b Fix yield in parens
bc60e0d00 Correctly highlight function bodies with an unnamed, generic function.
c737dd7b9 shorthand method: refactor (#1030)

git-subtree-dir: vim/bundle/javascript
git-subtree-split: f71693e2784594a378930e261955a85ea37dd03d
7 years ago
after/ftplugin Squashed 'vim/bundle/javascript/' changes from 3093f26be..e9a59c877 8 years ago
compiler Squashed 'vim/bundle/javascript/' changes from e9a59c877..d2ccd306f 8 years ago
extras Squashed 'vim/bundle/javascript/' changes from e9a59c877..d2ccd306f 8 years ago
ftdetect Squashed 'vim/bundle/javascript/' changes from e9a59c877..d2ccd306f 8 years ago
indent Squashed 'vim/bundle/javascript/' changes from d2ccd306f..f71693e27 7 years ago
syntax Squashed 'vim/bundle/javascript/' changes from d2ccd306f..f71693e27 7 years ago
ISSUE_TEMPLATE.md Squashed 'vim/bundle/javascript/' changes from d2ccd306f..f71693e27 7 years ago
README.md Squashed 'vim/bundle/javascript/' changes from d2ccd306f..f71693e27 7 years ago

README.md

vim-javascript

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

Installation

Install with pathogen

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

alternatively, use a package manager like vim-plug

Configuration Variables

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


let g:javascript_plugin_jsdoc = 1

Enables syntax highlighting for JSDocs.

Default Value: 0


let g:javascript_plugin_ngdoc = 1

Enables some additional syntax highlighting for NGDocs. Requires JSDoc plugin to be enabled as well.

Default Value: 0


let g:javascript_plugin_flow = 1

Enables syntax highlighting for Flow.

Default Value: 0


augroup javascript_folding
    au!
    au FileType javascript setlocal foldmethod=syntax
augroup END

Enables code folding for javascript based on our syntax file.

Please note this can have a dramatic effect on performance.

Concealing Characters

You can customize concealing characters, if your font provides the glyph you want, by defining one or more of the following variables:

let g:javascript_conceal_function             = "ƒ"
let g:javascript_conceal_null                 = "ø"
let g:javascript_conceal_this                 = "@"
let g:javascript_conceal_return               = "⇚"
let g:javascript_conceal_undefined            = "¿"
let g:javascript_conceal_NaN                  = ""
let g:javascript_conceal_prototype            = "¶"
let g:javascript_conceal_static               = "•"
let g:javascript_conceal_super                = "Ω"
let g:javascript_conceal_arrow_function       = "⇒"
let g:javascript_conceal_noarg_arrow_function = "🞅"
let g:javascript_conceal_underscore_arrow_function = "🞅"

You can enable concealing within VIM with:

set conceallevel=1

OR if you wish to toggle concealing you may wish to bind a command such as the following which will map <LEADER>l (leader is usually the \ key) to toggling conceal mode:

map <leader>l :exec &conceallevel ? "set conceallevel=0" : "set conceallevel=1"<CR>

Indentation Specific

  • :h cino-:
  • :h cino-=
  • :h cino-star
  • :h cino-(
  • :h cino-w
  • :h cino-W
  • :h cino-U
  • :h cino-m
  • :h cino-M
  • :h 'indentkeys'

Contributing

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. All p.r.'s will be reviewed by a maintainer(s) then, hopefully, merged.

Thank you!

License

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