Discussions » Development

Suggest a userscript editor with live syntax checking, especially brackets matching

§
Posted: 2015-10-20
Edited: 2016-07-27

Suggest a userscript editor with live syntax checking, especially brackets matching

I'd like to replace Firefox's Scratchpad as a userscript editor in Greasemonkey.
I'd prefer a standalone editor (for windows).

I've noticed that GreasyFork uses the Ace editor in the 'Post new script' form.
I've been trying it and it's so useful!!
It offers live syntax checking (uses jshint for Javascript) via webworker ), and especially which brackets are unmatched.
Unfortunately, it can only used embedded (and also it's available in the Cloud9 online IDE).
There's no standalone version for it for Windows.

Could you please suggest any standalone editor for Windows that offers these features?


I also have Notepad++ and Vim but both lack them (here are Notepad++ plugins).
I've also tried Atom, by installing either of 2 extra packages; jshint or linter-jshint .



I'd prefer an editor that a full-featured IDE
And BTW, what editor do you use? (especially when working with large userscripts)

woxxomMod
§
Posted: 2015-10-21
Edited: 2015-10-21

Try Firefox Developer Edition.

Chrome/Chromium also offers a built-in editor where you can add a folder from disk into devtools -> Sources -> rightclick -> Add workspace. See Workspaces - Persistent authoring in the DevTools. Sometimes I also use Snippets in the same panel. See Authoring & development workflow for hotkeys, tricks and gimmicks.

And the best is probably Webstorm which has several options to use it for free, but I don't write big scripts so I'm ok with the built-in Tampermonkey editor (CodeMirror) mostly, it's also used in Greasemonkey's editor where it's even better due to autocomplete.

Deleted user 12
§
Posted: 2015-10-21
Edited: 2015-10-21

My setup:
- Sublime Text 3 for editing
- git for version control
- make for automating stuff (installing, uploading, etc.)

There are a ton of plugins for SublimeText. Follow the instructions on https://packagecontrol.io/ to set up easy installation of plugins. The plugins you should check out are BracketHighlighter and SublimeLinter (+ sublimelinter-jshint).

§
Posted: 2015-10-24
Edited: 2016-02-27

wOxxOm, I use Firefox Nightly excursively. I just have Chrome installed. Based on your tips, I'll try it too, while creating scripts (and even Webstom when I get the chance). Thank you!

kuehlschrank, thanks a lot! I tried Sublime Text 3 and it's great! So fast, and with these plugins it's great.

I've been trying Atom, too (with git), and it's very good too.
One thing in Atom that I like better than in Sublime Text (ST) is that, when the cursor is in a line where errors are present, it shows them as as a tooltip, while ST shows them only in statusbar. But, luckily, this feature is going to be implemented to ST too (1, 2). Also note that the package bracket-matcher in Atom is installed by default (it's a "Core" package).

§
Posted: 2015-10-28

I'm using Atom as my preferred IDE of choose. Out-of-the-box Atom offers many useful features, but with it vastly expanding packages list you can extend Atom very easily.

§
Posted: 2015-11-06
Edited: 2015-11-09

I'm using Atom as my preferred IDE of choose. Out-of-the-box Atom offers many useful features, but with it vastly expanding packages list you can extend Atom very easily.

Thanks for the reply. My choice is between Sublime Text and Atom.

§
Posted: 2015-11-16
Edited: 2016-02-29

Just wanted to tell about that I found ESLint (and using it via plugins sublimelinter-eslint and linter-eslint(Atom)).
It's like having JSHint and JSCS together (i.e. style checking too).
It's very extensible, every rule can be disabled, and it offers extra rules that other linters haven't.
http://www.sitepoint.com/comparison-javascript-linting-tools/

I use it with its 'recommented' rules set enabled.

§
Posted: 2016-02-27
Edited: 2016-02-29

Two new features of ESLint:

  1. --fix (since v1.10.3) This option instructs ESLint to try to fix as many issues as possible. The fixes are made to the actual files themselves and only the remaining unfixed issues are output.
  2. Autoconfiguration (since v2.0.0) The --init option has been enhanced with a new ability: autoconfiguration. Now, in addition to answering a questionnaire or using a popular shareable config, you can also specify files to inspect to generate your configuration. This will create a configuration file that is based on the most common patterns found in your code. Read more about this feature in IanVS's blog post.

And, for those that you'd like to make Atom look as close as possible to Sublime Text: (I still prefer Sublime Text though)

  1. Install the Monokai theme
  2. Set in Settings|Font Size from 14(the default value) to 13.
  3. Set in Settings|Line Height from 1.5(the default value) to 1.2.
§
Posted: 2016-02-27

I'm using Atom as my preferred IDE of choose. Out-of-the-box Atom offers many useful features, but with it vastly expanding packages list you can extend Atom very easily.

Thanks also for that. Will be testing this

Post reply

Sign in to post a reply.