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:
Doug MacEachern 2014-06-17 17:55:42 -07:00
parent 96c155fa0e
commit 3491279585

View file

@ -42,15 +42,18 @@
;; Ignore go test -c output files
(add-to-list 'completion-ignored-extensions ".test")
(define-key 'help-command (kbd "G") 'godoc)
(eval-after-load 'go-mode
'(progn
(defun prelude-go-mode-defaults ()
;; Default key bindings for gotest.el
;; Add to default go-mode key bindings
(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 m") 'go-test-current-file)
(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
(let ((goimports (executable-find "goimports")))