Hacker News new | past | comments | ask | show | jobs | submit login

As a passing note: afaik Vim can edit files larger than (used) memory―thanks to the mechanism of 'swap files.' The same feature also allows it to restore the editing state after a power failure, even if the changes weren't saved to the original file (it possibly even restores the undo history, but I'm not sure about that).

I didn't think too much about this feature until I moved to Emacs looking for the sane scripting. Turns out, it's very nice to not need a hex editor to open a large file, and to have all editor features you're used to instead.




There's an Emacs extension for that (called vlf or vlfi).


Splendid, thanks! Should've thought of looking in plugins.

Though, from the description it sounds like it's still rather awkward compared to Vim's transparent handling. But I'll have to try it and see.


Yeah, Emacs doesn't have plugins as such. It's a Lisp system, and programs, packages, and modes can modify or extend that system. From what I could tell about vlf, it runs pretty seamlessly, aside from a prompt when you open a large enough file.


I remember reading a xkcd where they say: there is an Emacs command for everything. -- Seems there is an Emacs extension for everything too :)


The secret is that lots of Emacs commands actually call Elisp code, not the internals of the editor―you can invoke help on a command and then navigate to the code of the function.

(I have to confess that this sometimes comes useful in adding customization to those commands.)


Emacs blew my Goddamned mind one day when I was using M-. to examine the Lisp implementations of various Emacs commands. One day I dug a little too far and tried to examine the source to what turned out to be an Emacs primitive -- but that didn't slow down M-., which happily jumped straight into the Emacs C source to show me the implementation of the primitive. (I had compiled this Emacs on my own, and apparently it remembered where it was compiled.)


Thanks for the clarification. I have to learn those magics someday.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: