Live data from Hacker News

Mastering Emacs

masteringemacs.org

91–100 of 102 posts

Re: Mastering Emacs

#91
post #42

Earlier quoted context omitted.

Nope, don't do that. Learn to proper touch-type instead. Use your palms to press the ctrl keys. See: http://ergoemacs.org/emacs/swap_CapsLock_Ctrl.html . You can then use Ctrl+m instead of Enter at the command line, as well. Save both pinkies from the extra effort.

Using your palms to press the ctrl keys is only seriously possible on some curved keyboards. Everyone else, who prefers to touch keys with their fingers, like they were meant to, is going to do the sensible stuff and put the more frequently used modifier in the more easily-reachable place. All this press-ctrl-with-your-palms fad is a problem solved in the wrong place. And I have to say I dislike the tone of that page…

> All this press-ctrl-with-your-palms fad is a problem solved in the wrong place.

Total agreement from me, I consign this piece of advice to the same trash pile as !!NEVER USE ARROW KEYS!! ... cargo-culting nonsense.

Re: Mastering Emacs

#92

If you're on OSX and want a good Emacs, go to https://github.com/railwaycat/emacs-mac-port and read the installation instructions under the Homebrew section. It follows the official Emacs repo pretty closely, but has useful OSX additions (smooth scrolling, gesture support [font size e.g] and more).

I'm on OS X, but I just installed GNU Emacs from source and run it in a terminal window. Never really understood GUI versions of Emacs -- they seem to defeat the purpose of Emacs.

Oddly, I find the opposite to be true, although I can't really think of a good way to justify why.

I have a GUI emacs-server running that I can open buffers from via emacsclient for "serious editing", but I often end up using vim for quick edits rather than bother with emacs[client] and context-switching.

I imagine it might be different if I could get used to running my shells from inside emacs with eshell or ansi-term, but have never had any success getting them to work right and be usable.

Actually, one reason for preferring the GUI does stand out - quite a bit more freedom in key-bindings, especiallly with ns-cmd-modifier and friends, and some C- bindings that are otherwise impractical in console mode (at least to my knowledge)

Re: Mastering Emacs

#93

Earlier quoted context omitted.

Swap your CTRL and caps lock keys. It will make it a lot easier to use.

If emacs expects 3 modifier keys, and emacs is wildly popular with programmers, then why hasn't someone made a keyboard with the windows key renamed and remapped to the missing meta key?

I feel like if there was a "One True Emacs Keyboard", it would probably be something like http://mykeyboard.co.uk/microswitch/

Re: Mastering Emacs

#94
post #72

Earlier quoted context omitted.

> stage multiple files with a region or similar This feature has been available for some time, I believe. In magit-status, just select with region the files and then `s` to stage the highlighted files.

It's a little un-intuitive. Adding git-gutter to the mix will allow staging / reverting at the hunk level. I should probably note also that in Magit status, the user has to TAB the unstaged file to be able to do region or hunk level staging. Ideally it would be possible to do it in the buffer in question as well. Not even git-gutter has region style staging. Hopefully it will be implemented soon. I had a crack at it…

Thank you for this - git-gutter looks awesome. I wasn't aware of staging hunks too so I've learned about 2 things :)

Re: Mastering Emacs

#95
post #92

Earlier quoted context omitted.

I'm on OS X, but I just installed GNU Emacs from source and run it in a terminal window. Never really understood GUI versions of Emacs -- they seem to defeat the purpose of Emacs.

Oddly, I find the opposite to be true, although I can't really think of a good way to justify why. I have a GUI emacs-server running that I can open buffers from via emacsclient for "serious editing", but I often end up using vim for quick edits rather than bother with emacs[client] and context-switching. I imagine it might be different if I could get used to running my shells from inside emacs with eshell or ansi-te…

Since around 1999, my development workflow has been an IRC client, Emacs and various shells running inside a screen session. So it's not really context-switching for me -- Emacs is always live and running in there, so when I need to write or edit something, I just use it.

Re: Mastering Emacs

#96

I would personally recommend using vim bindings in emacs, as they are (in my opinion) easier to make sense of and more intuitive. However, I'm sure this book is a great resource for all the other stuff and it seems very well put-together.

I must ask you regular evil users this: how do you go about interacting with things (such as a REPL) with evil? I'm coming from vim and evil mode is great, but it feels somewhat clumsy to have to keep switching to insert mode to use a repl,doing stuff, going back to normal mode, then switching back to my code and editing it.

Re: Mastering Emacs

#97
post #67
post #66

Is it weird that I wish somebody would make a terminal-ized version of newer editors like Atom/ST/Brackets?

How else can you screen/tmux your work? Terminals ftw.

There are other client/server solutions than VT100 terminals. X11 being one of them. And you can run a remote Emacs server and connect to it via emacsclient without being constrained by several emulators as middlemen.

Plan 9's sam had a similar client/server switch, mostly because the programmers didn't really like a) character graphics and b) their host systems.

Re: Mastering Emacs

#98
post #97
post #67

Earlier quoted context omitted.

How else can you screen/tmux your work? Terminals ftw.

There are other client/server solutions than VT100 terminals. X11 being one of them. And you can run a remote Emacs server and connect to it via emacsclient without being constrained by several emulators as middlemen. Plan 9's sam had a similar client/server switch, mostly because the programmers didn't really like a) character graphics and b) their host systems.

That's a good point. I've never written a client that is "multi-interface re-entrant" like that (I have used and enjoyed emacs-client). The nice thing about character cell terminals is that all the terminal handling falls out for free: I don't need to accommodate for anything (like tmux, or remote access (like ssh)), it Just Happens.

Worth considering (or modeling) how I'd write an emacs-client type of application though.

Re: Mastering Emacs

#99

I would personally recommend using vim bindings in emacs, as they are (in my opinion) easier to make sense of and more intuitive. However, I'm sure this book is a great resource for all the other stuff and it seems very well put-together.

i use viper mode but with different keybindings (the most commonly used movement keys are under or near the home row, layed out geometrically): https://github.com/bshanks/viperre

Re: Mastering Emacs

#100
post #60

Earlier quoted context omitted.

Not quite the same. For instance, to duplicate a line in Emacs you have to go to the beginning of the line, kill it and then yank twice, and it doesn't even work always, particularly at the end of a buffer. In vi, it's just yyp. No corner cases.

Or you can go to the beginning of the line, press Control-space (set mark), press Control-e (end of line), then Meta-W (copy), and Control-y (paste).

Or you could use this: https://github.com/sawan/emacs-config/blob/e7e7635ca93589eda...

and bind it to a nice key binding.

Post reply on HN