zoukankan      html  css  js  c++  java
  • emacs之配置2,UI基本设置

    在~下建立目录emacsConfig,里面建立一些自己写的el脚本,下面是名字随便,我的

    emacsConfig/ui-setting.el

      1 ;关闭Emacs的默认启动界面
      2 (setq inhibit-startup-message t)
      3  
      4 ;关闭scratch消息提示
      5 (setq initial-scratch-message nil)
      6  
      7 ;语法高亮
      8 (global-font-lock-mode t)
      9  
     10 ;以y/n代表yes/no
     11 (fset 'yes-or-no-p 'y-or-n-p) 
     12  
     13 ;显示括号匹配 
     14 (show-paren-mode t)
     15 (setq show-paren-style 'parentheses)
     16  
     17 ;禁止自动保存
     18 (auto-save-mode 0)
     19  
     20 ;显示日期
     21 (setq display-time-day-and-date t)
     22  
     23 ;显示时间
     24 (display-time) 
     25  
     26 ;时间为24小时制
     27 (setq display-time-24hr-format t)
     28  
     29 ;设置时间戳,标识出最后一次保存文件的时间。
     30 (setq time-stamp-active t)
     31 (setq time-stamp-warn-inactive t)
     32 (setq time-stamp-format "%:y-%02m-%02d %3a %02H:%02M:%02S K.T")
     33  
     34 ;关闭出错时的提示声
     35 (setq visible-bell t)
     36  
     37 ;设置标题栏显示文件的完整路径名 
     38 (setq frame-title-format 
     39 '("%s" (buffer-file-name "%f"
     40         (dired-directory dired-directory "%b"))))
     41         
     42 ;一打开就起用 text 模式。
     43 (setq default-major-mode 'text-mode)
     44  
     45 ;打开图片显示功能
     46 (auto-image-file-mode t)
     47  
     48 ;显示列号
     49 (column-number-mode t)
     50  
     51 ;显示行号
     52 (global-linum-mode 1)
     53 
     54 ;支持中键粘贴
     55 (setq mouse-yank-at-point t)
     56  
     57 ;高亮显示要拷贝的区域
     58 (transient-mark-mode t)
     59  
     60 ;支持emacs和外部程序的粘贴
     61 (setq x-select-enable-clipboard t)
     62  
     63 ;不生成#F#文件
     64 (setq auto-save-default nil)
     65  
     66 ;不要生成临时文件
     67 (setq-default make-backup-files nil)
     68  
     69 ;防止页面滚动时跳动
     70 (setq scroll-margin 3
     71 scroll-conservatively 10000)
     72 
     73 ;设置颜色在单独的脚本里面,模仿sublime的风格
     74 
     75 ;设置字体
     76 (if (eq system-type 'darwin)
     77     (set-default-font "Monaco-11"))
     78 
     79 (if (eq system-type 'gnu/linux)
     80     (set-default-font "Monaco-10"))
     81 
     82 ;设置菜单栏
     83 (if (eq system-type 'darwin)
     84     (menu-bar-mode 1))
     85 
     86 (if (eq system-type 'gnu/linux)
     87     (menu-bar-mode 0))
     88 
     89 ;去掉工具栏
     90 (tool-bar-mode 0)
     91 
     92 ;不显示滚动条
     93 (scroll-bar-mode 0)
     94 
     95 ;在状态条上显示当前光标在哪个函数体内部
     96 (which-function-mode t)
     97 
     98 
     99 ; 用一个很大的kill ring. 这样防止我不小心删掉重要的东西
    100 (setq kill-ring-max 1024)
    101 (setq max-lisp-eval-depth 40000) ;lisp最大执行深度
    102 (setq max-specpdl-size 10000) ;最大容量
    103 (setq undo-outer-limit 5000000) ;撤销限制
    104 (setq message-log-max t) ;设置message记录全部消息, 而不用截去
    105 (setq eval-expression-print-length nil) ;设置执行表达式的长度没有限制
    106 (setq eval-expression-print-level nil) ;设置执行表达式的深度没有限制
    107 (setq global-mark-ring-max 1024) ;设置最大的全局标记容量
    108 (setq history-delete-duplicates t) ;删除minibuffer的重复历史
  • 相关阅读:
    kafka 简单调试
    audit调优
    html使用的特殊符号< &gt: &等 意义对照
    nohup /dev/null 2>&1 含义详解
    K8S etcd参数优化
    Linux下安装VMware Tools 的方法
    PHP操作MySQL数据库5个步骤
    Win7下mysql root账户登录提示:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)解决方案
    VS 报cmath(19): error C2061: 语法错误: 标识符“acosf” 错误
    win7 装了VB虚拟机 开始挺好用 后来突然就打不开了 提示如下错误:(如图)创建 COM 对象失败.
  • 原文地址:https://www.cnblogs.com/ziyouchutuwenwu/p/3486244.html
Copyright © 2011-2022 走看看