tl;dr: distraction-free writing

For the impatient, here is how my emacs looks now:


Having less fluff, helps me concentrate. I don’t really need scroll bars, copy and paste buttons, file open/close, etc.

Over 80% of my time I spend reading code if I’m using emacs. I’m optimizing for that use case.

My emacs opens up fully maximized and I immediately F11 because I’m not even interested in having edges. Really, what’s the point of looking at the scroll bar?

Don’t worry it is still fully functional…


Emacs! you bae

I’ve been tweaking my emacs setup for almost 7 years now. My operating systems instructor used it once and he was a hero to me - I thought, as did every other kid in the class, if I use this editor I will be as good.

During my internships people were always surprised I was using emacs. I was pretty much stuck. I Couldn’t go back to eclipse, netbeans, jetbrains, visual studio, etc. 7 years pass by and I am so very slow with the default setup. I have to go through the manual to figure out how to pipe things from a shell into my buffer.

I suppose people realize they are old(er?) when they start to reminisce about the good ‘ol days - i.e.: remember floppy disks, when you had 2 disk entries, one for your operating system and one for storage… or something like that. I realize I’m older because I have about 400 key mappings that are mode dependent. I promise I also do regular/productive work outside of tweaking my setup.

I empathize with the ‘pursuit of perfection for your editing life’. 3 years ago for example, wrote an RPC client/server between my emacs and a Go (back at rc-59 when it wasn’t cool and hip) server to get pprof data into my buffer directly. I dumped it because I decided to curl http://localhost:6060/debug/pprof/ into a buffer - yay! for (shell-command-on-region) M-|

$ cloc ~/.emacs.d/agallego/ v 1.60  T=0.19 s (160.6 files/s, 35393.7 lines/s)
Language                      files          blank        comment           code
Lisp                             27            351            442           1056

However, I have about 1 thousand lines which are mostly configuration around these modes:

(defvar my-packages '(
                      scala-mode2      ;; scala
                      sbt-mode         ;; ensime depends on this
                      ensime           ;; for scala
                      scss-mode        ;; scss lang
                      haskell-mode     ;; haskell lang
                      protobuf-mode    ;; protobuf lang
                      simplezen        ;; zencoding for html but much simpler
                      yaml-mode        ;; .yaml files
                      js2-mode         ;; js files -- auto lints
                      yasnippet        ;; insert snippets on my code with tab
                      elisp-slime-nav  ;; elisp
                      cpputils-cmake      ;; cmake utils for navigating code
                      markdown-mode+   ;; for markdown
                      multi-web-mode   ;; js, css & tml in the same buffer
                      string-inflection   ;; snake_case -> UPPER -> cammelCase
                      zygospore           ;; revert delete other windows w/ c-x 1
                      ;; god-mode            ;; vi-like navigation
                      demangle-mode       ;; demangle c++ symbols using flint++
                      vlf       ;; view very large files
                      ws-butler ;; clean up only modified lines for whitespace
                      clean-aindent-mode ;; better auto indent
                      buffer-move      ;; swap buffer position
                      shift-text          ;; for left,right,up,down blocks shift
                      web-beautify       ;; for unminifying javascript,etc
                      helm               ;; incremental search
                      helm-ag            ;; helm for aga silver searcher
                      helm-c-yasnippet   ;;
                      helm-helm-commands ;; help with common helm commands
                      helm-ls-git      ;; inc search on git repos
                      helm-ls-hg       ;; for mercurial repos
                      helm-git-grep    ;; grep in git repos through helm -
                      helm-swoop       ;; groups similar word in buffer
                      helm-flx         ;; flx matching on helm results.
                      helm-hayoo       ;; haskell package search
                      anzu             ;; counts the  occurances for isearch
                      nyan-mode        ;; progress bar for buffer scroll
                      magit            ;; git interface for emacs
                      mark-multiple    ;; allow for multiple marks on a buffer
                      undo-tree        ;; allow to undo changes on a file
                      elscreen         ;; allow to split screens in tabs
                      yagist           ;; post to github gists
                      expand-region    ;; avbrev on steroids
                      avy              ;; jump to anything you see with one keystroke
                      ace-window       ;; jump like ace but for windows
                      rainbow-delimiters ;; colors parens
                      browse-kill-ring ;; amazing visual kill ring search
                      exec-path-from-shell ;; fix mac not reading the shell issue
                      diminish         ;;  cleans up your powerline
                      smartparens      ;;
                      ;; themes
                      cyberpunk-theme ;; high contrast
                      gandalf-theme ;; blue'ish background - day theme
                      vimgolf ;; fun! game
  "A list of packages to ensure are installed at launch.")

It all started with an OpenVMS terminal

During one of my internships I had to ssh into these OpenVMS machines. Apart of the terrifying operating system and weird command /line /switches=1 I really enjoyed having one full terminal for my editor. You F11 your way into a pretty enjoyable and quiet programming environment. At the time we were using emacs 18 or 19 - so broken.

It took me about a month to get syntax highlighting. I remember having conversations with people that used nano (I’m almost certain. Definitely not emacs or vi) because… well… getting emacs to work in this environment was just close impossible.

Honestly, I still had doubts about using emacs then. I first started enjoying emacs is when I realized that the results of searches would appear on your buffer and you could edit them as text, it had me at find-grep-dired!

About 4 years ago, I decided to do all my work over git indexes :boom: You have no idea how productive you will be once you force your directories to have a convention. So much so that projects that don’t have git indexes, I manually add them and all the files in them so I can use git-grep and git ls-files. See my other post about notational-velocity-clone.

Give me the codez - (add-hook ‘prog-mode-hook ‘no-mini-buffer)

(add-hook 'prog-mode-hook
          (lambda ()
              (setq mode-line-format nil)
              (setq-default mode-line-format nil)

This is just a minor improvement on the UI. It makes a significant difference on my laptop. At work, my monitor is 4K resolution and the amount of real state that the mode-line covers is pretty insignificant.