balaramadurai / emacs.d-old

The Emacs Collective

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spacemacs-Lite

This config is for people who are either:

  1. Starting out with emacs
  2. Or tried out Spacemacs and were overwhelmed by the list of customization possible.

My screenshots of the Spacemacs-Lite version Spacemacs-Lite-home.png

Spacemacs-Lite-Help.png

Spacemacs-Lite-Org.png

Here is my .emacs.d config. I’ve learnt from the internet, I thought I should return the favour :)

Quick Start

You’ll need emacs before we start off with this - http://wikemacs.org/index.php/Installing_Emacs

Once you have installed Emacs, you can start with this. Copy the following commands line by line and press ENTER

 # if you have a pre-existing config, also backup your .emacs from your home directory
mv .emacs.d .emacs.d.bak  
git clone  --recurse-submodules http://github.com/balaramadurai/.emacs.d
# Launch emacs and enjoy!

Motivation

I started using Spacemacs and I fell in love with the ease of use and the thought that has gone in to developing every brick of the emacs customization. But, somehow, there were some keybindings that I wanted it my way and it was increasingly getting difficult to have it my way. Creating a layer and maintaining it also seemed to be an uphill task. Although, I did manage it at the end. Somehow, I needed something that was, let’s say, light. At around the same time, I came across this talk by Suyash Bire, who talked about a Spacemacs-Lite. This concept appealed to me and I copied most of the code that I wanted from watching him. Eventually (in about a week’s time), he did share his settings on github.

That inspired me to do 2 things -

  1. Share my config so that someone else like me might benefit, and
  2. To have my config under a VC rather than Dropbox it.

That was my motivation, the list of whom I was inspired by are given below - Inspiration .

Get Started

Step 0: Install Emacs

http://wikemacs.org/index.php/Installing_Emacs

Step 1: Git clone or download the config

One way to use this config.org to make it your own is:

 # if you have a pre-existing config, also backup your .emacs from your home directory
mv .emacs.d .emacs.d.bak  
git clone --recurse-submodules http://github.com/balaramadurai/.emacs.d

Step 2: Configure your spacemacs.secret.org

Use the template provided spacemacs.secret.org.template

mv spacemacs.secret.org.template spacemacs.secret.org

Step 3: Launch Emacs

Your emacs will open up in default poet-theme. You can customize this using SPC t t

Step 4: Customize the packages

How to add a new package to your config:

Type the words <muse and TAB

<muse <TAB>

You’ll get this

Type the name of the emacs package from http://melpa.org or use SPC p l for listing packages.

Go to the last parenthesis and type C-x C-e and the package will be installed for you.

Step 5: Delete packages

If you want to remove a package, delete the package with its emacs-lisp code block in this file and also SPC p d.

By defining shortcut keys/keybindings for each package, you can make sure that when you decide to uninstall a package, the shortcut keys also go away

Step 6: Check the list of shortcuts/keybindings (Spacemacs Mnemonics)

To make shortcut keys, use the :general and type in =(spacemacs-leader-key <shortcut key in quotes> ‘<macro>’=.

I have evil (Vim emulation) enabled by default, hence I’d strongly recommend learning practicing “evil-mode” using evil-tutor using (SPC h T)

Shortcuts

[2018-12-10 Mon 16:53] The long list of shortcut keys are given below, as defined my this config file: All these work in all evil modes except insert Screenshots of the Spacemacs “menu” and the Org helper “menu”

Spacemacs-Lite-Help.png

Spacemacs-Lite-Org.png

The following table can be obtained from M-x general-describe-keybindings

KeybindingMacro name
SPCSpacemacs-Lite Leader
SPC SPCM-x (helm)
SPC ?show keybindings (helm)
SPC !shell pop (requires shell-pop)
SPC :shell command
SPC aapps
SPC addired/ranger
SPC accalendar
SPC aeeasy-hugo
SPC ammu4e
SPC aoorg
SPC bbuffer
SPC bblist of buffers (helm)
SPC b] (also M-])next buffer
SPC b[ (also M-[)previous buffer
SPC bacopy whole buffer to clipboard
SPC bccopy file
SPC bdkill the current buffer
SPC bRrename file and buffer
SPC brrevert buffer (when changed on disk)
SPC bmshow Messages buffer
SPC bhshow Dashboard buffer
SPC TABshow the last buffer used
SPC ccomments
SPC clcomment or uncomment line
SPC crcomment region
SPC ffiles
SPC ffopen files (helm)
SPC fropen recent files
SPC feemacs files
SPC fedopen init.el
SPC fecopen config.org (this file)
SPC feRload init.el
SPC fssave the current file
SPC iinsert
SPC ippasswords
SPC ppackages
SPC piinstall a new package
SPC pllist all packages
SPC puupgrade all packages
SPC pdremove a package
SPC prauto remove unnecessary packages
SPC qquit
SPC qqquit emacs
SPC qrquit and restart emacs
SPC qdquit and restart emacs with debug-init
SPC aoorg
SPC aocorg capture
SPC aolorg store link
SPC aoo (also F2)org agenda
SPC rorg reviews
SPC rwweekly review
SPC rqquarterly review
SPC ryyearly review
SPC ssearch
SPC sssearch within a buffer (helm)
SPC swweb
SPC swdDuckduckgo search using w3m
SPC tthemes
SPC ttload themes
SPC tdload dichromacy theme
SPC tlload leuven theme
SPC tsdload spacemacs dark theme
SPC tslload spacemacs light theme
SPC tpload poet theme
SPC wwindows
SPC wmmaximize window
SPC wddelete window
SPC w/split window vertically
SPC w-split window horizontally
SPC 1select window 1
SPC 2select window 2

Org Mode

[2018-12-12 Wed 17:15]

Org Mode shortcuts (or major mode shortcuts can be accessed through)

keybindingDescription
.Org Mode helper

Inspiration

[2018-12-07 Fri 07:08] The following snippet is modified from https://github.com/ralesi/spacemacs.org and is placed in your ~/.emacs.d/init.el

;; tangle without actually loading org
 (let ((src (concat user-emacs-directory "config.org"))
       (ui (concat user-emacs-directory "config.el")))
   (when (file-newer-than-file-p src ui)
     (call-process
      (concat invocation-directory invocation-name)
      nil nil t
      "-q" "--batch" "--eval" "(require 'ob-tangle)"
      "--eval" (format "(org-babel-tangle-file \"%s\")" src)))
   (load-file ui))

This is inspired (read “copied/borrowed/reused”) from the following sources (and not limited to):

About

The Emacs Collective


Languages

Language:Emacs Lisp 77.4%Language:YASnippet 18.7%Language:Roff 2.8%Language:Makefile 1.1%