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

Gonna take advantage of having an emacs wizard around -

I love vscode, but agreed, it's bog-slow sometimes, especially when I run in ubuntu. I'm looking around at emacs and I like what I'm seeing, but something that perhaps seems silly is still a bit of a turn off for me - it's pretty effing ugly. I don't mean in the theme sense, I mean in all the stuff cluttering the codepanes.

In VScode I usually ctrl+k z for "zen mode," where the only thing you see is the tabs of your open files, and the code. ctrl+shift+e opens my file explorer when I need it, ctrl+b puts it away (or ctrl+p to go straight to a filename). Same for terminal, ctrl+`, do a git thing, ctrl+` buh bye. Anything similar for emacs? That level of quick control over the UI?




You can easily do that in emacs.

Throw this in your init.el

(scroll-bar-mode -1)

(tool-bar-mode -1)

(menu-bar-mode -1)

(global-linum-mode 0)

And it will instantly look a lot cleaner. If you want to toggle it you can turn it into a function and bind it to a key.


> (scroll-bar-mode -1)

...what? You're gonna take away the scrollbar just like that? Implying that the scrollbar is worthless? Scrollbar is very important to me at least, (especially a well-implemented one). It gives me a quick and instant visual understanding of how big the file is, where I am currently in the file, etc. The only improvement I have seen on the scrollbar is Sublime's minimap... I knew there exist emacs methods to get it working, but I could not get it to work (on Windows) in less than a few days so that's of no use to me.


The wonderful thing about the list provided by your parent is that it's optional. Pick and choose the pieces you want. Those may not be the same pieces your parent wants. Fortunately both of you can choose without inconveniencing the other.


Worth noting also, with the default settings, Emacs tells you what your position is in the buffer in the mode line (Top, Bot, All, or a percent), so the scroll bar is redundant as a visual indicator.


There is two default UI elements in my emacs config:

Line numbers on the left and two lines at the bottom. One for the status bar and one for the "mini buffer" (where you put commands, search text, and receive short messages). Everything else is just the buffer (file) I am editing. You could turn the line numbers off with a simple configuration and key binding if you wanted, along with all the other UI elements.

This goes to the "Zen" of my emacs config. Its always just the buffer I am editing unless I need another dialog or UI element. The trick to making this work with no tree based folder explorers are Projectile and Helm. Projectile adds "project" concept to emacs and Helm adds fuzzy searching of everything almost everywhere that matters. Both can be taught to work around git repos. So you can say, whack some keys and see a list of files in your project. Then start fuzzy matching in the helm buffer that results by typing say three letters of a file. If its unique you press enter. File is open. If I really need a tree or explore a directory there is `dired` mode which lets you walk around the file system. There are even tree modes that I find pointless after using helm and projectile.

There is nothing built in by default. That is the biggest problem with emacs. You don't just sit down at it one day and get a polished environment that fits with what you like. It is something that is worked at. You eventually learn at least a little elisp and your customization powers keep growing. Eventually you either quit emacs or are good enough at lisp and configuring it that it becomes obvious, if not trivial, to do most things other editors can do.

Generally speaking it is almost certain you can customize it if you are asking a question like, "Can I do X.". Everything in emacs, even configuration dialogs are just text buffers. You just teach emacs how to interpret different text buffers in different ways to implement special functionality. Most of the heavy lifting of integration with most languages is already done if your language is remotely popular.

This was a long answer, but that goes to the heart of emacs. If you want a zen mode, emacs is there for you. You want a mode with weird little widgets and build output things everywhere, emacs has your back. :)


You can make your Emacs setup minimalistic by hiding the toolbar and scrollbar. This blog post gives a pretty good starting setup. https://emacs-doctor.com/emacs-strip-tease.html

C-x C-f opens files, but will also open a file explorer if the path is a directory. The 'q' key will immediately close the file explorer. I'm not sure about git interaction. I usually just use the Emacs shell to enter git commands.


Magit in emacs is highly recommended.


Just get emacs prelude and configure it to use helm everywhere. It is so close to my previous custom emacs setup that I just install prelude now on a new system and run with it.


I guess I never understood the custom emacs distributions for long time users. If you had a system that worked... lugging it around isn't hard. It is usually a few hundred lines of elisp plus packages, which you can freeze and zip up and they are probably going to work on an emacs release 5 or 6 years in the future.

I don't worry about it cause I just backup my .emacs.d and restore it anywhere I plan on editing very long. My whole .emacs.d with tons of modes and add ons is 73MB.

There /is/ something to be said with not making a mess of your initialization file and customizations. It is also very possible to keep glomming addons in and eventually get to a difficult place where various elements of extensions/modes/packages are fighting and that can be frustrating and I can see why many turn to well tuned emacs distributions.




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

Search: