emacs - 自动完成安装emacs
问题描述
我是 emacs 的新手,我正在尝试使用 Vincent Goulet 修改后的 emacs ( https://vigou3.github.io/emacs-modified-windows/ ) 来完成我的工作(主要是R
编程和LaTeX
)。修改后的 emacsess
已安装,我正在尝试自动完成工作。
我在输入时没有看到company-mode
or (尽管我看到and ,并且我无法安装.auto-complete
M-x package-list-packages
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 上的默认设置?)。.Rprofile
这可以通过在配置文件(用户文件应该位于)中设置选项来更改,方法Sys.getenv("HOME")
是添加options(help_type="text")
.
请注意,您的配置ess-use-company
告诉 ESS 使用company
与 ESS 捆绑在一起的后端,而不是auto-complete
库(两个不同的包在 emacs 中提供完成)。
您可能希望添加(global-company-mode)
到您的 init 文件以完成运行所有缓冲区(或在您的 ess 挂钩中启用它)。我还建议company-quickhelp
您在完成菜单中查找信息。
推荐阅读
- ruby-on-rails - 在 Rails 中更改 PostgreSql 用户密码时出现问题?
- python - InvalidToken cryptography.fernet.InvalidToken
- javascript - POST 请求后的 React hooks + Firebase 状态值直到硬刷新才会显示
- typescript - 仅在重载签名中出现错误 2589
- reactjs - 我的 React Project App 组件的一部分未显示
- macos - 尝试通过 pkgbuild 构建 macOS 应用程序,但在预安装或安装后它是 root,如何更改为普通用户并获取 sudo
- networking - 如果使用 scp.put() 发送文件时连接丢失,文件会发生什么情况?
- javascript - 如何在 D3.js 地图上创建标签
- css - 如何将 css-module 类名映射提取到 json 资产?
- javascript - 使用多个 Math.pow 将 Excel 公式转换为 Javascript