mirror of
https://github.com/jojojames/evil-collection.git
synced 2024-06-28 07:40:50 +02:00
98 lines
2.7 KiB
EmacsLisp
98 lines
2.7 KiB
EmacsLisp
;;; evil-collection-elfeed.el --- Evil bindings for elfeed -*- lexical-binding: t -*-
|
|
|
|
;; Copyright (C) 2017 Pierre Neidhardt
|
|
|
|
;; Author: Pierre Neidhardt <ambrevar@gmail.com>
|
|
;; Maintainer: James Nguyen <james@jojojames.com>
|
|
;; Pierre Neidhardt <ambrevar@gmail.com>
|
|
;; URL: https://github.com/jojojames/evil-collection
|
|
;; Version: 0.0.1
|
|
;; Package-Requires: ((emacs "25.1"))
|
|
;; Keywords: evil, elfeed, tools
|
|
|
|
;; This file is free software; you can redistribute it and/or modify
|
|
;; it under the terms of the GNU General Public License as published
|
|
;; by the Free Software Foundation; either version 3, or (at your
|
|
;; option) any later version.
|
|
;;
|
|
;; This file is distributed in the hope that it will be useful,
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
;; GNU General Public License for more details.
|
|
;;
|
|
;; For a full copy of the GNU General Public License
|
|
;; see <http://www.gnu.org/licenses/>.
|
|
|
|
;;; Commentary:
|
|
;; Evil bindings for elfeed.
|
|
|
|
;;; Code:
|
|
(require 'elfeed nil t)
|
|
(require 'evil)
|
|
|
|
(defun evil-collection-elfeed-setup ()
|
|
"Set up `evil' bindings for `elfeed'."
|
|
(evil-set-initial-state 'elfeed-search-mode 'motion)
|
|
|
|
(evil-define-key 'motion elfeed-search-mode-map
|
|
;; open
|
|
(kbd "<return>") 'elfeed-search-show-entry
|
|
(kbd "S-<return>") 'elfeed-search-browse-url
|
|
"go" 'elfeed-search-browse-url
|
|
|
|
"y" 'elfeed-search-yank
|
|
|
|
;; filter
|
|
"s" 'elfeed-search-live-filter
|
|
"S" 'elfeed-search-set-filter
|
|
|
|
;; refresh
|
|
"gR" 'elfeed-search-fetch ; TODO: Which update function is more useful?
|
|
"gr" 'elfeed-search-update--force
|
|
|
|
;; quit
|
|
"q" 'quit-window
|
|
"ZQ" 'quit-window
|
|
"ZZ" 'quit-window)
|
|
|
|
(evil-define-key '(motion visual) elfeed-search-mode-map
|
|
"+" 'elfeed-search-tag-all
|
|
"-" 'elfeed-search-untag-all
|
|
"U" 'elfeed-search-tag-all-unread
|
|
"u" 'elfeed-search-untag-all-unread)
|
|
|
|
(evil-set-initial-state 'elfeed-show-mode 'motion)
|
|
(evil-define-key 'motion elfeed-show-mode-map
|
|
(kbd "S-<return>") 'elfeed-show-visit
|
|
"go" 'elfeed-show-visit
|
|
|
|
;; filter
|
|
"s" 'elfeed-show-new-live-search
|
|
|
|
"y" 'elfeed-show-yank
|
|
|
|
"+" 'elfeed-show-tag
|
|
"-" 'elfeed-show-untag
|
|
|
|
"A" 'elfeed-show-add-enclosure-to-playlist
|
|
"P" 'elfeed-show-play-enclosure
|
|
"d" 'elfeed-show-save-enclosure
|
|
|
|
"]" 'elfeed-show-next
|
|
"[" 'elfeed-show-prev
|
|
"gj" 'elfeed-show-next
|
|
"gk" 'elfeed-show-prev
|
|
(kbd "C-j") 'elfeed-show-next
|
|
(kbd "C-k") 'elfeed-show-prev
|
|
|
|
;; refresh
|
|
"gr" 'elfeed-show-refresh
|
|
|
|
;; quit
|
|
"q" 'elfeed-kill-buffer
|
|
"ZQ" 'elfeed-kill-buffer
|
|
"ZZ" 'elfeed-kill-buffer))
|
|
|
|
(provide 'evil-collection-elfeed)
|
|
;;; evil-collection-elfeed.el ends here
|