(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的更多相关文章

  1. 在Emacs中使用GNU Global

    背景 在我平时用Emacs编写C代码时,经常需要进行代码的跳转,主要需求为函数定义的跳转,某个具体函数的调用查找,某个结构体的定义跳转以及结构体中具体某一项的跳转等,GNU Global就能完全满足我 ...

  2. 的vim和emacs常用配置记录

    因为经常改变工作环境,所以在这里记录一下我的.vimrc文件和.emacs文件的内容. vimrc的配置文件,主要是设置语法高亮,和tab键的宽度,个人喜欢设置为4个空格的分量. " set ...

  3. IntelliJ添加Emacs编辑器

    Intellij只支持emacs as a external tool: https://www.jetbrains.com/help/idea/2016.2/tutorial-using-emacs ...

  4. ubuntu 下emacs 配置

    (set-language-environment 'Chinese-GB) (set-keyboard-coding-system 'utf-8) (set-clipboard-coding-sys ...

  5. 我的emacs配置

    我的emacs配置文件 ;; .emacs ;; ============================== Basic Configure START ====================== ...

  6. Emacs 配置文件

    以下是我整理的 emacs 配置文件,供刚开始玩 emacs 的同学参考.网上有人说:emacs 是神的编辑器,如果能够用到这样的编辑器,那这个人就是神了.从我个人的经验来看,emacs 是一把利器, ...

  7. [emacs] 使用ggtags浏览代码

    [emacs] 使用ggtags浏览代码 // */ // ]]>   [emacs] 使用ggtags浏览代码 Table of Contents 1 相关的连接 2 global简介 2.1 ...

  8. Emacs学习心得之 LaTeX编辑

    目录 1. 前言 2. texlive的安装 3. AUCTEX的安装和配置 4. RefTEX的安装和配置 一.前言 本篇博文记录了Emacs下LaTeX编辑环境的搭建,参考一下文章: http:/ ...

  9. 创建.emacs.d目录和.emacs文件

    1.双击bin下的addpm.exe 2.HKEY_CURRENT_USER->Software->GNU->Emacs 新建字符串值HOME,数值数据为emacs的安装路径 3.创 ...

随机推荐

  1. Android-Android进程间通讯之messenger

    转自‘https://www.cnblogs.com/makaruila/p/4869912.html 平时一说进程间通讯,大家都会想到AIDL,其实messenger和AIDL作用一样,都可以进行进 ...

  2. visual studio 2010 c++ 打印 Hello world

    由于好奇心驱使温习下c高级简化语言语言(个人解释可能不太准确).下面用visual studio 2010 实现 HelloWord 打印 第一步:visual studio 2010 打开.文件-- ...

  3. springboot @ConfigurationProperties @EnableConfigurationProperties @Bean @ Component

    https://www.cnblogs.com/duanxz/p/4520571.html https://juejin.im/post/5cbeaa26e51d45789024d7e2 1. Bea ...

  4. EasyPlayer-RTSP播放器:从底层到上层专注于RTSP播放Windows、Android、iOS RTSP Player

    EasyPlayer-RTSP播放器是一套RTSP专用的播放器,包括有:Windows(支持IE插件,npapi插件).Android.iOS三个平台,是由EasyDSS团队开发和维护的区别于市面上大 ...

  5. 【题解】P1407国家集训队稳定婚姻

    [题解][P1407 国家集训队]稳定婚姻 很好的一道建模+图论题. 婚姻关系?很像二分图匹配呀,不过不管怎么办先建模再说.婚姻关系显然用图方面的知识解决.建图! 它给定的是字符串,所以我们使用\(a ...

  6. Gin Web框架简单介绍

    翻译自: https://github.com/gin-gonic/gin/blob/develop/README.md Gin Web框架 branch=master"> Gin是用 ...

  7. Flask:模板

    模板是一个包含响应文本的文件,其中包含用占位变量表示的动态部分,具体值只在请求的上下文中才能知道.使用真实值替换变量,再返回最终得到的响应字符串.这个过程称为渲染,为了渲染模板,Flask使用了一个名 ...

  8. SD 相关表

    一.客户主数据基本数据放在KNA1里:公司代码放在KNB1里:销售视图放在KNVV里:合作伙伴放在KNVP里: 二.信用主数据KNKK里有信贷限额.应收总额.特别往来:S066里是未清订单值:S067 ...

  9. log4j 2 入门实例(3)

    继承机制 所有logger都继承自root logger. 可以认为名为log4j2learn.Hello的logger继承自名为log4j2learn的logger. log4j会先查找名称是&qu ...

  10. IOS UIlabel 、UIButton添加下划线

    1.给UILabel 添加下划线 UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(, , , )]; label.backgrou ...