Giter VIP home page Giter VIP logo

pepe-emacs-config's Introduction

The Pepe Emacs config

Emacs Magit! Flycheck

Table of Contents

Inspired by the great Juan Pedro Fisanotti and his wonderful fisa-vim-config, I share my Emacs config. This is my personal Emacs configuration, built according to my personal preferences, without any justification to think it's the best possible emacs configuration. If you like it, great! :) It's mainly oriented to Python, PHP and Golang software development, but many of its features are useful for other languages and editing tasks.

This Emacs config have some useful modules:

  • adoc-mode
  • company
  • emacs code browser (ecb)
  • flycheck
  • geben
  • iedit
  • js2-mode
  • lsp-mode
  • magit
  • magit-gitflow
  • markdown-mode
  • markdown-toc
  • neo-tree
  • php-mode
  • powerline
  • projectile
  • smarty-mode
  • sqlformat
  • yasnippet
  • and much more...

Install | Upgrade

  1. This config is tested in Emacs 25.2.2, but may also work in previous versions. Your ~/.emacs.d folder should be empty. If you have one, rename it or move to a different location (to keep a backup, just in case you want to go back). Also rename or move your ~/.emacs file (to keep a backup, just in case you want to go back).
$ cd ~
$ mv .emacs.d .emacs.d.bak
$ mv .emacs .emacs.bak
  1. Install the required dependencies:
$ sudo apt-get install emacs exuberant-ctags git ripgrep silversearcher-ag pylint pep8 php-pear python-pip virtualenv

$ sudo pear channel-update pear.php.net

$ sudo pear install PHP_CodeSniffer

$ pip install sqlparse

$ pip install 'python-lsp-server[all]'

$ go install golang.org/x/tools/gopls@latest  # Make sure gopls is in your PATH
  1. Clone the repository:
$ git clone https://github.com/Abuelodelanada/pepe-emacs-config ~/.emacs.d
  1. Open emacs and it will continue the installation by itself installing packages from melpa and elpa. Wait for it to finish... and done! You now have your new shiny powerful emacs :)

Some Features

Autocomplete, iedit, magit, etc.

emacs

Magit

magit-status

Neotree

neotree

ECB (Emacs Code Browser)

ecb

Centaur-tabs

centaur-tabs

Company

company

Highlight Indent Guides

highlight-indent-guides

Powerline with Flycheck

Flycheck is activated and notifies in the powerline if there is a warning or an error

Flycheck with no errors.

powerline-flycheck-ok

Flycheck with warnings.

powerline-flycheck-warning

Flycheck with errors.

powerline-flycheck-error

Shortcuts

  • %: go to match paren
  • F7: toggle ecb (emacs code browser)
  • F8: toggle neotree
  • F12: toggle menu bar mode
  • C-;: activate iedit-dwim
  • C-c C-k: copy line
  • C-c C-w: copy word
  • C-c C-z: term stop subjob
  • C-c TAB: format sql
  • C-c c: comment region
  • C-c down: flycheck-next-error
  • C-c u: uncomment region
  • C-c up: flycheck-previous-error
  • C-d: duplicate current line
  • C-l: go to line
  • C-t: create ctags
  • C-x g: magit-status
  • C-x p: run phpcbf --standard=PSR2 to the current buffer
  • C-<prior>: centaur-tabs-backward
  • C-<next>: centaur-tabs-forward's
  • C-up : beginning-of-buffer
  • C-down: end-of-buffer
  • C-M-g: lsp-goto-type-definition (Go to definition)
  • C-M-p: xref-go-back (Return from definition)
  • S-M-down : enlarge window
  • S-M-left: enlarge window horizontally
  • S-M-right: shrink window horizontally
  • S-M-up: shrink window
  • S-down: windmove down
  • S-left: windmove left
  • S-right: windmove right
  • S-up: windmove up

pepe-emacs-config's People

Contributors

abuelodelanada avatar osiris avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

osiris

pepe-emacs-config's Issues

font-lock-default-fontify-region is slow

While editing a 600 lines PHP file:

- linum-update-current                                           4601  53%
 - apply                                                         4601  53%
  - #<compiled 0x1b6bae9>                                        4601  53%
   - linum-update                                                4601  53%
    - mapc                                                       4601  53%
     - linum-update-window                                       4601  53%
      - window-end                                               3689  42%
       - jit-lock-function                                       3689  42%
        - jit-lock-fontify-now                                   3689  42%
         - jit-lock--run-functions                               3685  42%
          - run-hook-wrapped                                     3685  42%
           - #<compiled 0x40da669>                               3685  42%
            - highlight-indent-guides--guide-region               3597  41%
             - font-lock-fontify-region                          2970  34%
              - c-font-lock-fontify-region                       2970  34%
               - font-lock-default-fontify-region                2950  34%
                + font-lock-fontify-keywords-region               2910  33%
                + font-lock-fontify-syntactically-region                 12   0%
               + c-before-context-fl-expand-region                 20   0%
             + syntax-ppss                                        324   3%
               highlight-indent-guides--get-guides                 72   0%
               highlight-indent-guides--guide-line                 12   0%
               highlight-indent-guides--calc-guides                  8   0%
               back-to-indentation                                  8   0%
             + highlight-indent-guides--get-prev-guides                  3   0%
            + font-lock-fontify-region                             52   0%
        linum--face-width                                          16   0%
+ redisplay_internal (C function)                                3495  40%
+ timer-event-handler                                             258   2%
+ command-execute                                                 216   2%
+ flycheck-handle-signal                                           20   0%
+ #<compiled 0x4cc38a5>                                            11   0%
+ ...                                                               7   0%
+ flycheck-maybe-display-error-at-point-soon                        4   0%

Error with pass package

Running in 26.3

Error (use-package): Failed to install pass: Package ‘emacs-27.1’ is unavailable

Improve load time

Now the loading time in my machine is:

$ time emacs -e "kill-emacs"
emacs -e "kill-emacs"  3,84s user 0,21s system 93% cpu 4,348 total

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.