zoukankan      html  css  js  c++  java
  • Emacs 配置与使用

    Emacs 配置说明

    Emacs配置文件在哪里?

    Your init file contains personal EmacsLisp code that you want to execute when you start Emacs.
    
    For GnuEmacs, it is ~/.emacs or _emacs or ~/.emacs.d/init.el.
    For XEmacs, it is ~/.xemacs or ~/.xemacs/init.el.
    For AquamacsEmacs, it is ~/.emacs or ~/Library/Preferences/Aquamacs Emacs/Preferences.el

    参考:https://www.cnblogs.com/eat-and-die/p/10309681.html

    Emacs 目前支持界面包管理工具:Options -> Manage Emacs Packages 选择安装包即可,

             支持:neotree (目录树)

                       company (自动补全)

    包管理:

    (require 'package)
    (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
    (package-initialize)

    显示行号:

    ;; 显示行号
    (global-linum-mode 1)
    (setq linum-format "%d ")

    更换主题:

    ;; 选择主题 https://github.com/hbin/molokai-theme
    (setq molokai-theme-kit t)
    (add-to-list 'custom-theme-load-path "your path")
    (load-theme 'molokai t)

    添加目录树:

    ;; 下载插件至随意目录 https://github.com/jaypei/emacs-neotree 然后将目录配置在下方,F8将显示目录
    ;; https://stackoverflow.com/questions/3538064/is-there-something-similar-for-emacs-like-vimss-nerdtree (add-to-list 'load-path "/some/path/neotree") (require 'neotree) (global-set-key [f8] 'neotree-toggle)

    配置文件完整内容:

    (require 'package)
    (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
    (package-initialize)
    
    ;; NerdTree like v
    (add-to-list 'load-path "/home/wanghaiyang/.emacs.d/neotree")
    (require 'neotree)
    (global-set-key [f8] 'neotree-toggle)
    
    
    ;; Usage: M-x load-theme RET molokai (https://github.com/hbin/molokai-theme)
    (add-to-list 'custom-theme-load-path "~/.emacs.d/theme/")
    (setq molokai-theme-kit t)
    (setq molokai-theme t)
    (load-theme 'molokai t)
    
    ;; Usage: M-x global-linum-mode
    (global-linum-mode 1)
    (setq linum-format "%d ")
    
    (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.
     '(package-selected-packages (quote (company))))
    (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.
     )

    快捷键:

    1. Buffer(已经打开的文件)

        c-x c-b 列举Buffer;

        c-x b name 打开指定Buffer;

        c-x k 关闭当前Buffer;

    2. 窗口

        c-x o 切换窗口;

        c-x 0 关闭窗口;

  • 相关阅读:
    实验四
    实验一、二
    实验
    网上摘录
    网上摘录(琐碎信息)
    angularJsUIbootstrap系列教程1(使用前的准备)
    angularJS在本机运行时的注意事项
    angularJS在创建指令需要注意的问题(指令中使用ngRepeat)
    angularJsUIbootstrap系列教程2(According)
    ASP.NET Web Forms 4.5的新特性
  • 原文地址:https://www.cnblogs.com/wanghaiyang1930/p/11869197.html
Copyright © 2011-2022 走看看