【问题标题】:Emacs clojure: go to definitionEmacs clojure:去定义
【发布时间】:2015-02-23 15:05:11
【问题描述】:

我使用 ergoemacs-mode、clojuremode 和自动完成

自动完成功能非常好。我应该按什么来定义函数?我习惯了 Cursive,但我想使用免费的 Emacs,我需要去定义功能。

这是我的init.el 文件:

(global-set-key [f8] 'neotree-toggle)

;; Set bigger fonts
(set-default-font "Ubuntu Mono-16")

(add-hook 'clojure-mode-hook 'turn-on-eldoc-mode)
(setq nrepl-popup-stacktraces nil)
(add-to-list 'same-window-buffer-names "<em>nrepl</em>")


;; General Auto-Complete
(require 'auto-complete-config)
(setq ac-delay 0.0)
(setq ac-quick-help-delay 0.5)
(ac-config-default)

;; ac-nrepl (Auto-complete for the nREPL)
(require 'ac-nrepl)
(add-hook 'cider-mode-hook 'ac-nrepl-setup)
(add-hook 'cider-repl-mode-hook 'ac-nrepl-setup)
(add-to-list 'ac-modes 'cider-mode)
(add-to-list 'ac-modes 'cider-repl-mode)

(add-hook 'clojure-mode-hook 'paredit-mode)
(require 'package)

(add-to-list 'package-archives
  '("melpa-stable" . "http://melpa-stable.milkbox.net/packages/"))

(add-to-list 'package-archives
  '("melpa" . "http://melpa.milkbox.net/packages/"))

(add-to-list 'package-archives
  '("marmalade" . "http://marmalade-repo.org/packages/"))

;; Initialize all the ELPA packages (what is installed using the packages commands)
(package-initialize)

;;(package-initialize)
(require 'ergoemacs-mode)

(setq ergoemacs-theme nil) ;; Uses Standard Ergoemacs keyboard theme
(setq ergoemacs-keyboard-layout "us") ;; Assumes QWERTY keyboard layout
(ergoemacs-mode 1)

(add-to-list 'load-path "~/.emacs.d/elpa/neotree-20150102.427")
(require 'neotree)
(global-set-key [f8] 'neotree-toggle)

;; Set bigger fonts
(set-default-font "Ubuntu Mono-16")

(add-hook 'clojure-mode-hook 'turn-on-eldoc-mode)
(setq nrepl-popup-stacktraces nil)
(add-to-list 'same-window-buffer-names "<em>nrepl</em>")


;; General Auto-Complete
(require 'auto-complete-config)
(setq ac-delay 0.0)
(setq ac-quick-help-delay 0.5)
(ac-config-default)

;; ac-nrepl (Auto-complete for the nREPL)
(require 'ac-nrepl)
(add-hook 'cider-mode-hook 'ac-nrepl-setup)
(add-hook 'cider-repl-mode-hook 'ac-nrepl-setup)
(add-to-list 'ac-modes 'cider-mode)
(add-to-list 'ac-modes 'cider-repl-mode)

(add-hook 'clojure-mode-hook 'paredit-mode)
(global-set-key [f8] 'neotree-toggle)

;; Set bigger fonts
(set-default-font "Ubuntu Mono-16")

(add-hook 'clojure-mode-hook 'turn-on-eldoc-mode)
(setq nrepl-popup-stacktraces nil)
(add-to-list 'same-window-buffer-names "<em>nrepl</em>")


;; General Auto-Complete
(require 'auto-complete-config)
(setq ac-delay 0.0)
(setq ac-quick-help-delay 0.5)
(ac-config-default)

;; ac-nrepl (Auto-complete for the nREPL)
(require 'ac-nrepl)
(add-hook 'cider-mode-hook 'ac-nrepl-setup)
(add-hook 'cider-repl-mode-hook 'ac-nrepl-setup)
(add-to-list 'ac-modes 'cider-mode)
(add-to-list 'ac-modes 'cider-repl-mode)

(add-hook 'clojure-mode-hook 'paredit-mode)

;; Show parenthesis mode
(show-paren-mode 1)
(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(custom-enabled-themes (quote (whiteboard)))
 '(delete-selection-mode t)
 '(org-CUA-compatible nil)
 '(org-replace-disputed-keys nil)
 '(recentf-mode t)
 '(shift-select-mode nil))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )

【问题讨论】:

    标签: emacs clojure


    【解决方案1】:

    我相信您正在寻找的快捷方式是M-.

    https://github.com/clojure-emacs/cider#keyboard-shortcuts

    【讨论】:

    • M 应该按什么键?命令或 Alt 不起作用。我使用ergoemacs。
    • 您可以在 ergoemacs-mode ergoemacs.github.io/bug-report.html matt 提交报告/询问问题并通常在同一天修复。
    • 请同时正确的函数名称。快捷方式变化,功能变化不大。
    • 我发现 cider-find-var 对此很有用。
    • M-. 之后返回的命令/快捷方式?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-01-23
    • 1970-01-01
    • 1970-01-01
    • 2015-10-04
    • 2010-12-01
    • 1970-01-01
    相关资源
    最近更新 更多