emacs

Introduction

Editing text, saving and exiting

.emacs file; changing screens; opening files; search; saving

emacs mode buffer. has info on file and mode

text folding

major modes, including text mode

Saving and exiting

exit:

C-x C-c

Save:

C-x C-s

Searching

search forward:

C-s

search back:

C-r

Copy and paste

emacs copy paste

Undo and redo

Buffers and reading other files

read file:

C-x C-f

switch buffer:

C-x b

kill buffer

C-x k

dired

File browser. Installed by default.

C-x d

Macros

Allows you to see value of variable set:

M-x describe-variable

M-x concept. runs macros? C-sfsjfls is shortcuts for macros? so for each thing should have the M-x and C-ses equivalent?

Working with multiple windows, and shells

Windows

close window:

C-x 0

close other windows:

C-x 1

split on x axis:

C-x 2

split on y axis:

C-x 3

switch windows:

C-x o

Make window wider:

C-x }

Make window thinner:

C-x {

balance window size:

C-x +

make window smaller:

C-x -

Shell

Start a shell:

M-x shell

Renaming buffers and multiple shells

Can name shell so if get a second one it won’t be the same.

C-u M-x shell

GUI and terminal

GUI and terminal

to start in terminal mode:

emacs -nw

GUI only: Font size and zooming

zoom out

C--

zoom in

C-+

Emacs daemon

Emacs daemon

Built in modes

Org mode

customising using conf.org file

org mode use of * use of + use of TODO: set with:

C-c C-t

see agenda files to be in agenda stored in org-agenda-files

to change state and record note:

C-u C-c C-t

cycle through agenda files:

C-'

add current file to agenda files:

C-c [

remove:

C-c ]

view agenda:

M-x org-agenda

change theme:

M-x load-theme

eww (Emacs Web Wowser)

Installed by default.

Tramp for remote access

Built into Emacs

Language specific modes, including Python and Javascript

Python mode

to get python interactive shell from within python mode

C-c C-p

"run-python" macro

python.el provides python mode. built into emacs

elpy (to evaluate script):

C-c C-c

jedi for autocompletion

Javascript

Customising Emacs and Emacs Lisp (Elisp)

Introduction

~/.emacs
~/.emacs.el
~/.emacs.d/init.el

Installing additional packages

Package mangement and MELPA and ELPA repositories

M-x list-packages

i/I d/D x to execute the activity

Treemacs

treemacs: R to rename yf to copy file cf to create file cd to create directory

treemacs-select-window to go to treemacs window

Magit

magit-status to see magit status

magit: press s to stage a file

For git

Projectile

projects, projectile projectile-add-known-project; projectile-switch-project

Company-mode

COMPlete ANY

Need to install: Evil mode

Use vi style bindings.