Hacker News new | ask | show | jobs
by jlarocco 4801 days ago
I can give a few, but I also think it's something that needs to be experienced to really "get it".

At work I have to use a proprietary version control and build system (don't ask), and it was relatively easy to hook it into Emacs.

We also have an internal website with a cross referenced, hyperlinked version of the code. I have a function to launch a browser and go to the cross reference site for the symbol under the cursor.

One of our coding conventions is that the .h file for a class named ClassName is ClassName.h. When I use a class I haven't used before, I have a keyboard shortcut to add the #include for me. If I miss one, the compile error jumps right to the class name and I use the keyboard shortcut - it takes about 2 seconds.

I have a function that will take whatever text I've highlighted and launch a web browser doing a search in DuckDuckGo for that text.

I have a function to run the selected text through Python and replace the selection with the result. If I type 4+5 I can select it, press Ctrl + Alt + P and it gets replaced with 9.

By default Emacs opens *.h files in C mode. I have a function that checks whether there's more .cpp files or .c files in the same directory and sets C++ or C mode appropriately. I replaced the default behavior with my version, so it happens automatically.

I could go on all day.

Having a fully programmable editor means that if I ever find myself doing the same thing more than a few times, I can automate it. It means that if I don't like the way Emacs does something I can change it. Customization in most other editors is limited by the editor's plugin API. There's no such limitation in Emacs.

2 comments

In the end, personal taste is what counts. All of these you mentioned can be done in Sublime Text as well.

I used emacs for 2 years, than switched to Sublime Text 2. All of the shortcuts I use is available via emacs package, and due to it's extensive API, I can add the functionality I want, with python, my favourite language.

Emacs is much more extensible than Sublime Text for sure. On the other hand, Sublime Text's extensibility is enough for my needs.

Mind sharing your config?