zoukankan      html  css  js  c++  java
  • ~/.emacs emacs 配置文件

    windows ~/.emacs

    (when (>= emacs-major-version 24)
      (require 'package)
      (add-to-list
       'package-archives
       ;; '("melpa" . "http://stable.melpa.org/packages/") ; many packages won't show if using stable
       '("melpa" . "http://melpa.milkbox.net/packages/")
       t))
    
    ;; Added by Package.el.  This must come before configurations of
    ;; installed packages.  Don't delete this line.  If you don't want it,
    ;; just comment it out by adding a semicolon to the start of the line.
    ;; You may delete these explanatory comments.
    (package-initialize)
    
    (show-paren-mode 1)
    (setq show-paren-style 'parentheses)
    
    ;; electric-indent-mode
    (electric-indent-mode 1)
    
    ;; set language environment
    (set-language-environment 'UTF-8)
    (set-locale-environment "UTF-8")
    
    ;; set shell and eshell key binding
    (global-set-key "C-cs" 'shell)
    (global-set-key "C-ce" 'eshell)
    
    ;; show file path C-c z
    (defun show-file-name ()
      "Show the full path file name in the minibuffer."
      (interactive)
      (message (buffer-file-name))
      (kill-new (file-truename buffer-file-name)))
    (global-set-key "C-cz" 'show-file-name)
    
    (defun refresh-file ()
      (interactive)
      (revert-buffer t (not (buffer-modified-p)) t))
    (global-set-key [(f5)] 'refresh-file)
    (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 (react-snippets php-mode))))
    (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.
     )

    mac ~/.emacs

    ;; load emacs 24's package system. Add MELPA repository.
    
    ;; Added by Package.el.  This must come before configurations of
    ;; installed packages.  Don't delete this line.  If you don't want it,
    ;; just comment it out by adding a semicolon to the start of the line.
    ;; You may delete these explanatory comments.
    (when (>= emacs-major-version 24)
      (require 'package)
      (add-to-list
       'package-archives
       ;; '("melpa" . "http://stable.melpa.org/packages/") ; many packages won't show if using stable
       '("melpa" . "http://melpa.milkbox.net/packages/")
       t)
       (package-initialize)
    )
    
    (setq show-paren-mode t)
    (setq show-paren-style 'parenthesis)
    
    ;; set shell and eshell key binding
    (global-set-key "C-cs" 'shell)
    (global-set-key "C-ce" 'eshell)
    
    ;; text size scale
    (global-set-key (kbd "C-+") 'text-scale-increase)
    (global-set-key (kbd "C--") 'text-scale-decrease)
    (global-set-key (kbd "C-0") 'text-scale-adjust)
    
    ;; show file path C-c z
    (defun show-file-name ()
      "Show the full path file name in the minibuffer."
      (interactive)
      (message (buffer-file-name))
      (kill-new (file-truename buffer-file-name)))
    (global-set-key "C-cz" 'show-file-name)
    
    ;; set startup window location
    (set-frame-position (selected-frame) 650 10) ; pixels x y from upper left
    ;; set startup window size
    (add-to-list 'default-frame-alist '(height . 48))
    (add-to-list 'default-frame-alist '(width . 90))
    (let ((default-directory "~/Code"))
      (shell "*shell*"))
    
    (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
        (web-mode flymake-php php-mode enclose groovy-mode gradle-mode autopair php-scratch json-reformat jsfmt emmet-mode ac-html ac-php))))
    (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.
     )
    

      

  • 相关阅读:
    dll相对路径设置
    OPC UA Error: Could not add self-signed certificate to certficate store.
    PB调用C#封装的视频插件中拍照方法不生效的问题
    net反射加载出现错误: ex = {“无法加载一个或多个请求的类型。有关更多信息,请检索 LoaderExceptions 属性。”}
    xtralayout模式下,修改 layOutcontrolgroup分组框表头背景颜色步骤
    abap 本地包 生成请求号
    PB调用SAP的Web Service结构体数组参数方法详解(使用C#调用Web Service生成dll)
    zookeeper NIOServerCnxn: Too many connections from IP- max i
    mysql 10038错误解决方案
    PHP获取文件夹内所有文件包括子目录文件的名称或路径
  • 原文地址:https://www.cnblogs.com/mingzhanghui/p/9312909.html
Copyright © 2011-2022 走看看