Adds powerline to Emacs

This commit is contained in:
William Carroll 2017-05-30 15:50:39 -04:00
parent b92bf435f2
commit a4f87fe53c

View file

@ -106,15 +106,11 @@
(defadvice delete-window (after restore-balance activate) (defadvice delete-window (after restore-balance activate)
(balance-windows)) (balance-windows))
;; Powerline
;; Smart mode line (use-package powerline
(use-package smart-mode-line
:ensure t :ensure t
:init
(load-theme 'smart-mode-line-dark t)
:config :config
(setq sml/no-confirm-load-theme t) (powerline-default-theme))
(sml/setup))
(defun wc/projectile-shell-pop () (defun wc/projectile-shell-pop ()
@ -127,11 +123,6 @@
(term-send-string (terminal) (format "cd '%s'\n" default-directory)) (term-send-string (terminal) (format "cd '%s'\n" default-directory))
(get-buffer-process "*ansi-term*"))) (get-buffer-process "*ansi-term*")))
;; Disable C-c binding (future only have this for Ansi-Term
(global-unset-key (kbd "C-c"))
;; ERC configuration (IRC in Emacs) ;; ERC configuration (IRC in Emacs)
(use-package erc (use-package erc
:ensure t :ensure t
@ -220,11 +211,21 @@
(ad-activate 'term-sentinel) (ad-activate 'term-sentinel)
(defun wc/ansi-term-paste (&optional string)
"Paste into `ansi-term'."
(interactive)
(process-send-string
(get-buffer-process (current-buffer))
(if string string (current-kill 0)))))
;; Ansi-Term ;; Ansi-Term
(use-package term (use-package term
:ensure t :ensure t
:init :init
(setq explicit-shell-file-name "/bin/zsh") (setq explicit-shell-file-name "/bin/zsh")
:bind (("C-v" . wc/ansi-term-paste))
:config :config
(add-hook 'term-mode-hook 'wc/bootstrap-ansi-term) (add-hook 'term-mode-hook 'wc/bootstrap-ansi-term)
(linum-mode nil)) (linum-mode nil))
@ -274,6 +275,8 @@
("C-l" . evil-window-right) ("C-l" . evil-window-right)
("C-k" . evil-window-up) ("C-k" . evil-window-up)
("C-j" . evil-window-down) ("C-j" . evil-window-down)
("C-c" . term-interrupt-subjob)
:map evil-normal-state-map :map evil-normal-state-map
("<return>" . nil) ("<return>" . nil)