博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
emacs之配置自动安装脚本
阅读量:6087 次
发布时间:2019-06-20

本文共 4508 字,大约阅读时间需要 15 分钟。

emacsConfig下建立install目录,结构大概这样

.├── auto-complete-etags-setting.el├── auto-complete-setting.el├── auto-complete-yasnippet-setting.el├── autopair-setting.el├── buffer-setting.el├── clang-complete-async-setting.el├── code-style-setting.el├── dir-setting.el├── etags│   ├── kernel│   ├── muduo│   └── qt├── etags-select-setting.el├── evil-setting.el├── gdb-setting.el├── gtags│   └── muduo│       ├── GPATH│       ├── GRTAGS│       ├── GSYMS│       └── GTAGS├── gtags-setting.el├── imenu-tree-setting.el├── install│   ├── imenu-tree-install│   │   ├── install.sh│   │   ├── patch│   │   │   └── imenu-tree.el│   │   └── readme│   ├── _init.el_│   ├── install.sh│   ├── readme│   ├── recipes│   │   └── clang-complete-async.rcp│   └── remove.sh├── kbd-mouse-setting.el├── monokai-theme.el├── original-tags.el├── php-setting.el├── snippets│   ├── custom│   └── yas-git├── speedbar-setting.el├── switch-file-setting.el├── tabbar-setting.el├── ui-setting.el└── window-setting.el

 

 

_init.el_

1 (add-to-list 'load-path "~/.emacs.d/el-get/el-get") 2  3 (unless (require 'el-get nil 'noerror) 4   (with-current-buffer 5       (url-retrieve-synchronously 6        "https://raw.github.com/dimitri/el-get/master/el-get-install.el") 7     (goto-char (point-max)) 8     (eval-print-last-sexp))) 9 10 (add-to-list 'el-get-recipe-path "~/.emacs.d/el-get-user/recipes")11 (el-get 'sync)12 13 ;不知道为什么,按照文档的设置无效,那么,就用我自己的吧14 ;(setq el-get-user-package-directory "~/.emacs.d/el-get-init-files/")15 16 ;------------------------------------------------------------------------------17 ;设置扩展文件所在目录18 (add-to-list 'load-path "~/emacsConfig")19  20 ;逐个装载上面目录下所有的配置文件21 (mapc 'load (directory-files "~/emacsConfig" t "^[a-zA-Z0-9].*.el$"))

 

install.sh

1 mkdir -p ~/.emacs.d/el-get-user/recipes2 cp ./recipes/* ~/.emacs.d/el-get-user/recipes3 cp ./_init.el_  ~/.emacs.d/init.el4 5 echo "Install success!";

 

remove.sh

1 rm -rf ~/.emacs.d2 3 echo "remove success!";

 

~/emacsConfig/install/recipes/clang-complete-async.rcp

1 (:name clang-complete-async 2        :website "https://github.com/Golevka/emacs-clang-complete-async" 3        :description "An emacs extension to complete C and C++ code using libclang." 4        :type github 5        :pkgname "Golevka/emacs-clang-complete-async" 6        :build '(("make")) 7        :depends auto-complete 8        :features auto-complete-clang-async 9        :prepare (setq ac-clang-complete-executable10                       (expand-file-name11                        (concat (el-get-package-directory "clang-complete-async") "clang-complete"))))

 

imenu-tree注意

~/emacsConfig/install/imenu-tree-install/patch/imenu-tree.el为修改过的imenu-tree.el

~/emacsConfig/install/imenu-tree-install/install.sh

cp patch/imenu-tree.el ~/.emacs.d/el-get/imenu-tree/imenu-tree.elecho "imenu-tree installed with position on right!";

 

 

readme

第一次安装,需要alt+x执行安装命令el-get-install以下几个evilphp-mode-improvedtabbarauto-completeauto-complete-etags(我这边没有补全效果)etags-select(这个比较准确,比自带的好)auto-complete-emacs-lispautopaircc-mode+sr-speedbaryasnippetauto-complete-yasnippetimenu-tree(用来显示文件内symbol的插件,下面几个都是imenu-tree需要的插件)    imenu+    tree-mode    windatagtags(安装之前需要下面的命令)    debian:    sudo apt-get install global    mac:        brew install global    同时,需要ln -s做几个软连接        /usr/local/bin/global连接到/usr/bin        /usr/local/bin/gtags连接到/usr/binclang-complete-async(安装之前需要下面的命令)    debian:        sudo apt-get install llvm-dev    sudo apt-get install libclang-dev    mac:        brew install --with-clang --all-targets --rtti --universal --jit llvm,多点耐心,需要很久-----------------------------------------------------------------------------ecb:    由于method buffer的东西无法更新,因此放弃此库-----------------------------------------------------------------------------imenu-tree-----------------------------------------------------------------------------安装查看install目录的imenu-tree-install子目录-----------------------------------------------------------------------------安装配置auto-complete-etagsetags:    生成tag:        自定义函数:generate-etags    加载tag:        自定义命令:load-etags        插件命令:visit-tags-table    查找定义:        快捷键:alt+o,d        命令:etags-select-find-tag-at-point    list-tags:        显示某个h文件内所有的taggtags    生成tag:        自定义函数:generate-gtags    加载tag:        自定义命令:load-gtags        插件命令:gtag-visit-rootdir    查找变量引用:        快捷键:c-x,v        命令:gtags-find-symbol    查找函数引用:        快捷键:c-x,f        命令:gtags-find-rtagtag跳转:alt+enter前进后退的快捷键为alt加方向键F11切换h和cpp文件ctrl+enter,打开include的头文件F2打开speed-barF12打开imenu-tree在启动就需要加载的tag需要在original-tags.el里面手工修改

 

 

转载地址:http://fvpwa.baihongyu.com/

你可能感兴趣的文章
在线表格 x-spreadsheet 1.0.16 发布
查看>>
Windows IIS服务器建站/网站配置全图文流程(新手必备!) 一条龙
查看>>
[Git日记](1)Git安装
查看>>
Hadoop笔试题一
查看>>
微信小程序之生成图片分享
查看>>
Java微信公众平台开发_04_自定义菜单
查看>>
Python网络编程(进程通信、信号、线程锁、多线程)
查看>>
C#/VB.NET设置Excel表格背景色
查看>>
《Kotin 极简教程》第10章 Kotlin与Java互操作
查看>>
混合云存储网关云上部署版本介绍
查看>>
epoll和select
查看>>
网络编程懒人入门(八):手把手教你写基于TCP的Socket长连接
查看>>
LeetCode 145 Binary Tree Postorder Traversal(二叉树的后续遍历)+(二叉树、迭代)
查看>>
pickle和cPickle:Python对象的序列化(上)
查看>>
二叉排序树实现(C++封装)
查看>>
Microsoft Edge,谷歌浏览器新增 Scroll to Text 功能
查看>>
elasticsearch
查看>>
Purism 宣布推出 PureOS 应用商店
查看>>
Java 序列化
查看>>
git 对 Microsoft Word 进行版本控制
查看>>