fredhutchio / intro-bioinformatics

Website and slides for intro to bioinformatics class at Fred Hutch
http://fredhutchio.github.io/intro-bioinformatics/
12 stars 7 forks source link

Switch from nano to jed? #34

Open metasoarous opened 8 years ago

metasoarous commented 8 years ago

@bcclaywell brought up this idea today. Might make things easier for folks on the editor front. Main downside I see is that jed won't be as standard on installs, while nano is. I think I'll be sold though if I can figure out a way to have it give us smarter indentation and copy/paste action.

matsen commented 8 years ago

Hmmmm.....

You aren't happy with the autoindent from set autoindent?

metasoarous commented 8 years ago

The autoindent is fine for typing in, but pasting becomes a huge mess. There isn't the equivalent of a :paste mode.

matsen commented 8 years ago

Aha.

What about using cat >> file?

metasoarous commented 8 years ago

Yeah... that involves some context switching between cat vs nano, and doesn't work except at the end of the file. But it's worth a think. As a plus, it serves as a cool example of using stdin directly...

metasoarous commented 8 years ago

See 15 here: http://fossies.org/linux/jed/doc/txt/jed_faq.txt.

Looks like this could be a solution to the paste problem, so I'm inclined to go for it in the next class. I know it's not standard, and there's some value in being familiar with nano, but I feel like we're creating a painful experience and shouldn't be. My sense is that since jed is really just a thin emacs, it could smooth transition to the more powerful tools available there (though of course, I'm loath to increase the dark side's numbers and distract our flock from the salvation of vi).

I'd appreciate @bcclaywell's thoughts on this since he's an emacs user.

matsen commented 8 years ago

Do you mean next course session or next class like in a week?

matsen commented 8 years ago

Just posted this issue on Twitter so hopefully someone will come in with a brilliant idea.

metasoarous commented 8 years ago

My inclination is next course session, but it's up for discussion I suppose. The python sections are where we've had the most trouble with that in the past. But ideally, we'd have them using just one editor throughout the whole course to avoid confusion.

matsen commented 8 years ago

I agree. Just checking.

atombaby commented 8 years ago

jed uses alt-bindings which can be really tricky in different environments (e.g. using NX, etc.). Often times upstream window managers will "catch" that alt-combo. Not sure how that works if you've a Windows user. Using the Mate terminal I can turn off alt for menu shortcuts which helps me, but I'm not sure how that'd work on another platform or through NX

nano does have an indent mode that looks to paste in stuff without screwing up the indent levels. On my workstation (Ubuntu Trusty using Mate) it's ALT-I, so we're back to that goofiness with window managers possible trapping the meta key. Syntax highlighting is working for me with python

I did see this longer discussion on the software carpentry list... no solid answers there unfortunately. Though most seemed agreed that vim is cruel to teach to novices (with which I concur). Of course, I have to search how to exit emacs every time I accidentally start it.

bcclaywell commented 8 years ago

I like the idea of using an editor that would pave the way to using something more powerful. As far as I know, nano's key bindings are unique to it and pico, so anyone who wanted to switch away from nano would have to learn something entirely new anyway. jed's key bindings cover the basics and are very similar to Emacs's, so transitioning from jed wouldn't be too painful.

When @matsen asked me a while back if we should just teach Emacs, my first thought was that the concept of using multiple keystrokes to accomplish something might be difficult to adjust to. On second thought it's not that different to how Word was before ribbons -- I remember using Alt-f to open the file menu and then s to save, for example, despite the existence of Ctrl-s.

@atombaby It's actually nano's auto-indent mode that interferes with pasting, but I didn't know there was a shortcut (Alt-I) to toggle it. That's good to know! As far as Alt trapping, couldn't they use Esc instead, as in the jed quick reference I linked above?

atombaby commented 8 years ago

anyone who wanted to switch away from nano would have to learn something entirely new anyway. jed's key bindings cover the basics and are very similar to Emacs's, so transitioning from jed wouldn't be too painful.

As much as I find the notion of raising a generation of emacs users distasteful (I kid), that's a good point. vim's "moving or editing" approach is not super intuitive and leads to significant frustration with newbies.

@atombaby It's actually nano's auto-indent mode that interferes with pasting, but I didn't know there was a shortcut (Alt-I) to toggle it. That's good to know! As far as Alt trapping, couldn't they use Esc instead, as in the jed quick reference I linked above?

Sorry, mistyped that. I actually have that problem with vim as well, have to turn off auto-indent for pasting. And it looks like esc is a meta-key in nano as well, so esc-i will work for toggling indent.

matsen commented 8 years ago

Holy moses!

http://techcrunch.com/2016/03/30/be-very-afraid-hell-has-frozen-over-bash-is-coming-to-windows-10/

metasoarous commented 8 years ago

Wat.

I don't even...

Wat?