Wikia

Vim Tips Wiki

Script:2630

Talk0
1,610pages on
this wiki
Revision as of 07:43, November 15, 2011 by JohnBot (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

Around Wikia's network

Random Wiki