一、安装
版本24.4
how to set XLIB_SKIP_ARGB_VISUALS=1 for specific applications
GTK bug:
- 修改,使命令输入
emacs
正常打开
You can try adding these lines in your.bashrc
file:
alias emacs='XLIB_SKIP_ARGB_VISUALS=1 emacs'
- 修改快捷方式,使单击图标正常打开
- make a local copy of the emacs .desktop launcher
cp /usr/share/applications/emacs24.desktop ~/.local/share/applications/
- edit the copy, changing
Exec=/usr/bin/emacs24 %F
to
Exec=/usr/bin/env XLIB_SKIP_ARGB_VISUALS=1 /usr/bin/emacs24 %F
版本24.3
二、插件管理
安装的插件
-
markdown-preview-mode
在浏览器预览markdown
markdown-preview-eww.el
插件配置
- 启用 markdown 预览
如出现/bin/bash: /usr/local/bin/markdown: No such file or directory
安装markdown 渲染插件 Pandoc
或者sudo apt-get install python-markdown
向 Emacs 配置文件添加路径
(custom-set-variables
'(markdown-command "/usr/bin/pandoc"))
卸载插件
- The command
package-menu-mark-delete
- (key 'd')
- followed by package-menu-execute (key 'x') worked for me.
三、操作技巧
ibuffer
-
C-x C-b
进入 ibuffer 模式 -
^
返回上层目录 -
C-x C-q
进入编辑模式 -
C-x C-s
保存并进入命令模式 - 命令模式下
-
d
标记为待删除 -
x
执行命令
-
光标移动
-
C-M-b
跳到对应括号 -
C-M-n
将光标移动到对应的右大括号 -
C-M-SPC
选中匹配括号包括的所有内容(光标停留在匹配括号处)。
选择
-
capsLock
大写锁定,从光标处开始选择
连接FTP服务器
- 进入
Dire
- 输入
ftp:name@host:
- 提示输入密码
- 连接成功!
分屏
C-x 3 水平拆分窗口
代码格式化
1、如果想要整理整个文件
M-x mark-whole-buffer 或者 C-x h //选中整个文件
M-x indent-region 或者 C-M-\ //格式化选中
2、只是整理某个函数
M-x mark-defun 或者 C-M-h //选中函数
M-x indent-region 或者 C-M-\ //格式化
四、卸载
- 彻底卸载
sudo apt-get purge emacsen-common emacs24-common emacs24-bin-common emacs24 xemacs21-mule xemacs21 xemacs21-support gettext-el emacs xemacs21-bin
- 清除所有
sudo apt-get update
sudo apt-get autoremove
sudo apt-get autoclean