Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Split JS Code & new modes #4
I've added JS & CSS modes. It inspects the file extension and loads the modes for css, js & php files.
Thanks Wieczo for your contribution.
I will download your fork and take it for a test drive later today.
I have another version of this plugin in development that unfortunately I haven't yet uploaded to Github. The new version has the following improvements:
So if you really want to help with this plugin then hold out to see the new version in development. I'll get it on github today!
I'm not happy with hardly any of the current desktop editors out there and I'm sure if a few people contribute to WPide together we could create an awesome WP editor.
I've uploaded your fork to a WordPress site and it works well.
When I first created this plugin for simplicities sake I just used the basic PHP mode as that on it's own seemed like a massive improvement on the standard editor. I did plan to make it change mode depending upon the file extension but not sure when I would have got round to it.
When editing a JS or CSS file now it's awesome. Not only is the syntax highlighting miles better but it's also checking the syntax and even giving advise on best practice!
So JS and CSS are great but PHP just doesn't seem to have the same level of syntax checking, I can miss off a semicolon and it doesn't even show it up as a problem. Does something else need implementing for PHP syntax checking and advice to show?
I'm just going to upload the new dev version any time now.
I'll merge your pull request once we confirm what is going on with the PHP mode and then I'll upload it to the WordPress SVN.
I think you need to create a worker to check for syntax errors and the like; I am looking at the code of ACE and can't figure out how to write one.
edit: If I understand ACE right, modes are for highlighting and workers are for syntax and style checks.
I've uploaded the v2dev branch.
It needs some work to make it ready for release on the WordPress plugin directory but it does work. The main issue I see right now is to do with the tabbed editing (multiple ace editor sessions). If you do a ctrl+z to undo then you get unexpected results, it's like all tabs undo. I think for every editor session there needs to be an associated history/undo session.
I'll merge your last pull request into 1.0.3 and push that to the WordPress plugin directory/repo.
As for the save shortcut could you just put that onto v2dev? Have a look at the dev branch anyway and let me know what you think. I think it's definitely a step forward and the sooner that can be released the better.