GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - jelera/vim-javascript-syntax: Enhanced javascript syntax file for Vim

BranchesTags
Open more actions menu

Latest commit

 

History

123 Commits
123 Commits

Folders and files

NameName
Last commit message
Last commit date
ftdetect
ftdetect
 
 
syntax
syntax
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

Enhanced JavaScript Syntax for Vim

Credits

  • Zhao Yi, Claudio Fleiner, Scott Shattuck (This file is based on their hard work)
  • gumnos (From the #vim IRC Channel in Freenode) (Who helped me figured out the crazy Vim Regexes)

Description

This file is a fork of this file and the stock one

This version of this file features the following text highlights:

  • Parenthesis, curly and regular brackets.
  • The semicolon or comma at the end of line.
  • Browser, DOM and "Ajax" keywords like objects, methods, properties and others.
  • Operation, comparison and logical symbols (=,==,===,!=,etc.).
  • Separate highlight of the arguments. Thanks to Billychan.

Rationale

While there are already a few syntax files in the wild (some even forks from this project), the goal is to have a syntax file that has current keywords for modern ES/JS development and to be fairly lean and quick on loading.

Screenshots

This is the stock Javascript syntax file

Solarized Light

Stock Vim JavaScript syntax file

This is with the Enhanced Syntax file Enhanced JavaScript Vim syntax

More screenshots here.

Hybrid

Stock Vim JavaScript syntax file

This is with the Enhanced Syntax file Enhanced JavaScript Vim syntax

Installation

  • Using Vim-Plug (Which I recommend), add this line to your .vimrc
Plug 'jelera/vim-javascript-syntax'
  • Using Vundle, add this line to your .vimrc
Plugin 'jelera/vim-javascript-syntax'
  • Using Pathogen, run this command in your shell
git clone https://github.com/jelera/vim-javascript-syntax.git ~/.vim/bundle/vim-javascript-syntax

Suggested Companion Plugins

  • Indentation The recommended way is to use Prettier and ALE.

It can be achieved with Javascript-Indent by Preston Koprivica. On my testing, it has proved to be the most capable and also indents HTML and JS inside HTML. The project is unmaintained for now, but you could fork it and improve upon it.

  • Autocompletion
    • Coc.vim, as it supports Language Server Protocol as VSCode.
    • Tern for Vim
  • Popular third-party libraries support like jQuery, YUI, Prototype, by javascript-libraries-syntax

Contributions

While all contributions are always welcome, make sure your commit message follow this convention.

License

The same as Vim

About

Enhanced javascript syntax file for Vim

www.vim.org/scripts/script.php?script_id=3425

Resources

Readme
MIT license

Code of conduct

Code of conduct
Activity

Stars

710 stars

Watchers

12 watching

Forks

132 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.