Skip to content

manishmarahatta/dot-emacs

Repository files navigation

dot-emacs

NOTE: ⚠️ THIS CONFIG IS UNLIKELY TO HARM YOU/YOUR SYSTEM πŸ”₯ Make Sure you backup your config before implementing this πŸ”₯ ‼️

1 Intro

NOTE: init.el has been converted to README.org

This config was tested in Arch Linux and macOS Sierra(v 10.12.5)

https://user-images.githubusercontent.com/13973154/26870341-65e95114-4b8f-11e7-8ba4-e22e326b5617.png

1.1 Get it

$ git clone https://github.com/manishmarahatta/dot-emacs ~/.emacs.d/

1.2 How to build

configure πŸ‘· , pulls down the el-get, and stuffs.

$ ./configure

Run and let the magic happen

OR

1.3 Script to automatically build emacs config(copy/paste and run the script)

#!/bin/sh

echo "=========================================="
echo "Wait, while the emacs config builds itself"
echo "=========================================="

cd ~

DIRFIRST=~/.emacs.d
DIRSECOND=~/.emacs.d.backup
FILEFIRST=~/.emacs

if [ ! -f $DIRFIRST ]
then
    mv ~/.emacs.d .emacs.d.backup;
fi

if [ ! -f $DIRSECOND ]
then
    mv ~/.emacs.d.backup .emacs.d.backup.another;
fi

if [ ! -f $FILEFIRST ]
then
    mv ~/.emacs .emacs.backup
fi

git clone https://github.com/manishmarahatta/dot-emacs.git ~/.emacs.d/
cd ~/.emacs.d
chmod +x configure
./configure
cd ~
emacs

save the above file as autoconfig.sh

chmod +x autoconfig.sh

Then type

./autoconfig.sh

1.4 Structure

   .
β”œβ”€β”€ auto-save-list
β”œβ”€β”€ config
β”œβ”€β”€ el-get
β”‚Β Β  β”œβ”€β”€ cl-lib
β”‚Β Β  β”œβ”€β”€ goto-chg
β”‚Β Β  β”œβ”€β”€ logo
β”‚Β Β  β”œβ”€β”€ methods
β”‚Β Β  β”œβ”€β”€ moz-repl
β”‚Β Β  β”œβ”€β”€ package
β”‚Β Β  β”œβ”€β”€ popup-kill-ring
β”‚Β Β  β”œβ”€β”€ pos-tip
β”‚Β Β  β”œβ”€β”€ python
β”‚Β Β  β”œβ”€β”€ recentf-ext
β”‚Β Β  β”œβ”€β”€ recipes
β”‚Β Β  └── test
β”‚Β Β      β”œβ”€β”€ issues
β”‚Β Β      └── pkgs
β”œβ”€β”€ elpa
β”‚Β Β  β”œβ”€β”€ archives
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ gnu
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ marmalade
β”‚Β Β  β”‚Β Β  └── melpa
β”‚Β Β  β”œβ”€β”€ gnupg
β”‚Β Β  β”œβ”€β”€ twittering-mode-20160921.1038
β”‚Β Β  └── wget-1.94
β”œβ”€β”€ modules
β”‚Β Β  β”œβ”€β”€ auto-dim-other-buffers.el
β”‚Β Β  β”œβ”€β”€ emacs-ac-emoji
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ author
β”‚Β Β  β”‚Β Β  └── image
β”‚Β Β  β”œβ”€β”€ emojis
β”‚Β Β  β”‚Β Β  └── emojione-v2.2.6-22
β”‚Β Β  β”œβ”€β”€ mode-icons
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ icons
β”‚Β Β  β”‚Β Β  └── scripts
β”‚Β Β  β”œβ”€β”€ powerline
β”‚Β Β  β”œβ”€β”€ powerline-iconic-theme
β”‚Β Β  β”œβ”€β”€ py-exec
β”‚Β Β  β”œβ”€β”€ tabbar-ruler
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ el-get
β”‚Β Β  β”‚Β Β  └── melpa
β”‚Β Β  └── window-numbering
β”œβ”€β”€ plug-ins
β”‚Β Β  └── icons
β”œβ”€β”€ scripts
β”œβ”€β”€ snippets
β”‚Β Β  β”œβ”€β”€ fundamental-mode
β”‚Β Β  β”œβ”€β”€ html-mode
β”‚Β Β  β”œβ”€β”€ org-mode
β”‚Β Β  └── python-mode
└── url

