And So It Begins
Began learning emacs via @spacemacs Just had a strong sense of existential angst, as if by going further my life will be irrevocably altered— Christopher Atkins (@CAIndy) June 30, 2015
So You Wanna Learn Emacs?
The best editor is […] Emacs and Vim! -Spacemacs
How I Got Here
A little background about my (lack of)
vim skills. I use
vim keybindings quite a bit in Visual Studio, via VsVim (thanks Jared Par!), however I’m really a novice, despite heavy usage of the most basic commands. Over the years I’ve invested in learning tools like Resharper to speed up my development, but at LambdaConf this year I met Andrew Cherry (@kolektiv) and in the course of discussing all things F#, he mentioned that he does most of his development on OSX in Emacs. Then I saw that Chris McCord of Phoenix fame had moved from Vim to Emacs Evil mode. I’d always intended to make an earnest attempt to learn the same, but this renewed my resolve. I didn’t want to lose all the things I learned in Vim, so Spacemacs FTW!
Like a lot of folks, I work on a Macbook Pro. Here’s some prerequisites for getting started with Spacemacs:
So, now you’ve call a well-maintained version of Emacs for your Mac. Now, we’re going to “install” Spacemacs:
That’s it! Installation is just cloning the repo in your Emacs configuration folder. You’ll customize Spacemacs indendently, so you can always “re-install” by doing the following:
Your initial launch in Spacemacs is a little bumpy: open emacs, allow it to update, restart. Then Update it manually (you can hit tab to navigate the buttons), then:
Restart emacs, you should be in business. Our next task is to arm our Spacemacs with great tools. These are installed by specifying “layers””. To edit
SPC f e d and pick your layers by adding them to
dotspacemacs-configuration-layers. My first layer was getting
zsh working well.
The following settings were about getting utf-8 characters in the terminal, but I switched to a simpler
zsh theme in emacs mode as advised by (this article about using multi-term)[http://rawsyntax.com/blog/learn-emacs-zsh-and-multi-term/]. So, you can ignore these, but I’m recording it here:
Anyway, you’ll want to update your
zsh color settings per this (SO answer)[http://stackoverflow.com/a/26549524]
Cool, one last thing for this getting started note; get your OSX layer working. It’s pretty simple:
brew install coreutilsto get
- then add the
Spacemacs layers are all about making the Emacs ecosystem available via
vim-style keybindings, but they’re also a well-curated bundling of Emacs modes. I mentioned being a
vim novice, but I did pick up a few tricks from Chris McCord. I used
vundler. Spacemacs comes with
Neotree out of the box. Some commands I’ve been using a lot are:
Spc f rrecently used
Spc p ttoggles a
NerdTreeat the project root (it’s smart like that)
Spc t ...there are a lot of cool toggles here, various kinds of highlight, relative line numbers, etc.
The menus are easy to navigate, but you’ll soon be ripping through these commands. Chris
Magit, or OhMaGit
I’m pretty comfortable with
git. I’ve been using it since 2009, but only truly regularly since 2010. I’m no expert, but I can do anything I want with the tool pretty quickly. Right now it’s still way more pleasant for me to
Spc ' (open my shell) and just issue
git commands, but Magit is pretty rad. One thing I really like is being able to selectively modify the hunks I’m staging, and I can tell using the Magit layer via
Spc g ... is going to be a lot faster than shelling out. Just be sure you have a cheatsheet open and force yourself to use the Magit major mode and keybindings.
Some of the layers I’m really digging include
elixir. I’ve still got some kinks to workout, but I can’t imagine using another tool to program in these languages now.
I’d heard about Dash before but not gotten into the habit if using it; the eponymous layer in Spacemacs will change that, I think.
There is a ton to learn, but I think it’s an investment that will pay off. I’m going to start using Spacemacs as my primary editor as much as possible. There are C# and F# layers that I hope will make that possible, and I’ll be using the VMWare shared folder feature to edit the files in Spacemacs in OSX, then switch over to the Windows VM to compile and such. Besides that, I’d like to develop more proficiency with macros; stuff like this is just cool:
I mentioned in the introduction that I’m learning Spacemacs in no small part because other folks I admire use Emacs. My ultimate hope is that I will gain enough productivity to be able to produce OSS at the levels they do. My existential angst came from the feeling that having invested the kind of time required, I’ll have committed myself to being a certain kind of person–a hacker–but in truth, I made that decision long ago.