• emacs


    Emacs
    https://www.gnu.org/software/emacs/download.html
    
    SpaceEmacs
    http://spacemacs.org/
    https://github.com/syl20bnr/spacemacs
    https://github.com/adobe-fonts/source-code-pro
    
    ELPA镜像
    http://elpa.emacs-china.org/
    https://mirrors.tuna.tsinghua.edu.cn/elpa/
    
    Spacemacs 用户
    添加下面的代码到~/.spacemacs的dotspacemacs/user-init()
    
      (setq configuration-layer-elpa-archives
          '(("melpa-cn" . "http://elpa.emacs-china.org/melpa/")
            ("org-cn"   . "http://elpa.emacs-china.org/org/")
            ("gnu-cn"   . "http://elpa.emacs-china.org/gnu/")))
    
    或者:添加下面的代码到~/.spacemacs的dotspacemacs/user-init()
    
    (setq configuration-layer-elpa-archives
        '(("melpa-cn" . "http://mirrors.tuna.tsinghua.edu.cn/elpa/melpa/")
          ("org-cn"   . "http://mirrors.tuna.tsinghua.edu.cn/elpa/org/")
          ("gnu-cn"   . "http://mirrors.tuna.tsinghua.edu.cn/elpa/gnu/")))
    
    
    
    [macOS]
    安装Emacs
    $ brew tap d12frosted/emacs-plus
    $ brew install emacs-plus --with-modern-icon  // 此参数可选,可以用brew info emacs-plus查看参数
    $ ln -s /usr/local/opt/emacs-plus/Emacs.app /Applications
    安装SpaceEmacs
    $ git clone --recursive --depth 1 --single-branch -b develop https://github.com/syl20bnr/spacemacs ~/.emacs.d
    安装Source Code Pro字体
    $ brew tap caskroom/fonts && brew cask install font-source-code-pro
    安装ag
    $ brew install the_silver_searcher
    
    
    [linux]
    安装Emacs
    注:如果是centos桌面环境,需要安装一些开发包:
    $ sudo yum install gtk3-devel libXpm-devel libjpeg-devel giflib-devel libtiff-devel gnutls-devel -y
    
    $ sudo su
    # wget -P /usr/src/emacs-26.1 http://mirrors.ocf.berkeley.edu/gnu/emacs/emacs-26.1.tar.gz
    # chmod -R 755 /usr/src/emacs-26.1/
    # cd /usr/src/emacs-26.1/
    # tar xvzf emacs-26.1.tar.gz
    # ./configure
    # make
    # make install
    # whereis emacs
    emacs: /usr/local/bin/emacs /usr/libexec/emacs /usr/share/emacs /usr/share/man/man1/emacs.1.gz
    # cd ~
    # rm -rf /usr/src/emacs-26.1/
    # exit
    
    安装SpaceEmacs
    $ rm -rf ~/.emacs.d
    $ git clone --depth 1 https://github.com/syl20bnr/spacemacs ~/.emacs.d
    $ /usr/local/bin/emacs
    按提示一路回车完成配置。
    
    是否为默认的emacs
    $ which emacs       
    /usr/local/bin/emacs
    如果是其他的,需要检查PATH环境变量配置,或者重新登录会话。
    
    如果发送错误,用下面命令启动(走https)
    emacs --insecure
    
    安装Source Code Pro字体
    Pacman (Arch Linux)
    $ pacman -S adobe-source-code-pro-fonts
    Bower
    $ bower install git://github.com/adobe-fonts/source-code-pro.git#release
    npm 2.x
    $ npm install --fetch-only git://github.com/adobe-fonts/source-code-pro.git#release
    npm 3.x
    $ npm install git://github.com/adobe-fonts/source-code-pro.git#release
    其他方法
    https://github.com/adobe-fonts/source-code-pro/issues/17#issuecomment-8967116
    
    以CentOS/Debian为例:通过nodejs的npm下载字体,然后把字体复制到/usr/share/fonts里,然后执行fc-cache。
    先安装NodeJS:https://nodejs.org/en/download/package-manager/
    (centos)
    $ curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -
    $ sudo yum -y install nodejs
    (debian)
    $ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
    $ sudo apt-get install -y nodejs
    然后用npm下载字体
    $ npm install git://github.com/adobe-fonts/source-code-pro.git#release
    以上也可以通过gitlab地址下载字体,而不是nodejs。
    然后复制字体
    $ sudo mkdir -p /usr/share/fonts/source-code-pro
    $ sudo cp -r node_moudles/source-code-pro/{EOT,OTF,TTF,WOFF,WOFF2} /usr/share/fonts/source-code-pro/
    $ sudo fc-cache
    
    [windows]
    http://mirror.rit.edu/gnu/emacs/windows/emacs-26/emacs-26.1-x86_64.zip
    spaceemacs配置目录:C:Users<username>.emacs.d
    
    
    配置
    emacs ~/.spacemacs
    在dotspacemacs-configuration-layers中加入或者取消注释语言支持、自动完成等。
    
    dotspacemacs-elpa-timeout 5
    改为300
    
    将elpa源全部改为https开头
    
    安装markdown软件,支持markdown预览。
    brew install markdown
  • 相关阅读:
    SSH整合简述一
    错误:找不到类org.springframework.web.context.ContextLoaderListener
    Spring(七)持久层
    CSS 类选择器(四)
    BeanFactory not initialized or already closed
    Spring(六)AOP切入方式
    Postman Mock Server
    Sentry快速开始并集成钉钉群机器人
    OAuth2实现单点登录SSO
    图解TCP三次握手
  • 原文地址:https://www.cnblogs.com/Bob-wei/p/9749944.html
Copyright © 2020-2023  润新知