Coder Social home page Coder Social logo

Comments (6)

kaizhu256 avatar kaizhu256 commented on May 26, 2024

from jslint.

bunglegrind avatar bunglegrind commented on May 26, 2024

Mmm...I don't think it's working...the command is correctly registered but it does not output anything

from jslint.

bunglegrind avatar bunglegrind commented on May 26, 2024

expand("<sfile>:p:h") gives you the path of the directory you're in, not the path of .vim or vimfiles, because it is inside a function. You may:

  1. let the user set the path in a variable in .vimrc
  2. Take the first path of the runtime variable
  3. mimic a closure using a dictionary function (I'm not fluent in vimscript, so you should check its feasibility http://ujihisa.blogspot.com/2010/11/something-like-closure-for-vim-script.html )

from jslint.

kaizhu256 avatar kaizhu256 commented on May 26, 2024

Mmm...I don't think it's working...the command is correctly registered but it does not output anything

  • it worked fine for me in windows 10.
  • removed folder ~/.vim/ and file ~/.vimrc from my home directory
  • in git-bash ran following script to setup ~/vimfiles/ and ~/.vimrc:
(set -e
    mkdir -p ~/vimfiles/
    cd ~/vimfiles/
    curl -O "https://www.jslint.com/jslint.mjs"
    curl -O "https://www.jslint.com/jslint_wrapper_vim.vim"
    ls -la ~/vimfiles/
    #
    cd ~/
    printf ":source ~/vimfiles/jslint_wrapper_vim.vim\n" > .vimrc
    ls -la ~/.vimrc
)
  • opened both vim from command-line and gvim, and both ran jslint fine from folder ~/vimfiles/

image

from jslint.

kaizhu256 avatar kaizhu256 commented on May 26, 2024

can you download the alpha-version @ https://raw.githubusercontent.com/jslint-org/jslint/alpha/jslint_wrapper_vim.vim and see if it works?

from jslint.

bunglegrind avatar bunglegrind commented on May 26, 2024

can you download the alpha-version @ https://raw.githubusercontent.com/jslint-org/jslint/alpha/jslint_wrapper_vim.vim and see if it works?

I've just replaced jslint_wrapper_vim.vim with the alpha version and now it works! Thanks!

from jslint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.