Spacemacs: A Rundown


Hiya!! I wanted to write this post very badly and give a rundown on the stuff I use in spacemacs.

EVIL Mode

The Extended VI Layer mode basically provides an interface to use vim keybindings within emacs. And spacemacs helps by providing all emacs commands as vim-like keybindings to bring some structure (and save me from the pain of doing the thinking myself). The keybindings are split into 3 main categories (at least in my head)

The Vim-like commands

These are the set of all commands I would use in vim with the different Vim-modes (and I’m calling them this for a reason). These are mainly my editing task commands (operator + motion = awesome) and intra-buffer navigation.

The General Emacs commands

A mode in Vim defines what a key does, but an emacs-mode is a collection of behaviour for emacs. Thus in an emacs mode, packages can be loaded and specific syntax can be highlighted, etc. These are all implemented with the SPC being a “leader” (not exactly but we can deal with it).

The Emacs-mode commands

Spacemacs provides mnemonic commands with , being the leader. For example, if , was pressed in an org-mode buffer, org-mode related tasks like inserting tables, emphasis, linking, timestamps, TODOs, etc could be accessed.

The Layers

Spacemacs has modes similar to vanilla Emacs but implements them as layers which have multiple packages and behaviours defined. The layers I use are obviously the programming language specific layers which provide syntax highlighting, language-aware completions, language-specific documentation, build integration, linting and code-checks etc. The git front-end on spacemacs magit is very polished and even though terminal git is my personal choice, the fact that it’s there is refreshing. Also another layer that is extremely helpful is projectile which is an interface to work with yur project from within spacemacs. It provides fuzzy file completion, project-wide _grep_ing, project-wide compiling and building tools. And the glue that holds all these menus together is helm which narrows every list on emacs (ever). But one specific mode blew and still blows my mind: Org-Mode.

Org Mode

Org mode is a special mode that provides a constant and complete syntax for writing and managing tasks. Like I said in my earlier post I don’t think I can ever say that I understand emacs or vim completely but org mode is beyond anything I could have ever imagined.

In org mode I can do my writing (of reports, posts(like this one), notes) or manage my ongoing projects and tasks with the ease of sane keyboard shortcuts and at the speed of thought. I can create tables which have Spreadsheet capabilities. I can give myself deadlines for tasks and keep track of their completion (mostly the delays).

And it focuses on the note-taking system as much as the task management and it really helps me organize my thought. And the best part is it has vast export capabilities. I can export to markdown, pdf (via a latex engine), html, html(with revealjs support) and so on. Org mode is the single most fantastic feature that I love to use.

Elisp

And last but not the least, I have the comfort of configuring all this in the safe havens of the parentheses. Having learnt LISP almost religiously I have the exceptional joy of working with Elisp (or Emacs LISP). This I initially underestimated but having now made myself a game in emacs..(yes, a game) using elisp I have reached the most comforting place on our planet earth (the Scratch buffer).

If any of my above ramblings excite you, you should definitely try out spacemacs too. And others please try it out at least for the spectacle that is org mode.

(defun connect4 ()
  "Start playing connect4"
  (interactive)
  (switch-to-buffer "*connect4*")
  (connect4-mode)
  (connect4-init))
  
(connect4)

I will write a post on elisp and the game connect4 soon. Until then D3454758329C1435BF1B6CB2C63AA492F2F8307C

PS: SHA-1 is interesting