emacs for OCaml
(require 'cl)
(require 'package)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/"))
(add-to-list 'package-archives
'("gnu" . "http://elpa.gnu.org/packages/"))
(package-initialize)
;; -- Tweaks for OS X -------------------------------------
;; Tweak for problem on OS X where Emacs.app doesn't run the right
;; init scripts when invoking a sub-shell
(cond
((eq window-system 'ns) ; macosx
;; Invoke login shells, so that .profile or .bash_profile is read
(setq shell-command-switch "-lc")))
;; mouse
(require 'xt-mouse)
(xterm-mouse-mode)
(require 'mouse)
(xterm-mouse-mode t)
(defun track-mouse (e))
(global-set-key [mouse-4] (lambda () (interactive) (scroll-down 1)))
(global-set-key [mouse-5] (lambda () (interactive) (scroll-up 1)))
;; disable splash screens
(setq inhibit-splash-screen t)
(setq inhibit-startup-message t)
(setq inhibit-startup-echo-area-message t)
(setq initial-scratch-message nil)
(load "/Users/louyx/.opam/system/share/emacs/site-lisp/tuareg-site-file")
;; -- opam and utop setup --------------------------------
;; update emacs PATH so it can find opam executable
(add-to-list 'exec-path "/usr/local/bin/")
(add-to-list 'exec-path "/usr/louyx/.opam/system/bin/")
(add-to-list 'load-path
(replace-regexp-in-string "\n" "/share/emacs/site-lisp"
(shell-command-to-string "/usr/local/bin/opam config var prefix")))
;; Automatically load utop.el
(autoload 'utop-minor-mode "utop" "Minor mode for utop" t)
(add-hook 'tuareg-mode-hook 'utop-minor-mode)
(setq tuareg-indent-align-with-first-arg nil)
(setq utop-command "/usr/local/bin/opam config exec -- utop -emacs")
;; auto complete
(require 'auto-complete)
(ac-config-default)
(global-auto-complete-mode t)
;; -- merlin setup -----------------------------------------
(let ((opam-share (ignore-errors (car (process-lines "opam" "config" "var" "share")))))
(when (and opam-share (file-directory-p opam-share))
(add-to-list 'load-path (expand-file-name "emacs/site-lisp" opam-share))
(autoload 'merlin-mode "merlin" nil t nil)
(add-hook 'tuareg-mode-hook 'merlin-mode t)
(add-hook 'caml-mode-hook 'merlin-mode t)))
(setq merlin-ac-setup t)
emacs for OCaml的更多相关文章
- 在Emacs中使用GNU Global
背景 在我平时用Emacs编写C代码时,经常需要进行代码的跳转,主要需求为函数定义的跳转,某个具体函数的调用查找,某个结构体的定义跳转以及结构体中具体某一项的跳转等,GNU Global就能完全满足我 ...
- 的vim和emacs常用配置记录
因为经常改变工作环境,所以在这里记录一下我的.vimrc文件和.emacs文件的内容. vimrc的配置文件,主要是设置语法高亮,和tab键的宽度,个人喜欢设置为4个空格的分量. " set ...
- IntelliJ添加Emacs编辑器
Intellij只支持emacs as a external tool: https://www.jetbrains.com/help/idea/2016.2/tutorial-using-emacs ...
- ubuntu 下emacs 配置
(set-language-environment 'Chinese-GB) (set-keyboard-coding-system 'utf-8) (set-clipboard-coding-sys ...
- 我的emacs配置
我的emacs配置文件 ;; .emacs ;; ============================== Basic Configure START ====================== ...
- Emacs 配置文件
以下是我整理的 emacs 配置文件,供刚开始玩 emacs 的同学参考.网上有人说:emacs 是神的编辑器,如果能够用到这样的编辑器,那这个人就是神了.从我个人的经验来看,emacs 是一把利器, ...
- [emacs] 使用ggtags浏览代码
[emacs] 使用ggtags浏览代码 // */ // ]]> [emacs] 使用ggtags浏览代码 Table of Contents 1 相关的连接 2 global简介 2.1 ...
- Emacs学习心得之 LaTeX编辑
目录 1. 前言 2. texlive的安装 3. AUCTEX的安装和配置 4. RefTEX的安装和配置 一.前言 本篇博文记录了Emacs下LaTeX编辑环境的搭建,参考一下文章: http:/ ...
- 创建.emacs.d目录和.emacs文件
1.双击bin下的addpm.exe 2.HKEY_CURRENT_USER->Software->GNU->Emacs 新建字符串值HOME,数值数据为emacs的安装路径 3.创 ...
随机推荐
- 用Delphi实现网络视频编程
在MSN.QQ等聊天类的应用程序中,都应用到了网络视频技术.Delphi使用Object Pascal语言是一种完全面向对象语言,可以开发出灵活强大的程序,开发网络视频程序也不在话下.一个完整的网络视 ...
- 常用sql集锦
1.从数据库A中把表tableA导入到数据库B中 --如果主键是自增,则必须列出具体字段.-- select * into tableA from A..tableA 2.批量更改表中某列中的某个字符 ...
- 关于System.Data.ParameterDirection四个枚举类型所起的作用(转)
相信大家都知道.net中有四个关于参数传入传出的类型 分别是: System.Data.ParameterDirection.Input System.Data.ParameterDirection. ...
- with(nolock) 与 with(readpast) 与不加此2个的区别
调试窗口一: 或者查询窗口一: 总之:事务没有结束 查询窗口二:
- 九度OJ 1153:括号匹配问题 (DP)
时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:5193 解决:2248 题目描述: 在某个字符串(长度不超过100)中有左括号.右括号和大小写字母:规定(与常见的算数式子一样)任何一个左括 ...
- 360手机助手: App上架(提交资料)注意事项
提交app资料尤其注意: .keystore和密码?由HBuilder提供公有证书: 签名证书KeyStore证书别名:hbuilder证书密码:123456keystore密码:123456 360 ...
- SVM怎样解决多分类问题
从 SVM的那几张图能够看出来,SVM是一种典型的两类分类器.即它仅仅回答属于正类还是负类的问题.而现实中要解决的问题,往往是多类的问题(少部分例外,比如垃圾邮件过滤,就仅仅须要确定"是&q ...
- 打开蓝牙debug hci log
Android4.2之前抓取hci log都是通过hcidump命令完成的,但是Android4.2 Bluetooth引入了Bluedroid,这是一个新的蓝牙协议栈.所以抓取hci log的方法也 ...
- mvn 创建的项目 导入到eclipse
首先,我的工具版本如下: jdk: java version "1.6.0_10-rc2"; maven: apache-maven-3.1.0; eclipse: MyEclip ...
- Spring Boot2.0之注解方式启动Springmvc
回顾下springmvc原理图: DispatcherServlet是Spring MVC的核心,每当应用接受一个HTTP请求,由DispatcherServlet负责将请求分发给应用的其他组件. 在 ...