Windows emacs 26.1 备忘录
Posted eat-and-die
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Windows emacs 26.1 备忘录相关的知识,希望对你有一定的参考价值。
〇、基础
1、emacs下载
官网 :
下载 :
文件 :
emacs-26.1-x86_64.zip
emacs-26.1-x86_64-no-deps.zip
2、安装emacs
解压并重命名 emacs-26.1-x86_64.zip 到所需安装位置,如:
D:emacs-26.1
解压并拷贝 emacs-26.1-x86_64-no-deps.zip 到 D:emacs-26.1
3、配置HOME目录
在注册表中添加 计算机HKEY_LOCAL_MACHINESOFTWAREGNUEmacs 项
为Emacs项添加字符串值
名称 数据 HOME D:emacs-26.1
4、emacs编辑环境
网址:https://www.ibm.com/developerworks/cn/education/aix/emacs1/index.html
5、elisp
网址:http://ergoemacs.org/emacs/elisp.html
一、颜色配置
1、molokai配色
init.el配置:
(setq molokai-theme-kit t)
(add-to-list ‘custom-theme-load-path "your path")
(load-theme ‘molokai t) ;; 或在custom themes中选中molokai配色方案
2、solarized配色
init.el配置:
(add-to-list ‘custom-theme-load-path "your path")
(load-theme ‘solarized t)
3、color-theme配色
init.el配置:
(add-to-list ‘load-path "your path")
(require ‘color-theme)
(color-theme-initialize)
(color-theme-xxx) ;;xxx适当主题
- 选择主题:
M-x color-theme-select
二、字体配置
0、dejavu-fonts下载地址:
https://dejavu-fonts.github.io/Download.html
1、默认设置
菜单栏 : Option->Set default font
init.el:
(set-default-font "-outline-consolas-normal-r-normal-normal-14-97-96-96-c-*-iso8859-1")
2、中英文等宽设置(解决emacs 26版本中遇中文卡顿问题):
(defun set-font (english chinese english-size chinese-size)
(set-face-attribute ‘default nil :font
(format "%s:pixelsize=%d" english english-size))
(dolist (charset ‘(kana han symbol cjk-misc bopomofo))
(set-fontset-font (frame-parameter nil ‘font) charset
(font-spec :family chinese :size chinese-size))))
(set-font "Dejavu Sans Mono" "WenQuanYi Zen Hei Mono" 14 14)
三、编码设置
(set-language-environment ‘UTF-8)
(set-locale-environment "UTF-8")
四、melpa安装
1、配置package
1)添加插件源
(add-to-list ‘package-archives ‘("melpa" . "http://melpa.org/packages/") t))
2)在init.el开始初始化package
(package-initialize)
3)源网址:
清华镜像 :https://mirrors.tuna.tsinghua.edu.cn/elpa/melpa/
emacs-china :http://elpa.emacs-china.org/melpa/
melpa :http://melpa.org/packages/
2、安装插件(之后需按照purcell重新调节组织结构优化)
(defvar my/packages ‘(
;; packages
company
;;evil
) "Default packages")
(setq package-selected-packages my/packages)
(defun my/packages-installed-p ()
(loop for pkg in my/packages
when (not (package-installed-p pkg)) do (return nil)
finally (return t)))
(unless (my/packages-installed-p)
(message "%s" "Refreshing package database...")
(package-refresh-contents)
(dolist (pkg my/packages)
(when (not (package-installed-p pkg))
(package-install pkg))))
以上是关于Windows emacs 26.1 备忘录的主要内容,如果未能解决你的问题,请参考以下文章
emacs 26:Symbol的函数定义是void:string-to-int
二手手机泄露隐私:已删信息可恢复,照片微信能找回;中国互联网巨头准备大举投资芯片;Emacs 26.1 发布 | ITDaily