[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/zig-mode 2acd88f 049/104: add zig-mode-map with default ke
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/zig-mode 2acd88f 049/104: add zig-mode-map with default keybinding |
Date: |
Sun, 29 Aug 2021 11:37:01 -0400 (EDT) |
branch: elpa/zig-mode
commit 2acd88f9369f1e2fc203e95d8437724d0384f5d7
Author: Marcio Giaxa <i@mgxm.me>
Commit: Marcio Giaxa <i@mgxm.me>
add zig-mode-map with default keybinding
`C-c C-b` runs `zig-compile`
`C-c C-f` runs `zig-format-buffer`
`C-c C-r` runs `zig-run`
`C-c C-t` runs `zig-test-buffer`
---
zig-mode.el | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/zig-mode.el b/zig-mode.el
index 819b7fd..5100009 100644
--- a/zig-mode.el
+++ b/zig-mode.el
@@ -49,7 +49,6 @@
;; zig CLI commands
-
(defun zig--run-cmd (cmd &optional source &rest args)
"Use compile command to execute a zig CMD with ARGS if given.
If given a SOURCE, execute the CMD on it."
@@ -388,9 +387,21 @@ If given a SOURCE, execute the CMD on it."
'("enum" "struct" "union"))
`(("Fn" ,(zig-re-definition "fn") 1))))
+(defvar zig-mode-map
+ (let ((map (make-sparse-keymap)))
+ (define-key map (kbd "C-c C-b") 'zig-compile)
+ (define-key map (kbd "C-c C-f") 'zig-format-buffer)
+ (define-key map (kbd "C-c C-r") 'zig-run)
+ (define-key map (kbd "C-c C-t") 'zig-test-buffer)
+ map)
+ "Keymap for Zig major mode.")
+
;;;###autoload
(define-derived-mode zig-mode prog-mode "Zig"
- "A major mode for the Zig programming language."
+ "A major mode for the Zig programming language.
+
+\\{zig-mode-map}"
+ :group 'zig-mode
(setq-local comment-start "// ")
(setq-local comment-end "")
(setq-local electric-indent-chars
- [nongnu] elpa/zig-mode c5315ff 026/104: Apply font-lock-doc-face to doc comments (for issue #5), (continued)
- [nongnu] elpa/zig-mode c5315ff 026/104: Apply font-lock-doc-face to doc comments (for issue #5), ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode c2deea8 037/104: Merge pull request #14 from mgxm/imenu, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode 52e3e20 004/104: README., ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode bc1bed3 009/104: Fix package, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode 1d26390 015/104: Merge pull request #3 from purcell/patch-1, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode 0ed57d8 014/104: Minor fixes, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode e659a58 024/104: Set comment-start and comment-end (for issue #5) (#7), ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode b773127 027/104: Initial implementation of indent-line-function, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode 9c200f4 032/104: Add -y flag to apt-get command in AppVeyor install script, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode e0bccb1 047/104: add zig-format-buffer command, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode 2acd88f 049/104: add zig-mode-map with default keybinding,
ELPA Syncer <=
- [nongnu] elpa/zig-mode 0a150f2 054/104: Merge pull request #19 from mgxm/fix_multiline_string, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode 64994f1 053/104: Merge pull request #17 from xuchunyang/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode 9609cc3 055/104: Merge pull request #21 from SerialDev/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode fab1924 066/104: fix test regression, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode f9e5c57 065/104: Merge pull request #28 from justjosias/pre-doc-comment, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode 2426668 070/104: Remove `this` constant, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode e110c29 073/104: Merge pull request #29 from joachimschmidt557/test-regression, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode 6d78a6e 074/104: Fix appveyor.yml, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode 9b44e04 075/104: Merge pull request #38 from mdsteele/appveyor, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode 6f10653 085/104: Merge pull request #41 from dedifferentiator/master, ELPA Syncer, 2021/08/29