[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] scratch/add-vdiff b2ba7ab 070/258: Move hydra to main file and av
From: |
Justin Burkett |
Subject: |
[elpa] scratch/add-vdiff b2ba7ab 070/258: Move hydra to main file and avoid dependency |
Date: |
Wed, 17 May 2017 08:13:25 -0400 (EDT) |
branch: scratch/add-vdiff
commit b2ba7ab84eb18aa1c6f5d71cef90c578e6a4ac3a
Author: justbur <address@hidden>
Commit: justbur <address@hidden>
Move hydra to main file and avoid dependency
---
vdiff-hydra.el | 53 -----------------------------------------------------
vdiff.el | 21 +++++++++++++++++++++
2 files changed, 21 insertions(+), 53 deletions(-)
diff --git a/vdiff-hydra.el b/vdiff-hydra.el
deleted file mode 100644
index 3c0beff..0000000
--- a/vdiff-hydra.el
+++ /dev/null
@@ -1,53 +0,0 @@
-;;; vdiff-hydra.el --- A hydra for vdiff -*- lexical-binding: t; -*-
-
-;; Copyright (C) 2016 Justin Burkett
-
-;; Author: Justin Burkett <address@hidden>
-;; URL: https://github.com/justbur/emacs-vdiff
-;; Version: 0
-;; Keywords:
-;; Package-Requires: ((emacs "24.3") (hydra "0.13.6")
-
-;; This program 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 of the License, or
-;; (at your option) any later version.
-
-;; This program 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.
-
-;; You should have received a copy of the GNU General Public License
-;; along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-;;; Commentary:
-
-;; Defines a hydra for quick access to vdiff commands
-
-;;; Code:
-(require 'hydra)
-(require 'vdiff)
-
-(defhydra vdiff-hydra (nil nil :hint nil)
- "
- Navigation^^ Transmit^^ Folds^^^^ Other^^
- -^^------------------- --^^------------ -^^^^------------------
--^-^---------------
- [_n_] next change [_s_] send [_o_/_O_] open (all) [_w_]
save buffers
- [_p_] previous change [_r_] receive [_c_/_C_] close (all) [_q_]
quit hydra
- [_g_] goto corr. line ^ ^ ^ ^ ^ ^ [_Q_]
quit vdiff "
- ("g" vdiff-goto-corresponding-line)
- ("n" vdiff-next-change)
- ("p" vdiff-previous-change)
- ("s" vdiff-send-changes)
- ("r" vdiff-receive-changes)
- ("Q" vdiff-quit)
- ("w" vdiff-save-buffers)
- ("o" vdiff-open-fold)
- ("O" vdiff-open-all-folds)
- ("c" vdiff-close-fold)
- ("C" vdiff-close-all-folds)
- ("q" nil :exit t))
-
-(provide 'vdiff-hydra)
-;;; vdiff-hydra.el ends here
diff --git a/vdiff.el b/vdiff.el
index 0d769a6..a062d91 100644
--- a/vdiff.el
+++ b/vdiff.el
@@ -1005,5 +1005,26 @@ enabled automatically if `vdiff-lock-scrolling' is
non-nil."
(remove-hook 'post-command-hook #'vdiff-mirror-commands t))
(message "Scrolling unlocked"))))
+(when (fboundp 'defhydra)
+ (defhydra vdiff-hydra (nil nil :hint nil :foreign-keys run)
+ "
+ Navigation^^ Transmit^^ Folds^^^^ Other^^
+ -^^------------------- --^^------------ -^^^^------------------
--^-^---------------
+ [_n_] next change [_s_] send [_o_/_O_] open (all) [_w_]
save buffers
+ [_p_] previous change [_r_] receive [_c_/_C_] close (all) [_q_]
quit hydra
+ [_g_] goto corr. line ^ ^ ^ ^ ^ ^ [_Q_]
quit vdiff "
+ ("g" vdiff-goto-corresponding-line)
+ ("n" vdiff-next-change)
+ ("p" vdiff-previous-change)
+ ("s" vdiff-send-changes)
+ ("r" vdiff-receive-changes)
+ ("Q" vdiff-quit)
+ ("w" vdiff-save-buffers)
+ ("o" vdiff-open-fold)
+ ("O" vdiff-open-all-folds)
+ ("c" vdiff-close-fold)
+ ("C" vdiff-close-all-folds)
+ ("q" nil :exit t)))
+
(provide 'vdiff)
;;; vdiff.el ends here
- [elpa] scratch/add-vdiff 4b7f3d1 004/258: Make buffer names easier to read in functions, (continued)
- [elpa] scratch/add-vdiff 4b7f3d1 004/258: Make buffer names easier to read in functions, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 1155601 014/258: Fix problem with restarting mode and temp files, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 1b96390 021/258: Use fringes for open folds, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 8a51468 025/258: Don't close fold on point on refresh, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 4d5299e 031/258: Fix alignment of folds next to subtractions, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff f826315 033/258: Increase default fold padding, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 3e1169c 043/258: Screenshot showing off theme integration, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff a094450 048/258: Tweak line translation rules for better scrolling, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 0fd1837 063/258: Update screenshot, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff b02b59e 072/258: Whitespace cleanup, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff b2ba7ab 070/258: Move hydra to main file and avoid dependency,
Justin Burkett <=
- [elpa] scratch/add-vdiff bfdfc74 053/258: Modify gitignore, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff d25fe21 054/258: More arg name changes, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 875e6ce 057/258: Merge pull request #2 from purcell/patch-1, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 1640078 061/258: Merge remote-tracking branch 'origin/master', Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff c6c959d 071/258: Fix nth-change at beginning and end of buffer, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff d07e9fb 056/258: Fix typo in package description, remove redundant "for Emacs", Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 69c85cb 080/258: Better way to trigger other window update, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff cce8eb1 086/258: Don't close fold on point after change, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 8a88f84 074/258: Use simpler strategy for updating windows on line move, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff c5589a1 089/258: Delete temp files on deactivation, Justin Burkett, 2017/05/17