Emacs Plugins

Table of Contents

https://www.emacswiki.org/emacs/KeyChord

1 Flycheck

The default (at least the one I'm using) for C/C++ is c/c++-clang.

  • flycheck-describe-checker
  • flycheck-list-errors

2 AUCTex

  • C-c C-c: tex-compile

3 DocView

Can view pdf in emacs. It is convenient to use the same keybinding for tex-compile: when you press C-c C-c the second time after compilation, it will default to \doc-view.

3.1 navigation

  • C-p C-n C-b C-f still works
  • + and - to adjust scale
  • n and p for page navigation
  • space and delete to page up and down across pages
  • M-< and M-> still works
  • M-g M-g works as jump to page

4 pdf-tools

The doc view produce very blur text. The pdf-view-mode provided by pdf-tools solved this. Also, this package is said to open pdf on demand. It seems to solve my concern for pdf greatly.

Extra bonus:

  • search in text
  • view and edit annotations!

http://emacs.stackexchange.com/questions/19686/how-to-use-pdf-tools-pdf-view-mode-in-emacs

4.1 Installation

sudo aptitude install libpng-dev libz-dev 
sudo aptitude install libpoppler-glib-dev 
sudo aptitude install libpoppler-private-dev
sudo aptitude install imagemagick
cd /path/to/pdf-tools
make install-server-deps # optional
make -s
make install-package
# or M-x package-install-file RET pdf-tools-${VERSION}.tar RET

activate in emacs by (pdf-tools-install)

4.2 key binding

  • o: open outline
  • Q: kill buffer
  • q: kill window

5 Paredit

command Key description
paredit-forward-slurp-sexp C-) enclose the next into this sexp
paredit-forward-barf-sexp C-} exclude
paredit-backward-slurp-sexp C-(  
paredit-backward-barf-sexp C-{  
paredit-wrap-round M-(  
paredit-join-sexp M-J  
paredit-splice-sexp M-s  
paredit-split-sexp M-S  
paredit-raise-sexp M-r  
paredit-convolute-sexp M-? exchange child and parent

6 Magit

C-x g to enter, and

  • c c to commmit
  • c a to amend commit
  • P u to push
  • F u to pull

7 Speedbar

This is strictly not a plugin. Toggle by speedbar.

q
quit
g
refresh
t
toggle slowbar mode, which stop update until activate
n,p
next, previous
M-n,M-p
restricted next/previous. Will 1) skip subdirectory, and 2) will not leave subdirectory
f
file mode
b
buffer mode
r
previous mode
=
expand
-
hide
RET
open

7.1 Buffer Mode

k
kill the buffer
r
revert the buffer

8 EDBI

This is database viewer for MySQL, Sqlite, Postgresql.

Install edbi and edbi-sqlite package and run as root:

cpan RPC::EPC::Service DBI DBD::SQLite DBD::Pg DBD::mysql

Run edbi-sqlite to open a sqlite database. This will open database view.

To sum up:

n/p
nav rows
c
query editor
C-c C-c
execute
q
quit
RET
go into
SPC
display info
V
show table data

8.1 Database View

n/p
nav rows
c
switch to query editor buffer
RET
show table data
SPC
show table definition
q
quit and disconnenct

8.2 Table definition View

n/p
c
V
show table data
q
kill buffer

8.3 Query Editor

C-c C-c
execute
C-c q
kill buffer
M-p/n
SQL history back/forward

8.4 Query Result Viewer

n/p
SPC
display whole data at current cell, hit SPC again to dismiss
q
quit

Author: Hebi Li

Created: 2017-06-14 Wed 22:43

Validate