aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Tay <nick@windblume.net>2021-11-17 17:13:02 +1100
committerNicholas Tay <nick@windblume.net>2021-11-17 17:13:24 +1100
commitcdb0a01691154e34a54fac8f10cb6291883a2011 (patch)
tree29877ee93c33be14137612953d84b3bc32cc8866
parentbd8a90a5e6a286a846420c0c6b23ba77691fb3eb (diff)
downloaddotlite-cdb0a01691154e34a54fac8f10cb6291883a2011.tar.gz
dotlite-cdb0a01691154e34a54fac8f10cb6291883a2011.tar.bz2
dotlite-cdb0a01691154e34a54fac8f10cb6291883a2011.zip
Add basic emacs config
Diffstat (limited to '')
-rw-r--r--.emacs125
-rw-r--r--README.md2
2 files changed, 126 insertions, 1 deletions
diff --git a/.emacs b/.emacs
new file mode 100644
index 0000000..e465ca5
--- /dev/null
+++ b/.emacs
@@ -0,0 +1,125 @@
+(setq inhibit-startup-screen t)
+(menu-bar-mode 0)
+(tool-bar-mode 0)
+(scroll-bar-mode 0)
+
+(setq ido-enable-prefix t)
+(ido-mode 1)
+
+;; Line numbers + its colour
+;;(set-face-foreground 'line-number-current-line "#FFFF00")
+(setq display-line-numbers-type 'relative)
+(global-display-line-numbers-mode t)
+
+;; Basic font settings
+(set-frame-font "mono-13" nil t)
+
+;; ESC key = quit outta prompts
+(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
+
+
+
+;; Packages setup
+;; MELPA repo
+(require 'package)
+(add-to-list 'package-archives
+ '("melpa" . "https://melpa.org/packages/"))
+(package-initialize)
+(unless package-archive-contents
+ (package-refresh-contents))
+
+;; Theme
+(unless (package-installed-p 'kaolin-themes)
+ (package-install 'kaolin-themes))
+(require 'kaolin-themes)
+(load-theme 'kaolin-aurora t)
+;; Transparency
+(set-frame-parameter (selected-frame) 'alpha '(95 95))
+(add-to-list 'default-frame-alist '(alpha 95 95))
+
+;; evil
+(unless (package-installed-p 'evil)
+ (package-install 'evil))
+
+(setq evil-want-integration t) ;; This is optional since it's already set to t by default.
+(setq evil-want-keybinding nil)
+(setq evil-want-C-u-scroll t)
+
+(require 'evil)
+
+(unless (package-installed-p 'evil-collection)
+ (package-install 'evil-collection))
+(when (require 'evil-collection nil t)
+ (evil-collection-init))
+
+(evil-mode 1)
+
+(evil-global-set-key 'normal (kbd "SPC b") 'ido-switch-buffer)
+(evil-global-set-key 'normal (kbd "SPC f") 'ido-find-file)
+(evil-global-set-key 'normal (kbd "SPC s") 'save-buffer)
+(evil-global-set-key 'normal (kbd "SPC k") 'kill-buffer)
+(evil-global-set-key 'normal (kbd "SPC d") 'dired)
+(evil-global-set-key 'normal (kbd "SPC e") 'eval-last-sexp)
+(evil-global-set-key 'normal (kbd "SPC g") 'magit-status)
+(evil-global-set-key 'normal (kbd "SPC =") 'text-scale-adjust)
+(evil-global-set-key 'normal (kbd "SPC -") 'text-scale-adjust)
+(evil-global-set-key 'normal (kbd "SPC 0") 'text-scale-adjust)
+
+
+;; smex (enhanced ido)
+(unless (package-installed-p 'smex)
+ (package-install 'smex))
+(smex-initialize)
+
+(global-set-key (kbd "M-x") 'smex)
+(global-set-key (kbd "M-X") 'smex-major-mode-commands)
+;; This is your old M-x.
+(global-set-key (kbd "C-c C-c M-x") 'execute-extended-command)
+
+;; which-key (hotkey hinting)
+(unless (package-installed-p 'which-key)
+ (package-install 'which-key))
+
+(require 'which-key)
+(which-key-mode)
+
+
+;; Magit
+;;(unless (package-installed-p 'magit)
+ ;;(package-install 'magit))
+
+;; Autocomplete
+;;(unless (package-installed-p 'company)
+ ;;(package-install 'company))
+
+;;(require 'company)
+;;(company-mode)
+;;(setq company-show-numbers t)
+;;(setq company-tooltip-flip-when-above t)
+;;(global-company-mode t)
+
+;; Eldoc
+;;(global-eldoc-mode t)
+
+;; Autocomplete backends
+;; Python
+;;(unless (package-installed-p 'anaconda-mode)
+ ;;(package-install 'anaconda-mode))
+;;(add-hook 'python-mode-hook 'anaconda-mode)
+;;(add-hook 'python-mode-hook 'anaconda-eldoc-mode)
+;;(unless (package-installed-p 'company-anaconda)
+ ;;(package-install 'company-anaconda))
+;;(eval-after-load "company"
+ ;;'(add-to-list 'company-backends 'company-anaconda))
+(custom-set-variables
+ ;; custom-set-variables was added by Custom.
+ ;; If you edit it by hand, you could mess it up, so be careful.
+ ;; Your init file should contain only one such instance.
+ ;; If there is more than one, they won't work right.
+ '(package-selected-packages '(which-key smex evil-collection evil kaolin-themes)))
+(custom-set-faces
+ ;; custom-set-faces was added by Custom.
+ ;; If you edit it by hand, you could mess it up, so be careful.
+ ;; Your init file should contain only one such instance.
+ ;; If there is more than one, they won't work right.
+ )
diff --git a/README.md b/README.md
index dcf5cc8..947a893 100644
--- a/README.md
+++ b/README.md
@@ -21,7 +21,7 @@ $ d ...
General:
-- nvim
+- nvim/emacs
- bash/zsh
For Linux Desktop: