Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto compile #16

Merged
merged 5 commits into from
Jan 4, 2013
Merged

Auto compile #16

merged 5 commits into from
Jan 4, 2013

Conversation

madscoaducom
Copy link
Contributor

Hi,

really enjoy experimenting with Elm, and I like your learn-by-example / no-install approach (although installing Elm locally was straight forward as well).

While working with the online examples and trying to tweak them I found myself going through the documentation several times to try and find what I was looking for. So I want to see if some of CodeMirrors features can be used to make it even easier to experiment with and learn Elm.

This is a small step which includes two features:

  • keyboard shortcut to compile: use Ctrl+Enter in the editor to update the output pane
  • auto compile: automatically update the output frame when user pauses typing. This is off by default.

The pull request also updates CodeMirror to version 3.0, as I think it is best to work from the latest release when venturing to other things, like inline documentation (which I wanted to take a stab at).

  - Add trimmed down codemirror 3.0 package
  - Move elm specific changes from CodeMirror 2.13
  - Update editor css according to upgrade guide
  - Make compile script executable under unix/linux
  - Git ignore ghc output and Server executable
  Removed unused files
  Rename haskell mode to elm
@evancz
Copy link
Member

evancz commented Jan 4, 2013

Very cool! I am going through the changes now.

I guess the only things I have questions about are the cosmetic changes. Like you uncommented some code in the Elm syntax highlighting file, but that stuff is somewhat Haskell specific. It appears that the current line marker is out (just looking at the code). What is the reasoning here? Is this generally personal preference? Just curious :)

The important variable is the timeout on auto-compile and it looks like I can tweak that very easily.

@evancz
Copy link
Member

evancz commented Jan 4, 2013

Looks great! Nice work!

evancz pushed a commit that referenced this pull request Jan 4, 2013
@evancz evancz merged commit 2dc1004 into elm:master Jan 4, 2013
@madscoaducom
Copy link
Contributor Author

Thanks!

With regards to the syntax highlighting. I took the updated haskell highlighter from codemirror 3.0 and tried to merge in your changes, but must have missed the commented-out section. Thanks for spotting that, you can re-disable this part if you want. Same goes for the current line marker - sorry about that

@madscoaducom
Copy link
Contributor Author

And the change in the editor css is because Codemirror has changed how they pickup the height of the editor element, see http://codemirror.net/doc/upgrade_v3.html

@madscoaducom madscoaducom deleted the auto-compile branch January 5, 2013 09:08
@evancz
Copy link
Member

evancz commented Jan 15, 2013

Thanks again! This change kicked me into cleaning up the editor quite a bit. I actually ended up enabling a bunch of different color schemes and did some trickery with cookies to save the editor settings between sessions.

@madscoaducom
Copy link
Contributor Author

You are welcome, and yes I already noticed your changes - it looks really
good.

I am currently working on a feature to enable inline documentation lookup.
I hope to have something ready to show you and the other Elm'ers later this
week.

On Tue, Jan 15, 2013 at 10:21 PM, Evan Czaplicki
notifications@github.comwrote:

Thanks again! This change kicked me into cleaning up the editor quite a
bit. I actually ended up enabling a bunch of different color schemes and
did some trickery with cookies to save the editor settings between sessions.


Reply to this email directly or view it on GitHubhttps://github.com//pull/16#issuecomment-12289927.

@evancz
Copy link
Member

evancz commented Jan 15, 2013

Thanks :D Someone was suggesting exactly this feature just yesterday, so I am doubly excited to see it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants