Hacker News new | ask | show | jobs
by bitexploder 3135 days ago
It is difficult to even describe a productive hand tuned to fit the individual Emails setup compared to standard.

Here are some of my favorite Emacs things:

Helm + Projectile. Helm will fuzzy complete almost anything in Emacs. Projectile is project management. Together get to any Git repo and file there in very quick. Helm is an option to compare to IDO. I rarely use IDO due to Helm.

Magit, widely regarded as a good Git UI. Using is believing. Better than command line or most GUIs for me.

Various editing nodes are good enough (Python, Lisp of course, Markdown).

Org mode is it's own beast, but if you like outlines and productivity tools Org is very nice. I use it, not extensively. It holds my todos and meeting notes and makes it easy to ha e very complex notes in one doc.

Basic text editing. I think Vi has some things it does better than Emacs here, but it is still very powerful and rewards learning the finer details.

Realizing you are in a Lisp machine. A calculator is no further than your Emacs window. Learning to hack Lisp and elisp is its own reward.

I think the time spent learning it is worth it. I think the math checks out in terms of efficiency. I also know Emacs is not going anywhere. Same with Vi.

There is much more to it all, but these are things off the top of my head. There are many smaller things that connect up how I work via Emacs... But there is a lot to it.

10 comments

I love Emacs. But there were no good multimodes 3 years ago. And autocompletion and hints are often a bitch to get working on things which are not C or C++.

The moment you start editing files containing more than one language you're pushed to use a dedicated IDE. And then you discover the joy of "good enough". No need to tinker with config files to get the perfect setup: it works good enough to give you a productivity boost out of the box.

Really? I installed Spacemacs and everything "just works". Python, Javascript, Clojure, and Ruby only required to add the appropriate layer to my .spacemacs and restart the editor. Autocomplete, jump to definition, find usages, refactoring, documentation lookups and hints, etc. Spacemacs has been equal to or better than IntelliJ, Eclipse, Atom, VisualStudio Code, Kate, or Sublime out of the box.

which-key being integrated everywhere has made discovery the easiest of ANY editor/IDE I've used. Imagine if there was a consistent place where the menu would pop up if you faltered any key combination. If I'm trying to go a git command in Android Studio (InteliJ) and I forget the command, I don't get part way through and see a popup list of contextual actions. I'm left to move my mouse to the right place, click, and then hope to find my git action in the menu I picked.

More common is the unified way that helm makes dealing with files (you can find similar things in Sublime / Atom / Vim distributions using Unite (or whatever they used these days)). Even though the better editors have this, it's not universal and still a differentiating factor for usability and consistency.

Spacemacs integrates Magit by default. Magit is the first version control interface complete enough that doesn't make me immediately nope out into a terminal for proper git commands.

In my primary projects, I need to edit XML, Clojure, YAML, SQL, Java, Makefiles, and Python files. Spacemacs handles syntax highlighting, autocomplete, refactoring, repl connection and evaluation (where available), project management (makefiles and maven support), and documentation lookups.

+1
I came to the same realization about Vim about a year ago. I've used Sublime and Vim/Nvim extensively, and I've spent at least a few hours in Textmate, Emacs, Spacemacs, Notepad++, VS Code, and Atom as well.

All of those text editors above have some excellent and unique redeeming qualities. But at the end of the day their actual language support tends to be weak.

Now I do Python work in Pycharm, R work in Rstudio, and SQL work in whatever IDE goes with my database engine. I use Nvim as my system $EDITOR but at work I'm using it less and less often. I love it and I'll never give it up, but it's becoming more of a hobby tool than something that helps me get things done.

I'm hopeful that https://github.com/Microsoft/language-server-protocol will decouple some of these concerns. We've built support for it for our DSL, and it's pretty great so far (esp in VSCode). Emacs LSP support is still pretty slow, so I don't use it when in emacs at present, but it feels like the right direction for getting good language support into editors.
LSP seriously gives me hope for the future. It is an awesome project, and I'm looking forward to seeing more widespread editor support for it.

It's still fairly new so most solutions I've seen that use it still have some sharp edges.

PyCharm is excellent.

I've gone pretty deep into both vim and emacs over the years, and so it always hurts a little when something like PyCharm comes along, and it works better, and does more out of the box than any finely tuned emacs/vim setup (which often take significant time investments).

You should really give the IdeaVIM plugin a try. I use it in several Intellij editors, PyCharm included, and it is terrific. It has a few quirks and discrepencies from VIM, but it is a far better text editor than the editor that comes stock in any other IDE.
I'm grudgingly coming along.

I use vim for everything, but Intellij (because we have the licenses; I mainly use it for Python at the moment) has my attention. Wish I had more time to learn it; it has been a couple of months and I still don't feel really comfortable. But the capabilities actually make a difference.

Vim is never going away for me; muscle memory, if nothing else, ensures it will always be the most efficient way for me to type text and I spend most of my time in the terminal anyway. And as nice as it was when it was my go-to for everything, there are times when a special purpose editor has a place.

Though not perfect webmode is usable for multimode editing.
I mean, I use autocomplete for work in python, ruby, golang, C/C++, JavaScript, coffeescript, CSS and probably more in enacts.

The trick is the setup, but I've only had problems with minor edge cases (like coffeescript 2). Either way I'll spend an hour and use Elisp to fix it. Really nothing I've found is even close to as robust

I've been using spacemacs for nearly 2 years now and autocomplete has mostly always worked right out of the box after installing the corresponding layer. I rarely even need to reboot Emacs.
I'm reading this on Spacemacs right now! It's excellent - it removes a lot of the initial configuration investment required to be productive, while letting you customize as deeply as you want if that's necessary. Plus, it has vim keybindings out of the box ;)
Just curious... Does spacemacs only offer Vim keybindings, or does it support Vim macros as well?
Evil mode itself allows for keyboard macros. I do believe there are ex-mode things that won't work but most users never even touch this stuff (i.e. if you press Q in vi/vim).

Spacemacs by extension integrates evil mode entirely, so keyboard macros are available.

If you think vi does basic text editing better, try Spacemacs! I switched over recently (the emacs pinky was real...) and I've really gotten to like the vim-y experience (although now I get really frustrated when I vim on a server and the search doesn't work like Spacemacs search).
I used Spacemacs for a while, but switched to a custom configuration with evil, general.el, and which-key. Spacemacs was excessively slow and I also often ran into strange bugs.
I did the exact opposite, I got tired of vanilla Emacs and managing my custom configuration. Then I found about Spacemacs and never looked back.

I didn't get any strange bugs or slowdowns, but then I am using the `develop` branch which is going to be the upcoming .3 release. I also have a few dozen layers installed.

I would miss Spacemacs' layers way too much if I reverted to vanilla. Its integration of evil-mode is also fantastic, something I don't want or need to recreate.

The upcoming .3 release will support a custom package archive. A lot of the bugginess in Spacemacs is caused by frequently pulling 100+ bleeding-edge MELPA packages.
Any news when the new release will come out? I like to keep to master, but wouldn't mind an upgrade to a stable version soon.
I've already been using .3 for a while, just switch to the `develop` branch :)
same issue here, spacemacs is a very nice package but I just have no idea how to fix it when ran into bugs, I started to build my own .emacs.d since last month.
The spacemacs community on gitter is a helpful crowd. Treating newbies with patience and encouraging asking questions.
If possible, swap Caps Lock with Left Control like it was on the old Sun and Apple keyboards. Having Control on the home row makes it much more comfortable typing common left-hand-only keyboard shortcuts like C-x, C-w, C-a, C-q, C-s, C-e, C-v, and C-z, as well as chords such as M-C-v, M-C-c, or M-C-d. On Windows you can edit the scan code map in the registry to swap the mappings, although this sometimes breaks laptop buttons that are implemented as USB HIDs (e.g., secure attention keys on tablets that work by sending the Control, Alt, and Del scan codes like a real keyboard would). On Macs I also swap Option and Command, since Option usually gets mapped to Left Alt in terminals and in Emacs.

On FreeBSD the syscons driver lets you edit the keyboard maps in a text file. I don't know how to do it in newcons. I forget how to do it in Linux. If all you care about is X, you can also use xmodmap (IIRC).

in OSX, how did you swap opt and cmd? i went through hoops to do that and finally managed to do it without replacing opt/cmd os-wide using cmdkeyhappy.
Before OS-X would let you do that, I took my PowerBook's keyboard out, cut the trace and redrew the traces to connect the CapsLock key to the Control traces. :-)

Now it's done by simply going to System-Preferences=>Keyboard=>Modifier Keys

System Preferences -> Keyboard -> Modifier Keys...
Helm-ag is great too. I tend to bounce between "helm-projectile-find-file" and "helm-projectile-ag" depending on if I'm grepping or looking for a file name. Fuzzy search makes those terrific. Then within a single file, "helm-swoop" is great. And then "helm-resume" to bring up my previous search.
For another, related approach, there's counsel-ag, and the various other counsel/ivy/swiper tools. I've personally switched to those from helm, and have found them to be both faster and much more intuitive to use than helm was.
I recently discovered `dumb-jump`, and now use it all the time.

https://github.com/jacktasia/dumb-jump

Just got ag and rg for win32 x64 and dumb-jump is quite nice. Simple, transparent, fast.
I like a lot of the minor tools that I don't use often, but come in handy when I need them.

Avy Mode, which I suppose is the successor to Jump Mode. Letters light up across the buffer and you can quickly navigate to where you want.

Multi-cursor mode. A Sublime killer feature. Wasn't exclusive very long.

Not sure what it's called, but it binds window changing to shift arrow. Probably my best time-saver.

windmove is probably it -- https://www.emacswiki.org/emacs/WindMove
I haven't been able to use magit. I've tried and tried, but it's too slow for me. It literaly takes 30 seconds just to magit-status the project on a windows machine. So I'm using vc and git-gutter+ for this job. You can see the changes, stage them, view the log, annotate your file (what commit modified each line), commit, ammend, etc.
I've never tried it on Windows so that might be the issue. Windows is still somewhat a second-class citizen wrt Emacs and Git. Not as bad as is the past and getting better every day but still noticably worse than on a Unix.

I've aliased magit-status in my shell and it spawns a new Emacs instance (no demon) and magit in a few seconds.

No reason to downvote parent. Both Git and Emacs (especially use of external processes) are slower on Windows.

Combined it’s quite noticeable.

I still use Magit though, because it’s clearly the best git-porcelain around.

Magit is the only thing that allows me to make enough sense of git to use it.
I've been using Emacs for years but only started using Magit this year, what a fantastic Git client.

It makes everything trivial to do, even rebases become safe and friendly. Its definitely a git client on a league of its own.

Have you tried tig? http://jonas.nitro.dk/tig/ Could not use git without it anymore.
tig supports only a small subset of the magit functionality.

It's useful if you don't have an emacs at hand and quickly want to explore a git repository, but that's about it.

Magit is really amazing. Recently learned that it optionally supports saving changes to git when saving a file or doing some destructive git operation, by using the magit-wip modes. Makes git much safer. https://magit.vc/manual/magit/Wip-Modes.html
+ Magit.

I used to use Spacemacs, then switched to vim (better C++ support without ctags, multimodes, easier to get running on remote boxes) -- however I still always use magit as a separate git client, I haven't seen any other git client, GUI or terminal, that gets even close.

I tried using Helm + Projectile, the problem was that I often use emacs out of .git repos. So I ended up using ST3 instead.