;;supress the redefined warning at startup
(setq ad-redefinition-action 'accept)
+
+ (setq scroll-step 1)
+ (setq scroll-margin 5)
+
+ (fringe-mode '(0 . 0))
#+END_SRC
*** Custom file
#+END_SRC
+search text theme
+#+BEGIN_SRC emacs-lisp :tangle yes :results silent
+ (set-face-attribute 'lazy-highlight nil :background "yellow" :foreground "black" :weight 'bold)
+#+END_SRC
+
** Rainbow-delimiter
#+BEGIN_SRC emacs-lisp :tangle yes :results silent
(irony-mode . "")
(page-break-lines-mode . "")
(yas-minor-mode . "y")
+ ;; default jj
+ (evil-escape-mode . "")
;; Major modes
(lisp-interaction-mode . "λ")
(hi-lock-mode . "")
))
(center (list (powerline-raw " " face1)
(funcall separator-left face1 face2)
+ (powerline-raw (when (and (boundp 'evil-mode) evil-mode) evil-mode-line-tag) face2)
(when (and (boundp 'erc-track-minor-mode) erc-track-minor-mode)
(powerline-raw erc-modified-channels-object face2 'l))
(powerline-major-mode face2 'l)
(use-package org-bullets
:ensure t
:init
- (add-hook 'org-mode-hook
- (lambda ()
- (org-bullets-mode t))))
+ (add-hook 'org-mode-hook (apply-partially #'org-bullets-mode t)))
(setq org-bullets-bullet-list '("⦿" "✪" "◉" "○" "►" "◆"))
#+BEGIN_SRC emacs-lisp :tangle yes :results silent
(require 'utilities)
- (add-hook 'eshell-mode-hook (lambda ()
- (local-set-key (kbd "C-l") 'sd/eshell-clear-buffer)))
+ ;; (add-hook 'eshell-mode-hook (lambda ()
+ ;; (local-set-key (kbd "C-l") 'sd/eshell-clear-buffer)))
+ (add-hook 'eshell-mode-hook (apply-partially #'local-set-key (kbd "C-l") 'sd/eshell-clear-buffer))
+ ;; (add-hook 'eshell-mode-map (lambda () (interactive)
+ ;; (define-key eshell-mode-map (kbd "<tab>") 'completion-at-point)))
#+END_SRC
** Toggle Eshell
** Which key
[[https://github.com/justbur/emacs-which-key][which-key]] show the key bindings
#+BEGIN_SRC emacs-lisp :tangle yes :results silent
- (use-package which-key
- :ensure t
- :config
- (which-key-mode))
+ ;; (use-package which-key
+ ;; :ensure t
+ ;; :config
+ ;; (which-key-mode))
#+END_SRC
** View only for some directory
(use-package lispy
:ensure t
:init
+ (setq lispy-delete-backward-recenter 0)
(with-eval-after-load "lispy"
(define-key lispy-mode-map (kbd "M-o") nil)
(define-key lispy-mode-map (kbd "g") 'special-lispy-goto-local)
(define-key lispy-mode-map (kbd "G") 'special-lispy-goto)
(define-key lispy-mode-map (kbd "M-m") 'back-to-indentation))
:config
- (add-hook 'emacs-lisp-mode-hook (lambda () (lispy-mode 1))))
-
-
+ (add-hook 'emacs-lisp-mode-hook (apply-partially #'lispy-mode 1)))
#+END_SRC
** Perl
(setq cperl-tab-always-indent t)
;(setq cperl-brace-offset 0)
- (add-hook 'cperl-mode-hook
- '(lambda ()
- (cperl-set-style "C++")))
+ (add-hook 'cperl-mode-hook (apply-partially #'cperl-set-style "C++"))
(defalias 'perldoc 'cperl-perldoc)
#+END_SRC
;; (with-eval-after-load 'gnus-summary-mode
;; (define-key gnus-summary-mode-map (kbd "C-o") 'sd/hydra-window/body))
- (add-hook 'gnus-summary-mode-hook (lambda ()
- (define-key gnus-summary-mode-map (kbd "C-o") nil)))
+ ;; (add-hook 'gnus-summary-mode-hook (lambda ()
+ ;; (define-key gnus-summary-mode-map (kbd "C-o") nil)))
+ ;(add-hook 'gnus-summary-mode-hook (apply-partially #'define-key gnus-summary-mode-map (kbd "C-o") nil))
#+END_SRC
#+END_SRC
* Evil Mode
#+BEGIN_SRC emacs-lisp :tangle yes :results silent
- (use-package evil
- :ensure t
- :init
- (setq evil-default-state 'emacs)
- :config
- (evil-mode t)
- (defalias 'evil-insert-state 'evil-emacs-state)
- (setq evil-emacs-state-cursor '("red" box))
- (setq evil-normal-state-cursor '("green" box))
- (setq evil-visual-state-cursor '("orange" box))
- (setq evil-insert-state-cursor '("red" bar))
- (setq evil-replace-state-cursor '("red" bar))
- (setq evil-operator-state-cursor '("red" hollow)))
+ (org-babel-load-file "~/.emacs.d/emacs-evil.org")
#+END_SRC
+
+
* Note
** Check if emacs is in terminal of graphic mode
Use =display-graphic-p= instead of =window-system=
blog with modify list
draw one line top of the windows
+* test
+#+BEGIN_SRC emacs-lisp :tangle yes :results silent
+ ;; test local mode line
+ ;; (add-to-list 'load-path "~/.emacs.d/elisp")
+ ;; (require 'my-mode-line)
+#+END_SRC