Skip to content

askin/.emacs.d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My Personel Emacs Configuration

Build Status License

Installation

Requirements

  1. Emcas 29.1 or newer.
  2. Fira Code fonts => https://github.com/tonsky/FiraCode
  3. do-markdownit-cli Used on markdown-preview-mode => https://github.com/askin/do-markdownit-cli
cd ~
git clone git@github.com:askin/.emacs.d.git

After all packages installed, install latest fonts.

M-x all-the-icons-install-fonts

Run as a daemon

Copy emacs.service to ~/.config/systemd/user/

cp emacs.service ~/.config/systemd/user/

Reload units

systemctl daemon-reload --user

Enable emacs service to run startup

systemctl enable --user emacs

Start or stop emacs

systemctl start --user emacs
systemctl stop --user emacs

Start emacs client on gui

emacsclient -c

Start emacs client on cli

emacsclient -t

Emacs Tips

  • Rectangle Select C-x space
  • Create gist from current buffer C-c b
  • Open region with default browser C-c u
  • Run elisp code C-x C-e
  • Goto line M-g M-g
  • Comment region or block M-;
  • Start defining macro <F3> or C-x (
  • End defining macro <F4> or C-x )
    • Examle usage <F3> M-f foo <F4>
  • Open remote file or directory C-x C-f /ssh:remote-machine:~
  • Open remote file or directory as root C-x C-f /ssh:remote-machine|sudo:root@remote-machine:~
  • Add new line while replace-string C-q C-j
    • C-q: M-x quoted-insert
    • C-j: New line
  • Rename multiple files
    • Enter dired C-x d or C-x f
    • Switch to edit mode C-x C-q
    • After editing save with C-c C-c
  • To Upper/Lower case region
    • We have to enable before use
    (put 'downcase-region 'disabled nil)
    (put 'upcase-region 'disabled nil)
    • To upper C-x C-u
    • To lower C-x C-l
  • Insert a link to document C-c C-l
  • Repeating a Command details...
    • Repeat last command C-x z
    • Repeat n-times (10-times for example) C-u 1 0 command
      • Delete 10 character C-u 1 0 C-d
  • Select python virtual env M-x pyvenv-workon
  • Select all buffer C-x h
  • Json pretty print
    • Buffer: M-x json-pretty-print-buffer
    • Region: M-x json-pretty-print
  • Create temporary file or directory
    • Create file with extension M-x create-temp-file
    • Create directory M-x create-temp-directory
  • Insert or align comment M-; or M-x indent-for-comment.
  • Insert UUID M-x uuidgen
  • Save As C-x C-w
  • Open markdown preview mode M-x markdown-preview-mode

Emacs Bookmark

Key bind Description
C-x r m <RET> Set the bookmark for the visited file, at point.
C-x r m bookmark <RET> Set the bookmark named bookmark at point (bookmark-set).
C-x r M bookmark <RET> Like C-x r m, but don't overwrite an existing bookmark.
C-x r b bookmark <RET> Jump to the bookmark named bookmark (bookmark-jump).
C-x r l List all bookmarks (list-bookmarks).
M-x bookmark-save Save all the current bookmark values in the default bookmark file.

About

My personal emacs settings

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published