Skip to content

Latest commit

 

History

History
175 lines (129 loc) · 5.97 KB

README.md

File metadata and controls

175 lines (129 loc) · 5.97 KB

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

$ sudo snap install pyright --classic

$ 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