I've been using Emacs for 32 years (hard to believe) and never knew about this incredible but apparently obscure feature of Emacs.
On my 27" cinema display, even using 12pt Monaco for my tired old eyes for extreme legibility, I can get 4-5 columns of 90 lines each, when editing source files or text, for an effective "screen length" of 360-450 lines. With 10pt, you can get 500+ lines "on screen" easily.
But still learning Emacs, I still run it in viper mode. My old habits die hard. I love to troll the other unix admins at work with vi keybindings in emacs.
I'm assuming you aren't rotating your screen under linux, xinerama isn't very robust on things like that.
If you're using Monaco, I assume you're on a Mac, so you can get plenty of practice with the default key bindings, as OS X respects the basic emacs/readline bindings everywhere you can type.
Discovering M-x apropos was probably the moment I realised emacs wasn't at all scary, and in fact just wanted to help and make me productive. A big hurdle with any text editor is having the discipline to realise that if you're doing something repetitive and boring, you're probably doing it wrong. All the built in documentation and help functions in emacs give you a big head start finding the right way to do what you're doing, and you'll just randomly pick up useful stuff along the way.
Beyond that, it's just finding what modes are useful for you. Magit is incredible, org-mode's great if you do that sort of thing, and any language with a REPL thrives under emacs.
Most people I know just learn enough elisp to keep their .emacs up to date, so don't be too intimidated by that, but more power to you if you eventually master it.
Oh, probably started them 10-15 years ago. Hard to say.
I started around 1978 or so with Emacs on ITS (MIT-AI lab Incompatible Timesharing System), which was built in TECO. So those files wouldn't be very useful. ;-)
Then moved to TOPS-20 Emacs in 1979-1980, then to Unix Emacs (Gosmacs) for a while in the early 80's, then, finally to the One True Emacs (Gnu Emacs) in the mid-80's on Sun workstations.
I don't highly customize Emacs at all, actually. I tend to like a mostly vanilla installation that I can run in terminal mode both locally in Terminal (OS X) and remotely via ssh without even thinking about it.
Undo is actually 2, C-/. And not all key combinations are created equal. I'd argue that I can hit C-S-j faster than you can hit F1 (especially with caps lock as control)
Undo is also mapped to C-/ by default, IIRC.
About the window switching, I've remapped it to M-o, and M-1, M-2 and M-3 to do splits, etc (I use this more often than repeat commands, so it makes sense)
Out of curiosity and seeing as you have considerable experience with Emacs, what do you do, keyboard-wise (e.g. remapping, custom hardware, or just the defaults?)?
Mostly defaults--I only have a handful of custom keybindings, most of them a carry-over from the old ITS/Twenex Emacs defaults, since I have editing finger habits which are decades old. (It's wonderful that you can get most of the basics in every Cocoa-based edit field in OS X.)
I wouldn't even call myself an Emacs power user. I've written a modicum of Emacs Lisp, but nothing major.
Custom hardware? Hoo boy, let's not go down that road, too off-topic. ;-) Well, OK, the best keyboard ever made by the Hand of Man is the old Tom Knight AI Lab keyboard (google "Tom Knight Keyboard" and you'll find lots of info). The particular recipe that Microswitch (Honeywell) developed for that generation of keyboards, based on (highly expensive) Hall-effect mechanical switches, is still unparalleled to this day--it had a sort of preternaturally comfortable throw. I even bought one of the Microswitch Symbolics-style keyboards from a custom run (for about $600) at LLNL back in the early 80's, and hacked up a Sun-1 CPU board to read the keyboard's up/down parallel encoding to produce ascii serial out, I was so attached to that quality of keyboard. (Didn't hurt that I could map all the Shift/Meta/Super/Hyper/Network shift keys to the appropriate escape sequences ;-). Had to give it up when ascii terminals died out; sigh.
Since then, I've kinda given up, but the Thinkpad keyboards from a few years back were exceptional (don't know if Lenovo has kept the quality up lately), and the latest-generation Apple flat-topped short-throw keyboards are also exceedingly fast and accurate for typing. But none of them come close the pure tactile nirvana of those old Microswitch keyboards.
You can still find some of those incredible Microswitch keys on older ATMs. They were designed for millions of abusive presses before failure.
I agree about the Thinkpad keyboards. Also, a relative had a Dell 8100 laptop that I used extensively for a while, and its keyboard was very "fast" and comfortable, for me. I think Dell's keyboard quality has gone down since then.
These days, I tend to prefer good laptop keyboards. I like the short throw; also, many of them have a more precise and consistent action than the mass produced detached keyboards.
I'm not familiar enough with the recent Apple keyboards, although I will complain about their (and others') laptop designs of recent years that place the keyboard at the back of a "huge" shelf of real estate often also having a sharp front edge. (Those features bother my wrists no end, particularly when I don't have control over the height of the work surface.)
I've spent time on a variety of stuff going back to DEC terminals (and some yet older stuff I no longer recall). Actually, of older stuff, one of my favorite keyboards was the one that came with my Kaypro. I don't suppose its switches were all that "de luxe", but it was very smooth and I could really move on it without tiring. And/or I was younger ;-) and spent enough time with it specifically to become rather accustomed to its feel.
As for Emacs, every time I start, I quickly tire of its key combination and the discomfort they cause me. I suppose I should try one or another remapping, but I end up switching programs before I get that far. Perhaps if I'd started with it when I was younger, I would have built up a requisite flexibility and muscle memory more rapidly than discomfort.
(As for obsession, I now find the screen and keyboard two of the most important features of a system. It doesn't matter how fast it is, if it's a pain to look at and makes typing an undue exercise.)
If you like short throw keyboards you might want to give Cherry a try. I don't think they are very popular in the US (pretty big in Europe). I haven't found anything better than the Cherry eVolution STREAM XT and I try out every keyboard I can get my hands on.
And they are dirt cheap, too. I get a new one every year or so and fresh out of the box, it's like keyboard nirvana.
I've seen the name Cherry, but I didn't realize they offered that kind of a product. I'll have a look -- thanks!
P.S. Actually, for a desktop system, I've recently been using a Kensington Ci73. The keyswitches aren't as good as I'd like, but they're better than many. Also an inexpensive unit.
I've thought about getting a Thinkpad (now Lenovo) detachable keyboard, but the reviews weren't positive enough to make me "push the button", as it were. It appears to glitch with speedy typing. Also, it has one of those shelves, although the 2nd revision while dropping the integrated touchpad may (or may not) have beaten the shelf back to a more manageable size.
For the price, and with the reported glitches, I'd want to try one hands-on, before purchasing. Though I may change my mind on that.
It's a nice approximation, but it's also a hack—it doesn't take 'scrolloff' into account, and once you scroll too far in one of the windows they lose synchronisation.
Edit: You can record a macro to do something similar—create a vertical split, switch to it, disable scroll-bind, go forwards one screen, enable scrollbind, then switch to the other window. This doesn't lose synchronisation but it doesn't take 'scrolloff' into account either.
I try to not be surprised by the power and flexibility of Emacs. Having been impressed so much over the years, I've tried to come to know it as simply "awesome". That said, it's hard to not be impressed when it shows itself as even more awesome, even when you thought you were prepared for that eventuality ;)
2. balance the windows (so each takes up equal amount of space)
3. turn on line highlighting
Line highlighting helps because when using follow-mode it can become difficult to quickly spot where the cursor is without it (e.g. if you do an incremental search, the cursor could end up in any one of the many windows).
You can find the functions I wrote here, search for functions that end in "-and-follow":
What I'd like to have is a function that dynamically opens just enough windows so that the entire file you are editing is entirely visible (possibly with an upper limit for number of windows that can be set).
Will the cursor automatically swap between the buffers when you reach the edge? (e.g. buffer 1 is showing page 1 and buffer 2 is showing page 2; when you get the end of page 1, the cursor/focus switches to buffer 2, rather than it just being two independently scrolling views into the same file)
That's right--this is not just multiple views on one file/buffer, this is multiple views that are synchronized to follow one another, to give you the full effect of one long view.
What you've pointed out (Clone File) is part of the most basic functionality of Emacs. Splitting a window in 2 and opening the same file in both windows. It's the follow part that makes this, well, follow-mode.
That said, I guess it's almost impressive that Sublime lets you "Clone", since TextMate is even more restricted in this regard, iirc. That's actually kind of sad, though.
Thanks for the post! The way I solved this problem in the past was to rotate one of my monitors 180 degrees. People always make comments when they walk into my cube for the first time, but you sure can fit a lot of txt on the screen. Maybe now I can go back to a normal orientation on my monitor.
This would be good to build into the windowing system so it could apply to any application. Split any application window horizontally or vertically and put the two parts where you like on the screen.
I don't think that people give this situation enough credit. I once took over a project of about 30,000 lines of C++, with only about one line of commenting per 1,000 lines; and was frustrated with a lot of tools/documentation/suggestions that amounted to "don't write code like that". (Doxygen ended up being my friend)
I'd rather have too long than too short. I got some code recently where 3 lines was about the longest function (for a loop), and many functions were one line. It was nearly impossible to follow what was going on because you could never catch the "flow" of the code.
On my 27" cinema display, even using 12pt Monaco for my tired old eyes for extreme legibility, I can get 4-5 columns of 90 lines each, when editing source files or text, for an effective "screen length" of 360-450 lines. With 10pt, you can get 500+ lines "on screen" easily.
Docs: http://www.gnu.org/software/libtool/manual/emacs/Follow-Mode... .