自动完成安装 emacs
auto-complete installation emacs
我是 emacs 的新手,我正在尝试使用 Vincent Goulet 修改后的 emacs (https://vigou3.github.io/emacs-modified-windows/) 来完成我的工作(主要是 R
编程和 LaTeX
)。修改后的 emacs 安装了 ess
,我正在尝试让自动完成工作。
当我输入 M-x package-list-packages
时,我没有看到 company-mode
或 auto-complete
(尽管我看到了 auto-complete-[other things]
和 company-[other things]
,而且我无法安装 auto-complete
。
我的.emacs
文件如下:
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(package-initialize)
(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.
'(ansi-color-faces-vector
[default default default italic underline success warning error])
'(custom-enabled-themes (quote (tango-dark)))
'(package-selected-packages (quote (auto-auto-indent auto-complete company))))
(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.
)
(require 'package)
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
(not (gnutls-available-p))))
(proto (if no-ssl "http" "https")))
;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired
(add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t)
;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t)
(when (< emacs-major-version 24)
;; For important compatibility libraries like cl-lib
(add-to-list 'package-archives '("gnu" . (concat proto "://elpa.gnu.org/packages/")))))
(package-initialize)
(setq ess-use-company t)
任何让代码自动完成在 R
中工作的帮助都会非常有帮助。谢谢。
这似乎不是 ESS 的问题,而是 R 选项的问题。 R 选项 help_type
应该设置为 "text" 而不是 "html" (这可能是 Windows 上的默认值?)。这可以通过添加 options(help_type="text")
.
在 .Rprofile
配置文件(用户文件应位于 Sys.getenv("HOME")
)中设置选项来更改
请注意,您的配置 ess-use-company
告诉 ESS 使用与 ESS 捆绑在一起的 company
后端,而不是 auto-complete
库(在 emacs 中提供补全的两个不同包) .
您可能希望将 (global-company-mode)
添加到您的初始化文件以完成 运行 所有缓冲区(或在您的 ess 挂钩中启用它)。我还建议您在 company-quickhelp
中查看完成菜单中的信息。
我是 emacs 的新手,我正在尝试使用 Vincent Goulet 修改后的 emacs (https://vigou3.github.io/emacs-modified-windows/) 来完成我的工作(主要是 R
编程和 LaTeX
)。修改后的 emacs 安装了 ess
,我正在尝试让自动完成工作。
当我输入 M-x package-list-packages
时,我没有看到 company-mode
或 auto-complete
(尽管我看到了 auto-complete-[other things]
和 company-[other things]
,而且我无法安装 auto-complete
。
我的.emacs
文件如下:
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(package-initialize)
(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.
'(ansi-color-faces-vector
[default default default italic underline success warning error])
'(custom-enabled-themes (quote (tango-dark)))
'(package-selected-packages (quote (auto-auto-indent auto-complete company))))
(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.
)
(require 'package)
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
(not (gnutls-available-p))))
(proto (if no-ssl "http" "https")))
;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired
(add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t)
;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t)
(when (< emacs-major-version 24)
;; For important compatibility libraries like cl-lib
(add-to-list 'package-archives '("gnu" . (concat proto "://elpa.gnu.org/packages/")))))
(package-initialize)
(setq ess-use-company t)
任何让代码自动完成在 R
中工作的帮助都会非常有帮助。谢谢。
这似乎不是 ESS 的问题,而是 R 选项的问题。 R 选项 help_type
应该设置为 "text" 而不是 "html" (这可能是 Windows 上的默认值?)。这可以通过添加 options(help_type="text")
.
.Rprofile
配置文件(用户文件应位于 Sys.getenv("HOME")
)中设置选项来更改
请注意,您的配置 ess-use-company
告诉 ESS 使用与 ESS 捆绑在一起的 company
后端,而不是 auto-complete
库(在 emacs 中提供补全的两个不同包) .
您可能希望将 (global-company-mode)
添加到您的初始化文件以完成 运行 所有缓冲区(或在您的 ess 挂钩中启用它)。我还建议您在 company-quickhelp
中查看完成菜单中的信息。