Emacs for OIer 的基本配

Emacs for me OIer 的基本配置

Table of Contents

1 基本操作

Table 1: 方向
C-pC-nC-bC-f
Table 2: 选择
Mark-setSelect-all
C-SPCC-x h

……
总之TUTORIAL里面的大概够用了

2 .emacs 的简单配置

 

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(custom-enabled-themes (quote (tsdh-dark))))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )

(set-frame-font "-unknown-Ubuntu Mono-normal-normal-normal-*-24-*-*-*-m-0-iso10646-1" nil t)

(setq c-default-style "bsd")
(setq-default indent-tabs-mode nil)
(setq c-basic-offset 4)

(global-linum-mode t)
(global-hl-line-mode t)

(show-paren-mode t)

(fset 'yes-or-no-p 'y-or-n-p)

(require 'electric)
(electric-pair-mode t)
(add-hook 'c-mode-common-hook
          '(lambda()
             (c-toggle-auto-hungry-state t)
             (c-toggle-syntactic-indentation nil)
             (local-set-key (kbd "RET") 'newline-and-indent);不一定使用
             (local-set-key (kbd "<f9>") 'CCompile)))
(defun CCompile()
  (interactive)
  (compile (format
    "g++ -Wall -o %s %s -g -lm"
         (file-name-sans-extension
          (file-name-nondirectory buffer-file-name))
         (file-name-nondirectory buffer-file-name))))

    其中的 custom-set-variables 用面板来设置就可以了,学会用 describe-function 的话几分钟还是能打完的。
    如果输入大括号之后再按回车只换了一行,可能需要用 C-p;C-f;RET 的组合拳。
    学会看文档才是最重要的。
 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值