Setting up spacemacs for development— Part 1

Ramz
2 min readFeb 6, 2019

--

I am a long time user of emacs and was having huge bunch of custom elisp codes, collected over time. I tried spacemacs mainly for two reasons,

  1. Modularity of spacemacs configurations
  2. Try out vim key bindings

Installation

  1. To install spacemacs just clone the repository as below

git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d

Configuring spacemacs

By default when you start emacs with spacemacs installed, you get this.

Pretty awesome right.

I customize further with these configurations by editing the ~/.spacemacs file

Enable resume with auto saved layouts

I always prefer to start emacs with previous layouts. For that find the line with settings dotspacemacs-auto-resume-layouts and change it as below

dotspacemacs-auto-resume-layouts t

Enable Paste transient state

Enabling paste transient state, enables C-j , C-k key bindings on paste to cycle through kill ring.

dotspacemacs-enable-paste-transient-state t

Enable Smart parentheses for programming modes

I enable smart parentheses for all programming modes. This helps a lot while programming

dotspacemacs-smartparens-strict-mode t

Enable emacs server to run on startup

Allowing to run emacs server, will help us to run emacs client from terminal allowing for faster boot.

dotspacemacs-enable-server t

Set ag as default search tool

I use ag as my default search tool every where.

dotspacemacs-search-tools '("ag" "rg" "pt" "ack" "grep")

Set the frame title

I like to see the current file name as my frame title. Chose your preference and it has different settings for various parameters like user, frame buffer, process, etc

dotspacemacs-frame-title-format "%a"

Whitespace cleanup

I am bit paranoid on cleaning up my code. So i always set it to all, so that it can cleanup all excessive spaces.

dotspacemacs-whitespace-cleanup 'all

These are my default configurations for my spacemacs. In the subsequent post i will go through how to configure different layers and how that help in development.

--

--

Ramz

Cloud Architect, Polyglot Programmer, Hacker, DevOps Practitioner & AI Enthusiast