Coder Social home page Coder Social logo

gygy / vmacs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jixiuf/vmacs

0.0 2.0 0.0 8.35 MB

基于evil-mode 提供一个适合vim emacs双修者,下载即可用的emacs配置集

Makefile 0.09% Assembly 0.01% Shell 0.24% C 0.03% Emacs Lisp 99.27% Python 0.17% Objective-C 0.11% Roff 0.07% HTML 0.01%

vmacs's Introduction

vmacs

基于evil-mode 提供一个适合vim emacs双修者,下载即可用的emacs配置集

宗旨

  1. 下载即可用,所需的elisp依赖包都在此仓库中

    针对特定编程语言的外部依赖需要你下载,不过会给出详细的安装文档,保证在国内可下载

    git clone --depth 1 https://github.com/jixiuf/vmacs.git ~/.emacs.d
    
    # on mac or linux
    make compile-elpa
    make compile
        
  2. 中文支持良好,适于国内使用,配置文件中会有大量中文注释以便学习理解

与spacemacs 进行比较

  1. spacemacs太笨重,安装过程有可能不顺利,导致想尝试的用户无法试用
  2. spacemacs 高度模块化,提供各种layer供你配置, 而vmacs 则只提供本人觉得好的功能,尽量使配置简单化,你如果需要新功能 建议下载vmacs后,自己进行修改,从根本上理解vmacs的配置
  3. 两者都将大量功能绑定到space上
  4. 对evil-mode按键进行大量定制,与vim的操作习惯会有较大不同

emacs使用时间长了会出现小指疼痛的现象,当然很多人有相应的习惯来缓解, 比如用掌根按ctrl,换用合适的键盘,交换ctrl alt capslock 的位置等。 vmacs则尽量将功能移到space上减少小指的使用

对evil-mode 的定制理念

vim 分为normal insert visual 3种状态 而evil-mode 提供了normal insert visual emacs四种状态

其中 evil-emacs-state 状态相当于没起用 evil-mode,

与 evil-insert-state 的区别是evil-insert-state下进行了一些适合vim用户的绑定, 如ctrl-n ctrl-p进行补全等

vmacs进行定制时,希望进入insert态时,能够使用到原生的emacs按键绑定

C C++ 开发

company

依赖的外部命令:clang 相关配置 https://github.com/jixiuf/vmacs/blob/master/conf/conf-company-mode.el doc/company-c.png

helm-gtags

依赖的外部命令:GNU global

brew install global #on mac
yum install global # centos

doc/helm-gtags-c.gif

使用的helm-gtags 为我fork的https://github.com/jixiuf/emacs-helm-gtags 以方便利用第三方的跳转功能为https://github.com/joodland/bm 来实现代码来回跳转

关键代码

(helm-gtags-set-GTAGSLIBPATH-alist "/path/to/your/project/" '("/usr/include" ))
; 在/usr/include 下运行gtags 命令 生成TAGS相关文件
(define-key evil-motion-state-map "gd" 'goto-definition) ;跳转到函数定义处
(evil-leader/set-key "," 'bm-previous)  ;space, 回到上一个书签,用于函数跳转后的跳回

相关配置 https://github.com/jixiuf/vmacs/blob/master/conf/conf-tags.el

https://github.com/jixiuf/vmacs/blob/master/conf/conf-bm.el

https://github.com/jixiuf/vmacs/blob/master/lazy/lazy-goto-definition.el

vmacs's People

Contributors

jixiuf avatar

Watchers

James Cloos avatar gy408 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.