Add key bindings for godoc
C-h G -> godoc: can be used in any mode C-h f -> godoc-at-point: go-mode only
This commit is contained in:
parent
96c155fa0e
commit
3491279585
1 changed files with 5 additions and 2 deletions
|
@ -42,15 +42,18 @@
|
||||||
;; Ignore go test -c output files
|
;; Ignore go test -c output files
|
||||||
(add-to-list 'completion-ignored-extensions ".test")
|
(add-to-list 'completion-ignored-extensions ".test")
|
||||||
|
|
||||||
|
(define-key 'help-command (kbd "G") 'godoc)
|
||||||
|
|
||||||
(eval-after-load 'go-mode
|
(eval-after-load 'go-mode
|
||||||
'(progn
|
'(progn
|
||||||
(defun prelude-go-mode-defaults ()
|
(defun prelude-go-mode-defaults ()
|
||||||
;; Default key bindings for gotest.el
|
;; Add to default go-mode key bindings
|
||||||
(let ((map go-mode-map))
|
(let ((map go-mode-map))
|
||||||
(define-key map (kbd "C-c a") 'go-test-current-project) ;; current package, really
|
(define-key map (kbd "C-c a") 'go-test-current-project) ;; current package, really
|
||||||
(define-key map (kbd "C-c m") 'go-test-current-file)
|
(define-key map (kbd "C-c m") 'go-test-current-file)
|
||||||
(define-key map (kbd "C-c .") 'go-test-current-test)
|
(define-key map (kbd "C-c .") 'go-test-current-test)
|
||||||
(define-key map (kbd "C-c b") 'go-run))
|
(define-key map (kbd "C-c b") 'go-run)
|
||||||
|
(define-key map (kbd "C-h f") 'godoc-at-point))
|
||||||
|
|
||||||
;; Prefer goimports to gofmt if installed
|
;; Prefer goimports to gofmt if installed
|
||||||
(let ((goimports (executable-find "goimports")))
|
(let ((goimports (executable-find "goimports")))
|
||||||
|
|
Loading…
Reference in a new issue