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

Switch from nano to jed? #34

Open
metasoarous opened this issue Feb 23, 2016 · 14 comments
Open

Switch from nano to jed? #34

metasoarous opened this issue Feb 23, 2016 · 14 comments

Comments

@metasoarous
Copy link
Member

@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.

@metasoarous metasoarous changed the title Switch from nano Switch from nano to jed? Feb 24, 2016
@matsen
Copy link
Contributor

matsen commented Feb 24, 2016

Hmmmm.....

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

@metasoarous
Copy link
Member Author

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

@matsen
Copy link
Contributor

matsen commented Feb 24, 2016

Aha.

What about using cat >> file?

@metasoarous
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Contributor

matsen commented Mar 9, 2016

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

@matsen
Copy link
Contributor

matsen commented Mar 9, 2016

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

@metasoarous
Copy link
Member Author

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
Copy link
Contributor

matsen commented Mar 9, 2016

I agree. Just checking.

@atombaby
Copy link

atombaby commented Mar 9, 2016

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
Copy link
Contributor

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
Copy link

atombaby commented Mar 9, 2016

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
Copy link
Contributor

matsen commented Mar 30, 2016

@metasoarous
Copy link
Member Author

Wat.

I don't even...

Wat?

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

No branches or pull requests

4 participants