51 directories

2 emacs core

2.1 emacs garbage collector

(setq gc-cons-threshold 104857600)

2.2 emacs server

St opening emacs for each file. Set default open application using emacsclient -n -a=emacs [FILE].

(require 'server)
(unless (server-running-p)
  (server-start))

2.3 encoding

(setq locale-coding-system 'utf-8)
(set-language-environment 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(set-selection-coding-system 'utf-8)
(prefer-coding-system 'utf-8)
(when (display-graphic-p)
   (setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING)))

2.4 backup configuration

(setq backup-directory-alist (quote ((".*" . "~/.cache/emacs_backup/"))))
(setq make-backup-files nil)

2.5 alias β€˜yes’ and β€˜no

(fset 'yes-or-no-p 'y-or-n-p)

2.6 recent files

;; (recentf-mode nil)

3 el-get

el-get is the package manager, which is similar to apt-get.

(add-to-list 'load-path "~/.emacs.d/el-get")
(require 'el-get)
(setq el-get-git-shallow-clone 't)
(el-get 'sync)

3.1 my packages

To replicate a package set for another emacs installation is explain in el-get README. you can list current installed package using.

`(setq my-packages
    ',(mapcar #'el-get-as-symbol
          (el-get-list-package-names-with-status "installed")))

this is the same of current packages which are installed.

PS: it’s osx compatibile β€œchill”

   (setq dim-packages
          (append
   ;; list of packages we use straight from official recipes
             '(ample-regexps auto-complete cl-lib ctable dash
             deferred ein epc epl exec-path-from-shell f flymake
             flymake-cursor fuzzy git-modes goto-chg jedi json-mode
			   json-reformat json-snatcher magit go-eldoc go-autocomplete multiple-cursors
			   pkg-info popup popup-kill-ring pos-tip pylookup python
			   python-environment recentf-ext request s undo-tree
			   web-mode websocket go-mode yasnippet ac-helm outorg package)
			 (mapcar 'el-get-as-symbol (mapcar 'el-get-source-name
			 el-get-sources))))
	 (el-get 'sync dim-packages)

Basic configuration, like window size keybindings

	(load "~/.emacs.d/config/ui.cfg.el")

these are kind of strange bindings for beginner and for me too, so lets remove it

	(global-unset-key [(control prior)])
	(global-unset-key [(control next)])

I find these binding quite handful.

	(el-get 'sync 'fill-column-indicator)
	(require 'fill-column-indicator)
	(global-set-key [M-f4] 'save-buffers-kill-terminal)
	(global-set-key [(control f5)] '(lambda() (interactive)
									(load-file "~/.emacs.d/init.el")))
	(global-set-key [f6] '(lambda() (interactive)
						  (toggle-truncate-lines)
						  (fci-mode)))
	(global-set-key [f9] 'speedbar)

4.1 shift mouse selection

We don’t need font dialog options which is binded by default. Since, font resize has been binded to C mouse scroll does it.

	 (global-unset-key [(shift down-mouse-1)])
	 (global-set-key [(shift down-mouse-1)] 'mouse-save-then-kill)

4.2 highlight current line

Uses shade-color defined in config/ui.cfg.el to compute new intensity of given color and alpha value.

	 (el-get 'sync 'highline)
	 (require 'highline)

	 (set-face-background 'highline-face (shade-color 09))
	 (add-hook 'prog-mode-hook 'highline-mode-on)

	 ;; not using inbuild hl-line-mode i can't seem to figure out changing
	 ;; face for shade-color
	 ;; (global-hl-line-mode 1)
	 ;; (set-face-background 'hl-line "#3e4446")
	 ;; (set-face-foreground 'highlight nil)
	 ;; (set-face-attribute hl-line-face nil :underline nil)

4.3 custom undo action for GUI

	 (when window-system
	   (require 'undo-tree)
	   (global-undo-tree-mode 1)
	   (global-unset-key (kbd "C-/"))
	   (defalias 'redo 'undo-tree-redo)
	   (global-unset-key (kbd "C-z"))
	   (global-set-key (kbd "C-z") 'undo-only)
	   (global-set-key (kbd "C-S-z") 'redo))

https://cloud.githubusercontent.com/assets/13973154/23092243/92afe916-f5ee-11e6-8406-1e21420f0a63.png

	 ;;; mode-icons directly from repo, for experiments
	 ;;; https://github.com/ryuslash/mode-icons
	 (load-file "~/.emacs.d/modules/mode-icons/mode-icons.el")
	 ;;; DID YOU GOT STUCK ABOVE? COMMENT LINE ABOVE & UNCOMMENT NEXT 2 LINES
	 ;; (el-get 'sync 'mode-icons)
	 ;; (require 'mode-icons)
	 ;; (setq mode-icons-desaturate-inactive nil)
	 ;; (setq mode-icons-desaturate-active nil)
	 ;; (setq mode-icons-grayscale-transform nil)
	 (mode-icons-mode)

	 (el-get 'sync 'powerline)
	 (require 'powerline)

	 ;;; https://github.com/manishmarahatta/powerline-iconic-theme
	 ;; (add-to-list 'load-path "~/.emacs.d/modules/powerline-iconic-theme/")
	 (load-file "~/.emacs.d/modules/powerline-iconic-theme/iconic.el")
	 (powerline-iconic-theme)
	 ;;; DID YOU GOT STUCK ABOVE? COMMENT 2 LINES ABOVE & UNCOMMENT NEXT LINE
	 ;;(powerline-default-theme)

	 ;;; modeline from spacmacs
	 ;;; https://github.com/TheBB/spaceline
	 ;; (add-to-list 'load-path	 "~/.emacs.d/modules/spaceline/")
	 ;; (require 'spaceline-config)
	 ;; (spaceline-spacemacs-theme)

4.5 tabbar

https://cloud.githubusercontent.com/assets/13973154/23092256/d412bf28-f5ee-11e6-9002-212ab2b55ba2.png

	 (el-get 'sync 'tabbar)
	 (require 'tabbar)
	 (tabbar-mode t)


	 ;;; tabbar-ruler directly from repo, for experiments
	 ;;; https://github.com/mattfidler/tabbar-ruler.el
	 (load-file "~/.emacs.d/modules/tabbar-ruler/tabbar-ruler.el")
	 ;;; DID YOU GOT STUCK ABOVE? COMMENT LINE ABOVE & UNCOMMENT NEXT 2
	 ;; (el-get 'sync 'tabbar-ruler)
	 ;; (require 'tabbar-ruler)

	 (setq tabbar-ruler-style 'firefox)

	 (load "~/.emacs.d/config/tabbar.cfg.el")
	 (global-set-key [f7] 'tabbar-mode)

bind them as modern GUI system.

	 (define-key global-map [(control tab)] 'tabbar-forward)
	 (define-key global-map [(control next)] 'tabbar-forward)
	 (define-key global-map [(control prior)] 'tabbar-backward)
	 (define-key global-map (kbd "C-S-<iso-lefttab>") 'tabbar-backward)

Binding for the tab groups, some how I use lots of buffers.

	 (global-set-key [(control shift prior)] 'tabbar-backward-group)
	 (global-set-key [(control shift next)] 'tabbar-forward-group)

4.6 smooth scroll

Unfortunately emacs πŸ’ˆ scrolling πŸ’ˆ is not smooth, its 2017 already.

	  (el-get 'sync 'smooth-scroll)
	  (require 'smooth-scroll)
	  (smooth-scroll-mode t)

	  (setq linum-delay t)
	  (setq redisplay-dont-pause t)
	  (setq scroll-conservatively 0) ;; cursor on the middle of the screen
	  (setq scroll-up-aggressively 0.01)
	  (setq scroll-down-aggressively 0.01)
	  (setq auto-window-vscroll nil)

	  (setq mouse-wheel-progressive-speed 10)
	  (setq mouse-wheel-follow-mouse 't)

4.7 delete selection mode

Default behavious of emacs weird, I wish this was default.

	 (delete-selection-mode 1)

4.8 Interactively Do Things

ido-mode

	 (ido-mode t)
	 ;;(ido-ubiquitous t)
	 (setq ido-enable-prefix nil
		   ido-enable-flex-matching t ;; enable fuzzy matching
		   ido-auto-merge-work-directories-length nil
		   ido-create-new-buffer 'always
		   ido-use-filename-at-point 'guess
		   ;; ido-default-file-method 'select-window
		   ido-use-virtual-buffers t
		   ido-handle-duplicate-virtual-buffers 2
		   ido-max-prospects 10)

4.9 M-x interface

4.9.0.1 smex

	   ;; (el-get 'sync 'smex)
	   ;; (require 'smex)
	   ;; (smex-initialize)
	   ;; (global-set-key (kbd "M-x") 'smex)

4.9.0.2 helm

https://github.com/emacs-helm/helm

	  (el-get 'sync 'helm)
	   (require 'helm)
	   (global-set-key (kbd "M-x") 'helm-M-x)
	   (global-set-key (kbd "C-x C-f") 'helm-find-files)
	   (helm-mode 1)

4.10 anzu

Highlight all search matches, most of the text editor does this why not emacs. Here is the gify from original repo.

	 (el-get 'sync 'anzu)
	 (require 'anzu)
	 (global-anzu-mode +1)
	 (global-unset-key (kbd "M-%"))
	 (global-unset-key (kbd "C-M-%"))
	 (global-set-key (kbd "M-%") 'anzu-query-replace)
	 (global-set-key (kbd "C-M-%") 'anzu-query-replace-regexp)

if sublime can have multiple selections, emacs can too..

Here is video from Emacs Rocks! about it in ep13.

	 (when window-system
	   (el-get 'sync 'multiple-cursors)
	   (require 'multiple-cursors)
	   (global-set-key (kbd "C-S-<mouse-1>") 'mc/add-cursor-on-click))

4.12 goto-last-change

This is the gem feature, this might be true answer to the sublime mini-map which is over rated, this is what you need.

If you aren’t using el-get here is the source, guessing it its avaliable in all major repository by now.

	 (el-get 'sync 'goto-chg)
	 (require 'goto-chg)
	 (global-unset-key (kbd "C-j"))
	 (global-set-key (kbd "C-j") 'goto-last-change)

4.13 switch windows

It kinda has been stuck in my config for years, just addicted to it. Seems like this is by default now.

	 ;; (el-get 'sync 'switch-window)
	 ;; (require 'switch-window)
	 ;; (global-set-key (kbd "C-x o") 'switch-window)

4.14 emoji

People have emotions and so do emacs πŸ˜‚.

	 (el-get 'sync 'emojify)
	 (require 'emojify)

	 (add-hook 'org-mode-hook 'emojify-mode)
	 (add-hook 'markdown-mode-hook 'emojify-mode)
	 (add-hook 'git-commit-mode-hook 'emojify-mode)

5 programming

	 (setq-default comment-start "# ")

5.1 internal packages

	 (add-hook 'prog-mode-hook 'which-function-mode)
	 (add-hook 'prog-mode-hook 'toggle-truncate-lines)
	 (setq show-paren-style 'expression)
	 (show-paren-mode 1)

5.2 watch word

	 (defun watch-words ()
	   (interactive)
	   (font-lock-add-keywords
		nil '(("\\<\\(FIX ?-?\\(ME\\)?\\|TODO\\|BUGS?\\|TIPS?\\|TESTING\\|WARN\\(ING\\)?S?\\|WISH\\|IMP\\|NOTE\\)"
			   1 font-lock-warning-face t))))

	 (add-hook 'prog-mode-hook 'watch-words)

5.3 highlight symbol

	 (el-get 'sync 'highlight-symbol)
	 (require 'highlight-symbol)
	 (global-set-key [(control f3)] 'highlight-symbol-at-point)
	 (global-set-key [(shift f3)] 'highlight-symbol-next)
	 (global-set-key [(shift f2)] 'highlight-symbol-prev)

	 (global-unset-key (kbd "<C-down-mouse-1>"))
	 (global-set-key (kbd "<C-down-mouse-1>")
				(lambda (event)
				  (interactive "e")
				  (save-excursion
					(goto-char (posn-point (event-start event)))
					(highlight-symbol-at-point))))

5.4 trailing white-spaces

	 (defun nuke_traling ()
	   (add-hook 'write-file-hooks 'delete-trailing-whitespace)
	   (add-hook 'before-save-hooks 'whitespace-cleanup))

	 (add-hook 'prog-mode-hook 'nuke_traling)

5.5 indentation

	 (setq-default indent-tabs-mode nil)
	 (setq-default tab-width 4)
	 (load "~/.emacs.d/config/compile.cfg.el")

5.6.1 few hooks

	  (el-get 'sync 'fill-column-indicator)
	  (require 'fill-column-indicator)
	  (defun my-compilation-mode-hook ()
		(setq truncate-lines nil) ;; automatically becomes buffer local
		(set (make-local-variable 'truncate-partial-width-windows) nil)
		(toggle-truncate-lines)
		(fci-mode))
	  (add-hook 'compilation-mode-hook 'my-compilation-mode-hook)

5.6.2 bindings

	  (global-set-key (kbd "C-<f8>") 'save-and-compile-again)
	  (global-set-key (kbd "C-<f9>") 'ask-new-compile-command)
	  (global-set-key (kbd "<f8>") 'toggle-compilation-buffer)

5.7 rainbow delimiters

	 (el-get 'sync 'rainbow-delimiters)
	 (add-hook 'prog-mode-hook 'rainbow-delimiters-mode)

5.8 ggtags

code navigation

https://github.com/leoliu/ggtags

install ggtags as mention in the repo

	 (add-hook 'c-mode-common-hook
			   (lambda ()
				 (when (derived-mode-p 'c-mode 'c++-mode 'java-mode)
				   (ggtags-mode 1))))

	 (add-hook 'python-mode-hook 'ggtags-mode)

	 (global-set-key (kbd "<C-double-mouse-1>") 'ggtags-find-tag-mouse)

6 modes

6.1 golang

(add-hook 'before-save-hook #'gofmt-before-save)
(require 'go-eldoc)
(add-hook 'go-mode-hook 'go-eldoc-setup)

(require 'auto-complete)
(require 'go-autocomplete)
(require 'auto-complete-config)
(setq gofmt-command "goimports")

6.2 C/C++

http://www.gnu.org/software/emacs/manual/html_mono/ccmode.html

	 (setq c-tab-always-indent t)
	 (setq c-basic-offset 4)
	 (setq c-indent-level 4)

styling

https://www.emacswiki.org/emacs/IndentingC

	 (require 'cc-mode)
	 (c-set-offset 'substatement-open 0)
	 (c-set-offset 'arglist-intro '+)
	 (add-hook 'c-mode-common-hook '(lambda() (c-toggle-hungry-state 1)))
	 (define-key c-mode-base-map (kbd "RET") 'newline-and-indent)

6.3 python

Welcome to flying circus πŸŽͺ.

	 (setq-default py-indent-offset 4)

6.3.1 jedi

	 (autoload 'jedi:setup "jedi" nil t)
	 (add-hook 'python-mode-hook 'jedi:setup)
	 (setq jedi:complete-on-dot t) ; optional
	 ;; (setq jedi:setup-keys t) ; optional

6.3.2 python-info-look

shortcut β€œ[C-h S]”

	  ;; (add-to-list 'load-path "~/.emacs.d/pydoc-info")
	  ;; (require 'pydoc-info)
	  ;; (require 'info-look)

6.3.3 pdb

	  ;; (setq pdb-path '/usr/lib/python2.4/pdb.py
	  ;; gud-pdb-command-name (symbol-name pdb-path))

	  ;; (defadvice pdb (before gud-query-cmdline activate) "Provide a
	  ;; better default command line when called interactively."
	  ;; (interactive (list (gud-query-cmdline pdb-path
	  ;; (file-name-nondirectory buffer-file-name)))))

ess-style executing python script.

	  ;; (add-to-list 'load-path "~/.emacs.d/modules/py-exec/")
	  ;; (require 'py-exec)
	  (load "~/.emacs.d/modules/py-exec/py-exec.el")

6.4 lua

	 (setq lua-indent-level 4)

6.5 kotlin

	 (setq default-tab-width 4)

6.6 web modes

;;  (load "~/.emacs.d/config/html.cfg.el")

6.7 eww/xwidget

eww β€œEmacs Web Wowser” is a web browser written entirely in elisp avaliable since version 24.4

As much awesome it sounds you will be ridiculed if you try to show of to normal users! 😜

As of version 25.1 webkit has been introduced although you have enable it while compiling, it pretty πŸ†’ feature too have 😎.

config is based on reddit post.

make these keys behave like normal browser

	 (add-hook 'xwidget-webkit-mode (lambda ()
	   (define-key xwidget-webkit-mode-map [mouse-4] 'xwidget-webkit-scroll-down)
	   (define-key xwidget-webkit-mode-map [mouse-5] 'xwidget-webkit-scroll-up)
	   (define-key xwidget-webkit-mode-map (kbd "<up>") 'xwidget-webkit-scroll-down)
	   (define-key xwidget-webkit-mode-map (kbd "<down>") 'xwidget-webkit-scroll-up)
	   (define-key xwidget-webkit-mode-map (kbd "M-w") 'xwidget-webkit-copy-selection-as-kill)
	   (define-key xwidget-webkit-mode-map (kbd "C-c") 'xwidget-webkit-copy-selection-as-kill)))

Adapt webkit according to window configuration chagne automatically without this hook, every time you change your window configuration, you must press a to adapt webkit content to new window size.

	 (add-hook 'window-configuration-change-hook (lambda ()
					(when (equal major-mode 'xwidget-webkit-mode)
					  (xwidget-webkit-adjust-size-dispatch))))

by default, xwidget reuses previous xwidget window, thus overriding your current website, unless a prefix argument is supplied. This function always opens a new website in a new window

	 (defun xwidget-browse-url-no-reuse (url &optional sessoin)
	   (interactive (progn
					  (require 'browse-url)
					  (browse-url-interactive-arg "xwidget-webkit URL: ")))
	   (xwidget-webkit-browse-url url t))

make xwidget default browser

	 ;; (setq browse-url-browser-function (lambda (url session)
	 ;;					   (other-window 1)
	 ;;					   (xwidget-browse-url-no-reuse url)))

6.8 Org

	 (load "~/.emacs.d/config/org-mode.cfg.el")
	 (load "~/.emacs.d/config/babel.cfg.el")

6.8.1 Minor mode

Org-mode is addictive, why not use it as minor-modes.

outline

	  (require 'outline)
	  (add-hook 'prog-mode-hook 'outline-minor-mode)
	  (add-hook 'compilation-mode-hook 'outline-minor-mode)

6.9 dockerfile

Goodies for 🐳 🐳 🐳

	 (el-get 'sync 'dockerfile-mode)
	 (add-to-list 'auto-mode-alist '("Dockerfile" . dockerfile-mode))

6.10 json

	 (setq auto-mode-alist
		(cons '("\.json$" . json-mode) auto-mode-alist))

6.11 markdown

	 (el-get 'sync 'markdown-mode)
	 ;; disable because markdown creating problem to dockerfile-mode
	 ;; (add-to-list 'auto-mode-alist '("\.md" . markdown-mode))

6.12 yasnippet

	 (when window-system
	   (require 'yasnippet)
	   (yas-reload-all)
	   (add-hook 'prog-mode-hook 'yas-minor-mode-on)
	   (add-hook 'org-mode-hook 'yas-minor-mode-on))

Word play consist of collection of nify scripts.

	(load "~/.emacs.d/scripts/wordplay.el")

7.1 duplicate lines/words

	 (global-set-key (kbd "C-`") 'duplicate-current-line)
	 (global-set-key (kbd "C-~") 'duplicate-current-word)

7.2 on point line copy

only enable for C-<insert>

	 (global-set-key (kbd "C-<insert>") 'kill-ring-save-current-line)

7.3 sort words

http://www.emacswiki.org

7.4 popup kill ring

kill πŸ’€ ring πŸ’

Only enable for Shift + <insert>

	 (global-set-key [(shift insert)] 'repetitive-yanking)

8 Testing

This 🚧 section 🚧 contain modes (plug-in) which modified to extreme or πŸ› buggy. May still not be available in el-get.

	(add-to-list 'load-path "~/.emacs.d/modules/")

8.1 browser-refresh

There are stuff like moz-repl, skewer-mode, impatient-mode but nothing beats good old way with xdotool hail X11 for now! πŸ˜‚

	 ;; (add-to-list 'load-path "~/.emacs.d/modules/emacs-browser-refresh/")
	 ;; (require 'browser-refresh)
	 ;; (setq browser-refresh-default-browser 'firefox)

above thingi comment, lets do Makefile!

	 WINDOW=$(shell xdotool search --onlyvisible --class chromium)
	 run:
		xdotool key --window ${WINDOW} 'F5'
		xdotool windowactivate ${WINDOW}

8.2 auto-complete emoji

can’t remember your emoji? this is the thing you need

Note: if you are using company mode use company-emoji requires Symbola font, to be installed.

	 (add-to-list 'load-path "~/.emacs.d/modules/emacs-ac-emoji/")
	 (require 'ac-emoji)

	 (add-hook 'org-mode-hook 'auto-complete-mode)
	 (add-hook 'org-mode-hook 'ac-emoji-setup)
	 (add-hook 'markdown-mode-hook 'ac-emoji-setup)
	 (add-hook 'git-commit-mode-hook 'ac-emoji-setup)

	 (set-fontset-font
		t 'symbol
		  (font-spec :family "Symbola") nil 'prepend)

8.3 window numbering

also avalible in el-get.

	 (add-to-list 'load-path "~/.emacs.d/modules/window-numbering/")
	 (require 'window-numbering)
	 (window-numbering-mode)

8.4 highlight indentation

Using localreadhead fork of highlight indentation, for web-mode compatibility. See yasnippet issue #396

other color: β€œ#aaeeba”

	 (add-to-list 'load-path "~/.emacs.d/modules/indent/antonj/")
	 ;;; DID YOU GOT STUCK ABOVE? COMMENT LINE ABOVE & UNCOMMENT NEXT LINE
	 ;; (el-get 'sync 'highlight-indentation)
	 (require 'highlight-indentation)
	 (set-face-background 'highlight-indentation-face "olive drab")
	 (set-face-background 'highlight-indentation-current-column-face "#c3b3b3")

	 (add-hook 'prog-mode-hook 'highlight-indentation-mode)
	 (add-hook 'prog-mode-hook 'highlight-indentation-current-column-mode)

8.5 hideshowvis mode

http://www.emacswiki.org/emacs/download/hideshowvis.el

;; (autoload 'hideshowvis-enable "hideshowvis")
;; (autoload 'hideshowvis-minor-mode
;;  "hideshowvis"
;;  "Will indicate regions foldable with hideshow in the fringe."
;;  'interactive)

;; (add-hook 'python-mode-hook 'hideshowvis-enable)

8.6 auto-dim-buffer

https://github.com/mina86/auto-dim-other-buffers.el

	 (when window-system
	   (add-to-list 'load-path "~/.emacs.d/modules/auto-dim-other-buffers.el")
	   (require 'auto-dim-other-buffers)
	   (add-hook 'after-init-hook (lambda ()
									(when (fboundp 'auto-dim-other-buffers-mode)
									  (auto-dim-other-buffers-mode t)))))

8.7 ansi-color

Need to fix 265 color support. This is what I meant screenshot was produced using code.

	 (add-to-list 'load-path "~/.emacs.d/modules/colors")
	 ;;; DID YOU GOT STUCK ABOVE? COMMENT LINE ABOVE
	 (require 'ansi-color)
	 (defun colorize-compilation-buffer ()
	   (toggle-read-only)
	   (ansi-color-apply-on-region (point-min) (point-max))
	   (toggle-read-only))
	 (add-hook 'compilation-filter-hook 'colorize-compilation-buffer)

8.8 line number

http://www.emacswiki.org/LineNumbers http://elpa.gnu.org/packages/nlinum-1.1.el

	 (require 'nlinum)
	 (setq nlinum-delay t)
	 (add-hook 'find-file-hook (lambda () (nlinum-mode 1)))

8.9 isend-mode

	 ;; (add-to-list 'load-path "~/.emacs.d/modules/isend-mode/")
	 ;; (require 'isend)

8.10 LFG mode

	 ;; (setq xle-buffer-process-coding-system 'utf-8)
	 ;; (load-library "/opt/xle/emacs/lfg-mode")

8.11 Wakka Time

Well it’s a crap, requires lots of dependencies

		;;(global-wakatime-mode)

8.12 autocomplete helm

;;(require 'ac-helm)  ;; Not necessary if using ELPA package
;;(global-set-key (kbd "C-:") 'ac-complete-with-helm)
;;(define-key ac-complete-mode-map (kbd "C-:") 'ac-complete-with-helm)

8.13 gocode

(add-to-list 'load-path "~/.emacs.d/modules/gocode")
(require 'go-autocomplete)
(require 'auto-complete-config)
(ac-config-default)
(when (memq window-system '(mac ns))
  (exec-path-from-shell-initialize)
  (exec-path-from-shell-copy-env "GOPATH"))

8.14 stock-ticker

;;(add-to-list 'load-path "~/.emacs.d/modules/stock-ticker.el")
;;(require 'stock-ticker)

8.15 sky-color-clock

(add-to-list 'load-path "~/.emacs.d/modules/sky-color-clock.el")
(require 'sky-color-clock)
(sky-color-clock-initialize 35) ; Kathmandu, Nepal

9 __meta__

10 References

  1. @rhoit