Emacs - Beginner Configuration

Emacs for Beginner

Overview

Introduction

The Basics

Emacs Screen

Emacs Screen

Emacs Initialization File

Dotfiles Structure

(add-to-list 'load-path (concat user-emacs-directory "elisp"))(require 'base)(require 'theme)....
Folder Structure

Base Configuration

base.el

Theme

(use-package spacemacs-theme
:defer t
:init
(load-theme 'spacemacs-dark t))
(provide 'theme)
;; elisp files
(add-to-list 'load-path (concat user-emacs-directory "elisp"))
;; Base configuration
(require 'base)
;; Theme
(require 'theme)
Emacs with Spacemacs Theme

Evil Mode

(use-package evil
:init
(setq evil-vsplit-window-right t)
(setq evil-split-window-below t)
(setq evil-want-C-u-scroll t)
(setq evil-want-C-i-jump nil)
:config
(evil-mode 1))
(provide 'vim)
;; elisp files
(add-to-list 'load-path (concat user-emacs-directory "elisp"))
;; Base configuration
(require 'base)
;; Theme
(require 'theme)
;; Evil mode
(require 'vim)

Completion

ivy, counsel

(use-package ivy
:bind
("C-x s" . swiper)
("C-x C-r" . ivy-resume)
:config
(ivy-mode 1)
(setq ivy-use-virtual-buffers nil)
(define-key read-expression-map (kbd "C-r") 'counsel-expression-history))
(use-package counsel
:bind
("M-x" . counsel-M-x)
("C-x C-m" . counsel-M-x)
("C-x C-f" . counsel-find-file)
("C-x c k" . counsel-yank-pop))
counsel M-x

company

(use-package company
:config
(add-hook 'after-init-hook 'global-company-mode))
Emacs company mode

Which-Key

(use-package which-key
:defer 0
:diminish which-key-mode
:config
(which-key-mode)
(setq which-key-idle-delay 1))
Emacs which-key

Project Interaction

(use-package projectile
:diminish projectile-mode
:config
(setq projectile-completion-system 'ivy)
(projectile-global-mode)
:bind-keymap
("C-c p" . projectile-command-map)
:init
(setq projectile-project-search-path '("~/workspace/development/"))
(setq projectile-switch-project-action #'projectile-dired))
(use-package counsel-projectile
:after projectile
:bind
("C-SPC" . counsel-projectile-switch-project)
:config
(counsel-projectile-mode))
(provide 'workspace)
Projectile Commands
Switch Project using Projectile

Startup Screen

;; Dependencies
(use-package page-break-lines)
(use-package all-the-icons)
(use-package dashboard
:config
(setq show-week-agenda-p t)
(setq dashboard-items '((recents . 15) (agenda . 5)))
(setq dashboard-set-heading-icons t)
(setq dashboard-set-file-icons t)
(setq dashboard-startup-banner 3)
(dashboard-setup-startup-hook)
)
(provide 'splash)
Startup Screen

Magit

(use-package magit
:config
(setq magit-completing-read-function 'ivy-completing-read)
:bind
;; Magic
("C-x g s" . magit-status)
("C-x g x" . magit-checkout)
("C-x g c" . magit-commit)
("C-x g p" . magit-push)
("C-x g u" . magit-pull)
("C-x g e" . magit-ediff-resolve)
("C-x g r" . magit-rebase-interactive))
(use-package magit-popup)(provide 'vcs)
Git Status using Magit

Summary

References

Programmer and occasional blogger.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store