Compro's Emacs configuration
Introduction
This is my Emacs configuration greatly inspired by the Emacs community itself. It has been re-written many times and might change drastically in the future too. For now I am using packages by knowing them properly and there are no useless packages installed which I did install in the previous versions.
Tree structure
.mc-lists.el
custom.el
emacs-internals.el
init.el
README.md
.mc-lists.el
This file stores information about what commands to run once and what commands to run multiple times when using multiple cursors.
custom.el
All customization made from the Emacs customize interface go in this file
which are loaded during startup.
emacs-internals.el
All customization that can be done without the help of packages are listed here.
init.el
All bootstrapping code and additional package configuration goes here.
README.md
The file that introduces you to my configuration.
Packages
straight.el
This is a replacement for the inbuilt package.el in Emacs. Basically it is a package installer which clones actual packages and builds them for Emacs. It still is advantageous for me because:
- Pulling changes is lighter on the bandwidth as compared to whole tarballs.
- Managing versions as an user is super easy.
- Forking and modifying the actual package becomes easy given Git is at your disposal.
use-package
This makes package installation and configuring them a breeze. It is a macro that wraps most of the tasks into basic key value pairs(which can also be lists of tasks). Fortunately there are ways in which external package managers like straight.el can introduce their functionalities into use-package so that installing package is consistent across package managers.
hungry-delete
Hungry delete is the most satisfying thing that has a too easy shortcut. It deletes all spaces between point and the last/first non-space character.
Magit
The git playground that helps you learn and use Git in Emacs like never
before. Use C-x g to enter into the status buffer. Pressing q in status
buffer reveals the power of Magit.
magithub
A plugin for Magit that interacts with GitHub to manage repositories, pull
requests and issues without any issues. When in status buffer use H to access
the magithub menu.
expand-region
A region selector that happens to use the code semantics around the point to select a region in an iterative manner.
C-=to expand region around the pointC-+to contract region around the point
Projectile
A project management tool for Emacs. Emacs now also ships with
project-find-fileproject-find-regexpproject-or-external-find-fileproject-or-external-find-regexp
which are basically sufficient to get the work done. But Projectile provides tonnes of other features like:
C-c p k: Killing a project's buffersC-c p p: Switch to a projectC-c p b: Switch to a buffer in the current projectC-c p f: Find to a file in current projectC-c p !: Invoke a shell command from project's rootC-c p c: Build and run your projectC-c p s s: Search in your projectC-c p e: Find a recently visited fileC-c p a: Switch between similar files(Ex - .h and .c)
and many more which I don't use. The searching functionality I mentioned is provided by ag.
switch-window
Switching windows is pain using just C-x o. Thus this package solves this
problem very well. Press M-\ to switch windows. When there are more than two
windows it numbers them. Pressing that number switches you to that window.