Live data from Hacker News

Intero for Emacs: complete interactive development program for Haskell

commercialhaskell.github.io

71–75 of 75 posts

Re: Intero for Emacs: complete interactive development program for Haskell

#71
post #36

Earlier quoted context omitted.

I had used IDE's, windows based text editors like UltraEdit, and vi/vim for the longest time before I decided it was time to go back to Emacs. I dedicated two weeks to using it almost exclusively to pick up the muscle memory of major keybindings. I haven't looked back since. The keys I really needed out of the gate: * F3/F4 - building macros, then C-x e to execute (after that, just plain e) * C-s - search * M-s o - o…

This list seems really useful for general emacs, but does not help for spacemacs which has it's own equivalents (with vim-ey keybindings). I've been using spacemacs for a few years as my editor every day, and have not needed any of these.

Ahh - thanks. I'm not a spacemacs user. In my mind I had that associated with one of those OSX specific builds for some reason.

Re: Intero for Emacs: complete interactive development program for Haskell

#72
post #10
post #6

Looks like I've got a choice to make (all on NixOS): + Stick with NeoVim and hope one of the Intero ports to that editor takes off (as I understand it there are a couple right now) + Switch to Emacs+Evil+Intero. I've never used Emacs before (even with Evil) so it would be a little work. If someone more up-to-date on the situation has advice that would be awesome:)

I don't know NixOS, but this blog post and lecture might help you give emacs a fair trial: http://blog.aaronbieber.com/2015/05/24/from-vim-to-emacs-in-... https://www.youtube.com/watch?v=JWD1Fpdd4Pc One of my vim-using coworkers found it. He, along with another colleague, have since found emacs compelling enough to use as their main text editor.

I spent a couple of days trying it out exclusively before giving up. Really nice all-in-all to keep me using it for so long, but eventually I ran into some big issues:

A) evil-mode doesn't support :next and :prev for navigating between filenames given on the commandline.

B) Emacs's mindset towards indentation fundamentally seems incompatible with Vi's.

  - Emacs
  RET - indent current line, then create new one
  TAB - indent current line

  - Vim
  RET - create new line and add indent to it
  TAB - insert some characters at point (nowhere else)
I tried to spend some time configuring it, but it's too hard to catch every language minor mode. Hitting tab sometimes moves forward two spaces, sometimes to the next mod-8 column and sometimes indents the current line, refusing to do anything else if it's already correct to Emacs's puny mind. It doesn't look like evil-mode is able to patch all the places this mindset leaks through.

A particularly egregious example is in the lisp minor-mode. Try this on a vanilla Emacs install without any startup files (I used v24.5.1 on OS X):

1. $ emacs x.lisp

2. Type in '; abc'. That's a lisp comment with a single comment leader semi-colon.

3. Hit enter.

The line gets right-justified to column 40 (5 tabs) before the cursor moves to the next line.

Apparently Emacs thinks all full-line comments in lisp should start with ';;'.

Needless to say, this behaves the same way even with evil-mode. I spent some time trying to track it down, but RET is just bound to vanilla newline, not indent-and-insert-newline or something like that. So I'll stop here.

Re: Intero for Emacs: complete interactive development program for Haskell

#73
post #10

Earlier quoted context omitted.

I don't know NixOS, but this blog post and lecture might help you give emacs a fair trial: http://blog.aaronbieber.com/2015/05/24/from-vim-to-emacs-in-... https://www.youtube.com/watch?v=JWD1Fpdd4Pc One of my vim-using coworkers found it. He, along with another colleague, have since found emacs compelling enough to use as their main text editor.

I spent a couple of days trying it out exclusively before giving up. Really nice all-in-all to keep me using it for so long, but eventually I ran into some big issues: A) evil-mode doesn't support :next and :prev for navigating between filenames given on the commandline. B) Emacs's mindset towards indentation fundamentally seems incompatible with Vi's. - Emacs RET - indent current line, then create new one TAB - inde…

> Apparently Emacs thinks all full-line comments in lisp should start with ';;'.

Not exactly. ;; aligns to the current indentation level of the code.

It's a usual Lisp indenting convention.

The Emacs Lisp manual recommends:

https://www.gnu.org/software/emacs/manual/html_node/elisp/Co...

Common Lisp uses it also. See the ANSI CL spec.

2.4.4.2.1 Use of Single Semicolon

Comments that begin with a single semicolon are all aligned to the same column at the right (sometimes called the “comment column”). The text of such a comment generally applies only to the line on which it appears. Occasionally two or three contain a single sentence together; this is sometimes indicated by indenting all but the first with an additional space (after the semicolon).

2.4.4.2.2 Use of Double Semicolon

Comments that begin with a double semicolon are all aligned to the same level of indentation as a form would be at that same position in the code. The text of such a comment usually describes the state of the program at the point where the comment occurs, the code which follows the comment, or both.

2.4.4.2.3 Use of Triple Semicolon

Comments that begin with a triple semicolon are all aligned to the left margin. Usually they are used prior to a definition or set of definitions, rather than within a definition.

2.4.4.2.4 Use of Quadruple Semicolon

Comments that begin with a quadruple semicolon are all aligned to the left margin, and generally contain only a short piece of text that serve as a title for the code which follows, and might be used in the header or footer of a program that prepares code for presentation as a hardcopy document.

Re: Intero for Emacs: complete interactive development program for Haskell

#74
post #73

Earlier quoted context omitted.

I spent a couple of days trying it out exclusively before giving up. Really nice all-in-all to keep me using it for so long, but eventually I ran into some big issues: A) evil-mode doesn't support :next and :prev for navigating between filenames given on the commandline. B) Emacs's mindset towards indentation fundamentally seems incompatible with Vi's. - Emacs RET - indent current line, then create new one TAB - inde…

> Apparently Emacs thinks all full-line comments in lisp should start with ';;'. Not exactly. ;; aligns to the current indentation level of the code. It's a usual Lisp indenting convention. The Emacs Lisp manual recommends: https://www.gnu.org/software/emacs/manual/html_node/elisp/Co... Common Lisp uses it also. See the ANSI CL spec. 2.4.4.2.1 Use of Single Semicolon Comments that begin with a single semicolon are al…

Wow, I can't believe I didn't know this after all this while hacking lisp. Many thanks.

Re: Intero for Emacs: complete interactive development program for Haskell

#75

Earlier quoted context omitted.

Have you tried company mode? I personally just use hippie-expand, but my codebases aren't gigantic; unsure how it'd work on larger ones.

What is company mode?

Company mode is complete anything mode and it gives you autocomplete that some people seem to like.
Post reply on HN