summaryrefslogtreecommitdiff
path: root/.config/nyxt/keybinds.lisp
blob: 4bc9a0c069fea805107fafd5d99b76815b25e725 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
(in-package #:nyxt-user)

(define-configuration :document-mode
  "Add basic keybindings."
  ((keyscheme-map
    (keymaps:define-keyscheme-map
	"custom" (list :import %slot-value%)
      ;; If you want to have VI bindings overriden, just use
      ;; `scheme:vi-normal' or `scheme:vi-insert' instead of
      ;; `scheme:emacs'.
      nyxt/keyscheme:emacs
      (list "C-c p" 'copy-password
	    "C-c u" 'copy-username
	    "C-c y" 'autofill
	    "C-f" :history-forwards-maybe-query
	    "C-i" :input-edit-mode
	    "M-:" 'eval-expression
	    "C-s" :search-buffer
	    "C-x 3" 'hsplit
	    "C-x 1" 'close-all-panels
	    "C-'"  (lambda-command insert-left-angle-quote ()
		     (ffi-buffer-paste (current-buffer) "«"))
	    "C-M-'" (lambda-command insert-left-angle-quote ()
		      (ffi-buffer-paste (current-buffer) "»"))
	    "C-M-hyphen" (lambda-command insert-left-angle-quote ()
			   (ffi-buffer-paste (current-buffer) "—"))
	    "C-M-_" (lambda-command insert-left-angle-quote ()
		      (ffi-buffer-paste (current-buffer) "–"))
	    "C-E" (lambda-command small-e-with-acute ()
		    (ffi-buffer-paste (current-buffer) "é"))
	    "C-A" (lambda-command small-a-with-acute ()
		    (ffi-buffer-paste (current-buffer) "á"))
	    "C-I" (lambda-command small-i-diaeresis ()
		    (ffi-buffer-paste (current-buffer) "ï"))
	    "C-h hyphen" 'clcs-lookup)))))