Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Even configuring Emacs through the .emacs file I find that it treats things different enough from Vim that it's painful to try and switch. Every once in a while I get excited that maybe I'll switch, but then I pretty quickly fall back to Vim.

There are so many things in Vim that 'just make sense', at least to my way of thinking. Things like tabs. Why is it that in Emacs you can't just define a soft tabstop of 4 spaces? Why do I have to define a list of column numbers? Don't get me wrong, the idea that I could manually define a bunch of column numbers so that the tabstops were uneven for a particular application would is cool... by why can't I just say "every 4th column is a tabstop" and have Emacs apply that until infinity columns? And there is the lack of things like Vim's ":set list" mode to quickly visualize if a bunch of spacing consists of tabs, spaces or a mixture (and to quickly figure out where trailing whitespaces are).

These are all things that I can get on default Vim without any configuration. I'm sure these are all programmable in Emacs -- it is a full-on lisp engine afterall -- but it's too steep of a climb for me (or at least has been thus far) when I'm already productive with Vim.



(assuming cc-mode) Set c-basic-offset to 4.

Even better, if you don't like the way anything's indented, move the cursor to that spot and hit C-c C-o and it'll tell you why it's indented that line that way, and you can adjust those parts as you wish.

If you're not in cc-mode, then.. it's lisp. Repeating sequences of multiples of 4 are pretty easy to write in a function that generates them.


Not being a huge lisp person, are there lazy-evaluating lists in lisp? So that I could define the tabstop sequence to be a list that would continually be evaluated, but only as far as the calling function was asking for (like Haskell)? Otherwise, there is still a finite end to the list even if I can easily generate a ridiculously long sequence automatically.


I don't believe there's anything in the Common Lisp standard for it, but I think lazy lists should be implementable with macros.


Nope, strict eval only. Just define a max, and if you hit it, raise it.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: