Re: [Haskell-cafe] indentation blues
For vim, there is a indent script, I don't remember exactly where I found it but it's on my github repo: https://github.com/ISF/dotfiles/blob/master/.vim/indent/haskell.vim (And don't forget the haskellmode for vim) Also, I've used the haskell mode of emacs with vimpulse to emulate vim motions. It is pretty good, indentation works out-of-the-box (except that you can't use indent-region), and the inferior handling works well. I still prefer vim to use with haskell, specially when editing my xmonad configuration. -- Ivan Sichmann Freitas GNU/Linux user #509059 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] indentation blues
Hello, TL;DR: If you have some time try emacs, the viper / vimpulse plugins are pretty good and the editor is awesome in general. Haskell indentation is good. I was a hardcore vim user and switched to emacs because the REPL for clojure was just aweful in vim. I am using the vi keybindings (viper-mode) and in addition vimpulse (which adds vim-like bindings on top of viper). It isn't a perfect vim emulation, but I would say it is good enough. All the keystrokes I use frequently work. The biggest frustration is that the viper-mode is not automatically turned on in many modes (check out viper-in-more-modes for that). I find the combination of emacs commands for the lesser used commands with vim keybings for text editing incredibly powerful. Apart from the keybind issues, emacs is a really awesome editor! I mean you will spend time at first learning and customizing it, but I wish I would have started sooner! There are a lot of features that are a huge leg up compared to vim (I love how 'files open' is distinct from 'file(s) currently shown in buffer(s)' for example) and if you want something it is probably out there. cheers Paul On Tue, Dec 13, 2011 at 12:14, Jean-Marie Gaillourdet j...@gaillourdet.netwrote: On 13.12.2011, at 11:43, Martin DeMello wrote: On Tue, Dec 13, 2011 at 2:34 AM, Adrien Haxaire adr...@haxaire.org wrote: Regarding, your question whether this is worth switching from vim to emacs. I've been using both editors for some years and I very much doubt, that you wouldn't spend much time learning emacs. If you are comfortable with vim, stick with it, unless you are interested in Emacs or one of its really great modes: org and auctex/reftex. Regarding, the vi emulations, I'd say they are nice should you ever be forced to use emacs for some time. But I don't recommend them, I've tried them all. They are not the real thing. Most of them are vi not vim emulators. And they always feel like second class citizens in emacs land. YMMW. Thanks for your feedback. I've never tried vim so I couldn't tell precisely. I thought the emulations were nice enough to save time learning emacs. If they are second class citizens, I agree it would be wiser to stick with vim then. yeah, i was assuming the emulations were nice enough to support my vim habits too. if they aren't, not even a good haskell mode would make emacs comfortable enough to use given my years of ingrained vim. I am not saying they are bad, but when I returned to emacs after two years of using vim, I was disappointed by their functionality and especially by the integration between third-party emacs-modes and the vi emulations. Though, I believe there is some work on new vim emulators. I am not sure on their status. They are probably no non-brainer option, yet. What I really liked about Claus Reinke's haskell-mode for vim was the ability to insert update statements with one command. Cheers, Jean ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] indentation blues
Paul Koerbitz paul.koerb...@gmail.com writes: Hello, TL;DR: If you have some time try emacs, the viper / vimpulse plugins are pretty good and the editor is awesome in general. Haskell indentation is good. Not to go too off topic, but I'm not sure people are aware there's another Vim emulation system called Evil: http://gitorious.org/evil/pages/Home Started March this year apparently, and should be the successor to vimpulse. - Ollie ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] indentation blues
Is the haskell-mode that comes out of the box with emacs (v 23.3) the one you folk use or do you use something more specific/uptodate? How to find out? [There should be a haskell-mode-version...] To the folks from the (hesitating) vi-camp: Whatever you use, please take time to familiarize yourself with ghci. Its my finding that the majority of vi aficionados imagine that programming is invariably tied to - having a main - built with make - run from a shell - back to vi This is way less performant than the tight feedback that an interpreter gives. And for that ghci in an 'inferior' emacs buffer is better than anything else (for me). However vi-users can (probably?) use two shells -- one for vi, one for ghci ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] indentation blues
On Mon, Dec 12, 2011 at 4:50 PM, Martin DeMello martindeme...@gmail.com wrote: The vim autoindent for haskell is really bad :( Is there a better indent.hs file floating around somewhere? Alternatively, is the emacs haskell mode better enough that it's worth my time learning my way around emacs and evil? I don't know what kind of indentation you're doing, but another solution is to use a simple indentation style, and indent manually. As a bonus, foldmethod=indent then works for folding. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] indentation blues
On Wed, Dec 14, 2011 at 5:56 AM, Rustom Mody rustompm...@gmail.com wrote: Is the haskell-mode that comes out of the box with emacs (v 23.3) the one you folk use or do you use something more specific/uptodate? How to find out? [There should be a haskell-mode-version...] To the folks from the (hesitating) vi-camp: Whatever you use, please take time to familiarize yourself with ghci. Its my finding that the majority of vi aficionados imagine that programming is invariably tied to - having a main - built with make - run from a shell - back to vi This is not how I work. I have source open in one window, and switch between files with keybindings for tags, search in same directory, search in recent buffers, switch between test and non-test module, etc. (and to the guy who likes how files open != buffers shown, yes vim does this too). ghci is open in the other window. :L loads the currently edited module into ghci. Then I edit and :r to typecheck or test a function by hand. Or I switch to the test module and run the test interactively until it passes. I have a number of other shortcuts to insert a type signature, automatically add and remove 'import' lines, exchange argument order, etc., but these few simple things already work pretty well. It also helps to have a tiling window manager and switch focus with the keyboard. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] indentation blues
Hello, On 13.12.2011, at 08:51, Adrien Haxaire wrote: Hello, I don't know how the indent.hs file works for the vim mode, but as you are asking for another indent.hs file, here is the link to the indent.hs file in emacs haskell-mode: https://github.com/jwiegley/haskell-mode/blob/8067b7547f047352c41af2374e3246b5504c7741/indent.hs Maybe you can use it in the vim mode ? If not, the emacs haskell mode is nice, and coming from vim you wouldn't spend much time learning emacs. there is also a vi emulator I think, though I haven't tested it. On Mon, 12 Dec 2011 16:50:24 -0800, Martin DeMello wrote: The vim autoindent for haskell is really bad :( Is there a better indent.hs file floating around somewhere? Alternatively, is the emacs haskell mode better enough that it's worth my time learning my way around emacs and evil? Yes, the haskell-emacs is nice. It provides two separate implementations of indentation engines: haskell-indent and haskell-indentation. And you can use emacs default indentation. I use haskell-indent because it considers the right indentation candidates for my coding style [1]. Regarding, your question whether this is worth switching from vim to emacs. I've been using both editors for some years and I very much doubt, that you wouldn't spend much time learning emacs. If you are comfortable with vim, stick with it, unless you are interested in Emacs or one of its really great modes: org and auctex/reftex. Regarding, the vi emulations, I'd say they are nice should you ever be forced to use emacs for some time. But I don't recommend them, I've tried them all. They are not the real thing. Most of them are vi not vim emulators. And they always feel like second class citizens in emacs land. YMMW. [1]: But I am not able to configure it to place where where I like it, indented by half the normal indentation width. Cheers, Jean ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] indentation blues
Regarding, your question whether this is worth switching from vim to emacs. I've been using both editors for some years and I very much doubt, that you wouldn't spend much time learning emacs. If you are comfortable with vim, stick with it, unless you are interested in Emacs or one of its really great modes: org and auctex/reftex. Regarding, the vi emulations, I'd say they are nice should you ever be forced to use emacs for some time. But I don't recommend them, I've tried them all. They are not the real thing. Most of them are vi not vim emulators. And they always feel like second class citizens in emacs land. YMMW. Thanks for your feedback. I've never tried vim so I couldn't tell precisely. I thought the emulations were nice enough to save time learning emacs. If they are second class citizens, I agree it would be wiser to stick with vim then. Adrien ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] indentation blues
On Tue, Dec 13, 2011 at 2:34 AM, Adrien Haxaire adr...@haxaire.org wrote: Regarding, your question whether this is worth switching from vim to emacs. I've been using both editors for some years and I very much doubt, that you wouldn't spend much time learning emacs. If you are comfortable with vim, stick with it, unless you are interested in Emacs or one of its really great modes: org and auctex/reftex. Regarding, the vi emulations, I'd say they are nice should you ever be forced to use emacs for some time. But I don't recommend them, I've tried them all. They are not the real thing. Most of them are vi not vim emulators. And they always feel like second class citizens in emacs land. YMMW. Thanks for your feedback. I've never tried vim so I couldn't tell precisely. I thought the emulations were nice enough to save time learning emacs. If they are second class citizens, I agree it would be wiser to stick with vim then. yeah, i was assuming the emulations were nice enough to support my vim habits too. if they aren't, not even a good haskell mode would make emacs comfortable enough to use given my years of ingrained vim. martin ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] indentation blues
On 13.12.2011, at 11:43, Martin DeMello wrote: On Tue, Dec 13, 2011 at 2:34 AM, Adrien Haxaire adr...@haxaire.org wrote: Regarding, your question whether this is worth switching from vim to emacs. I've been using both editors for some years and I very much doubt, that you wouldn't spend much time learning emacs. If you are comfortable with vim, stick with it, unless you are interested in Emacs or one of its really great modes: org and auctex/reftex. Regarding, the vi emulations, I'd say they are nice should you ever be forced to use emacs for some time. But I don't recommend them, I've tried them all. They are not the real thing. Most of them are vi not vim emulators. And they always feel like second class citizens in emacs land. YMMW. Thanks for your feedback. I've never tried vim so I couldn't tell precisely. I thought the emulations were nice enough to save time learning emacs. If they are second class citizens, I agree it would be wiser to stick with vim then. yeah, i was assuming the emulations were nice enough to support my vim habits too. if they aren't, not even a good haskell mode would make emacs comfortable enough to use given my years of ingrained vim. I am not saying they are bad, but when I returned to emacs after two years of using vim, I was disappointed by their functionality and especially by the integration between third-party emacs-modes and the vi emulations. Though, I believe there is some work on new vim emulators. I am not sure on their status. They are probably no non-brainer option, yet. What I really liked about Claus Reinke's haskell-mode for vim was the ability to insert update statements with one command. Cheers, Jean ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] indentation blues
The vim autoindent for haskell is really bad :( Is there a better indent.hs file floating around somewhere? Alternatively, is the emacs haskell mode better enough that it's worth my time learning my way around emacs and evil? martin ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] indentation blues
I am fairly new to haskell, but I really like the emacs haskell mode. It is a bit strict but it generally does what I want it to. Unfortunately I can't really compare to the haskell vim mode since I only did Scala and Perl back when I was a heavy vim user. The one useful thing that I can add is that there are some really good packages out there for modal vi keybindings in emacs. If you truly like the vim keybindings better then you can still use them in emacs. I hope that helps a little bit. On Tue, Dec 13, 2011 at 10:50 AM, Martin DeMello martindeme...@gmail.com wrote: The vim autoindent for haskell is really bad :( Is there a better indent.hs file floating around somewhere? Alternatively, is the emacs haskell mode better enough that it's worth my time learning my way around emacs and evil? martin ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] indentation blues
Hello, I don't know how the indent.hs file works for the vim mode, but as you are asking for another indent.hs file, here is the link to the indent.hs file in emacs haskell-mode: https://github.com/jwiegley/haskell-mode/blob/8067b7547f047352c41af2374e3246b5504c7741/indent.hs Maybe you can use it in the vim mode ? If not, the emacs haskell mode is nice, and coming from vim you wouldn't spend much time learning emacs. there is also a vi emulator I think, though I haven't tested it. Hope that helps, Adrien On Mon, 12 Dec 2011 16:50:24 -0800, Martin DeMello wrote: The vim autoindent for haskell is really bad :( Is there a better indent.hs file floating around somewhere? Alternatively, is the emacs haskell mode better enough that it's worth my time learning my way around emacs and evil? martin ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe