Fandom

Vim Tips Wiki

Script:2630

1,624pages on
this wiki
Add New Page
Talk0

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Use this page to discuss script 2630 jsl: compiler plugin for JavaScript Lint

  • Add constructive comments, bug reports, or discuss improvements (see the guideline).
  • Do not document the script here (the author should do that on vim.org).
  • This page may be out of date: check the script's vim.org page above, and its release notes.

Suggested improvementsEdit

Command line params are currently Windows-specific. Compiling javascript-lint on Linux gives slightly different command line syntax. Fix is as follows:

--- a/.vim/compiler/jsl.vim	Wed Feb 16 14:30:57 2011 +0000
+++ b/.vim/compiler/jsl.vim	Wed Feb 16 14:57:03 2011 +0000
@@ -43,7 +43,11 @@
     endif
     return (! empty(l:configFilespec) && filereadable(l:configFilespec) ? ' -conf "' . l:configFilespec . '"' : '')
 endfunction
-execute 'CompilerSet makeprg=jsl\ --nologo\ --nofilelisting\ --nosummary' .  escape(s:JslConfig(), ' "\') . '\ $*\ $*\ \"%\"'
+if has ('win32') || has ('win64')
+	execute 'CompilerSet makeprg=jsl\ -nologo\ -nofilelisting\ -nosummary' .  escape(s:JslConfig(), ' "\') . '\ $*\ -process\ $*\ \"%\"'
+else
+	execute 'CompilerSet makeprg=jsl\ --nologo\ --nofilelisting\ --nosummary' .  escape(s:JslConfig(), ' "\') . '\ $*\ $*\ \"%\"'
+endif
 unlet s:scriptDir
 
 " sample output:
Which version are you referring to? The latest available for download is 0.3.0, which seems to accept both - as well as -- arguments. -- Inkarkat 14:41, February 21, 2011 (UTC)
$ jsl

JavaScript Lint 0.3.0 (JavaScript-C 1.5 2004-09-24)
Developed by Matthias Miller (http://www.JavaScriptLint.com)

Usage: jsl [-help:conf]
        [-conf filename] [-process filename] [+recurse|-recurse] [-stdin]
        [-nologo] [-nofilelisting] [-nocontext] [-nosummary] [-output-format ______]

CommentsEdit

Also on Fandom

Random Wiki