Browse Source

Add elfeed, leader major mode, fix latex tabs

master
Riyyi 4 years ago
parent
commit
00699ccb74
  1. 101
      .emacs.d/config.org

101
.emacs.d/config.org

@ -338,7 +338,8 @@ On the fly syntax checking.
:defer t
:hook
((org-mode
prog-mode)
prog-mode
tex-mode)
. yas-minor-mode)
:custom (yas-prompt-functions '(yas-ido-prompt
yas-completing-prompt))
@ -422,21 +423,47 @@ Irony requires M-x =irony-install-server=.
Possible modern replacement for column-enforce-mode:
https://github.com/laishulu/hl-fill-column
*** RSS
#+BEGIN_SRC emacs-lisp
(use-package elfeed
:custom
(elfeed-db-directory "~/.emacs.d/elfeed/")
(elfeed-enclosure-default-dir "~/downloads/")
(elfeed-search-filter "@6-months-ago +unread")
(elfeed-search-clipboard-type 'CLIPBOARD)
(elfeed-search-title-max-width 100)
(elfeed-search-title-min-width 30)
(elfeed-search-trailing-width 50)
(elfeed-show-unique-buffers t)
(elfeed-feeds
'(("https://www.youtube.com/feeds/videos.xml?user=linustechtips" comedy reviews youtube)
("https://www.youtube.com/feeds/videos.xml?channel_id=UC2eYFnH61tmytImy1mTYvhA" boomer linux shell youtube)
("https://phoronix.com/rss.php" linux news reviews)
))
:hook
(elfeed-search-mode . (lambda (&rest _) (display-line-numbers-mode 0)))
(elfeed-show-mode . (lambda (&rest _) (display-line-numbers-mode 0))))
#+END_SRC
* General
#+BEGIN_SRC emacs-lisp
;; Columns start at 1
(setq column-number-indicator-zero-based nil)
;; Custom thems, do not ask if safe
(setq custom-safe-themes t)
;; Scrolling
(setq scroll-conservatively 1)
(setq mouse-wheel-scroll-amount '(5))
(setq mouse-wheel-progressive-speed nil)
;; Columns start at 1
(setq column-number-indicator-zero-based nil)
;; Automatically add newline on save at the end of the file
(setq require-final-newline t)
;; Change parenthesis behavior
;; Parenthesis, set behavior
(setq show-paren-delay 0)
(setq show-paren-style 'mixed)
@ -754,6 +781,9 @@ Evil command aliases.
;; PHP, set correct tab mode
(add-hook 'php-mode-hook (lambda () (setq indent-tabs-mode t)))
;; LaTeX, set correct tab mode
(add-hook 'latex-mode-hook (lambda () (setq indent-tabs-mode t)))
#+END_SRC
* Key Bindings
@ -831,7 +861,7 @@ Disable spacebar in evil motion.
(define-key company-active-map (kbd "M-k") #'company-select-previous)
(define-key company-active-map (kbd "M-l") #'company-complete-selection)
(define-key company-active-map (kbd "<escape>") #'company-abort))
;https://github.com/company-mode/company-mode/blob/master/company.el#L661
; https://github.com/company-mode/company-mode/blob/master/company.el#L661
;; Evil command history selection
(with-eval-after-load 'evil-ex
@ -880,6 +910,22 @@ Disable spacebar in evil motion.
"m" 'dashboard-goto-bookmarks
"p" 'dashboard-goto-projects
"r" 'dashboard-goto-recent-files
)
;; Elfeed
(general-define-key
:states 'normal
:keymaps 'elfeed-search-mode-map
"gr" 'elfeed-search-update--force
"gR" 'elfeed-search-fetch
"q" 'kill-this-buffer
)
(general-define-key
:states 'normal
:keymaps 'elfeed-show-mode-map
"g" 'elfeed-show-refresh
"q" 'kill-this-buffer
))
#+END_SRC
@ -887,6 +933,8 @@ Disable spacebar in evil motion.
General.el ~leader key binds.
*** Global
#+BEGIN_SRC emacs-lisp
(with-eval-after-load 'general
(general-create-definer space-leader
@ -895,10 +943,6 @@ General.el ~leader key binds.
:global-prefix "M-SPC"
:states '(normal visual insert motion emacs))
(general-create-definer comma-leader
:prefix ","
:states '(normal visual))
(space-leader
"SPC" '(smex :which-key "Smex")
"RET" '(bookmark-jump-ido :which-key "Jump to bookmark")
@ -987,20 +1031,22 @@ General.el ~leader key binds.
;; Window
;; "w" '(:keymap evil-window-map :which-key "window")
"w" '(:ignore t :which-key "window")
"w h" '(evil-window-left :which-key "Focus window left")
"w j" '(evil-window-down :which-key "Focus window down")
"w k" '(evil-window-up :which-key "Focus window up")
"w l" '(evil-window-right :which-key "Focus window right")
"w h" '(windmove-left :which-key "Focus window left")
"w j" '(windmove-down :which-key "Focus window down")
"w k" '(windmove-up :which-key "Focus window up")
"w l" '(windmove-right :which-key "Focus window right")
"w o" '(delete-other-windows :which-key "Close other windows")
"w s" '(:ignore t :which-key "split")
"w s h" '(split-follow-horizontally :which-key "Split horizontal")
"w s v" '(split-follow-vertically :which-key "Split vertical")
"w w" '(other-window :which-key "Focus other window")
"w q" '(delete-window :which-key "Close window")
"w <left>" '(evil-window-left :which-key "Focus window left")
"w <right>" '(evil-window-right :which-key "Focus window down")
"w <up>" '(evil-window-up :which-key "Focus window up")
"w <down>" '(evil-window-down :which-key "Focus window right")
"w <left>" '(windmove-left :which-key "Focus window left")
"w <right>" '(windmove-right :which-key "Focus window right")
"w <up>" '(windmove-up :which-key "Focus window up")
"w <down>" '(windmove-down :which-key "Focus window down")
;; winner-redo (built-in window history)
;; winner-undo
"x" '(smex-major-mode-commands :which-key "Smex major mode")
))
@ -1010,6 +1056,25 @@ Source:
https://github.com/redguardtoo/emacs.d/blob/master/lisp/init-evil.el#L712
https://github.com/suyashbire1/emacs.d/blob/master/init.el
*** Major mode
#+BEGIN_SRC emacs-lisp
(general-create-definer comma-leader
:prefix "SPC ,"
:states '(normal visual))
(comma-leader elfeed-search-mode-map
"" '(:ignore t :which-key "elfeed")
"g" 'elfeed-search-update--force
"G" 'elfeed-search-fetch
)
(comma-leader elfeed-show-mode-map
"" '(:ignore t :which-key "elfeed")
"g" 'elfeed-show-refresh
)
#+END_SRC
* Notes
Org mode keybinds:

Loading…
Cancel
Save