Skip to content

Azkae/emacs-conf

Repository files navigation

Emacs config

This is my personnal Emacs configuration. Using Straight to declare packages.

Install

Install emacs:

brew install libtool cmake

brew tap d12frosted/emacs-plus
brew install emacs-plus --with-native-comp
./install.sh
# Put the following in your ~/.emacs:
# (load-file "$(pwd)/init.el")

Run

M-x nerd-icons-install-fonts
M-x treesit-auto-install-all

MacOS:

System Settings -> Keyboard shortcuts -> Input sources:
Disable all ^Space to fix ctrl-space

Keybindings

Aside from basic emacs keybindings here is a list of keybind defined in this config.

Keybinding Description
C-f select/mark current line
C-d duplicate current line
C-q kill buffer
M-[UP-DOWN] scroll buffer
C-M-[arrow] move the window to the left/right/up/down
M-q-[arrow] jump to window to the left/right/up/down

Helm

Keybinding Description
C-x C-f helm-find-files: view and open files
C-p helm-buffer-list: select/create buffer
M-f helm-occur: search in current buffer
M-R helm-ag: select a directory and do a recursive ag search

While in helm-find-files (C-x C-f):

Keybinding Description
M-R start helm-ag in selected directory
C-p use find command in selected directory to search file

While in helm-mode, use tab to quickly see the candidate in another buffer.

Projectile

Keybinding Description
C-c p f list all the file in the project
C-c p F list all files from all opened project
C-c p s s runs helm-ag (recursive grep) at the root of the project
C-c p a switch between files with the same name but different extensions (for example .c/.h)
C-c p r runs query-replace on all files in the project
C-c p i regenerate project file cache (if many file path changed)

Theses are standard projectile keybindings, see the complete list here

Multiple Cursors

Keybinding Description
C-j add a new cursor to the next point that match the selected region.
M-j add a new cursor to the next point that match the selected symbol.

Notes:

For Iterm:

In Profiles -> Advanced -> Sementic History: Set to Run command, with value: $PATH_TO/emacsclient -n \2 \1

On emacs version 28 and lower, apply helm patch for OSX:

cd ~/.emacs.d/straight/repos/helm
git apply ~/emacs-conf/helm.patch

To fix lldb bug on MacOS Sonoma

rm ~/.emacs.d/debug-adapters/codelldb/extension/lldb/bin/debugserver

How to reproduce bugs:

emacs -Q -l ~/.emacs.d/straight/repos/straight.el/bootstrap.el

(straight-use-package 'use-package)
(setq straight-use-package-by-default t)
(global-set-key (kbd "C-f") "\C-a\C-a\C-@\C-e")
(global-set-key (kbd "C-q") 'kill-this-buffer)


(when (string-equal system-type "darwin")
  (setq mac-command-modifier 'meta
  mac-option-modifier nil))

(use-package ...)

TODO:

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages