An infinite number of monkeys typing into GNU Emacs would never make a good program.
——— Linus Torvalds
- About
- Screenshots
- Installation
- Prerequisites
- User Guidance
- Custom Configurations
- Recommendation
- Ask Me Anything
Emacs changes how you think about programming.
Emacs is totally introspectable. You can always find out what code runs when I press this button?.
Emacs is an incremental programming environment. There’s no edit-compile-run cycle. There isn’t even an edit-run cycle. You can execute snippets of code and gradually turn them into a finished project. There’s no distinction between your editor and your interpreter.
Emacs is a mutable environment. You can set variables, tweak functions with advice, or redefine entire functions. Nothing is off-limits.
Emacs provides functionality without applications. Rather than separate applications, functionality is all integrated into your Emacs instance. Amazingly, this works. Ever wanted to use the same snippet tool for writing C++ classes as well as emails?
Emacs is full of incredible software concepts that haven’t hit the mainstream yet. For example:
- Many platforms have a single item clipboard. Emacs has an infinite clipboard.
- If you undo a change, and then continue editing, you can’t redo the original change. Emacs allows undoing to any historical state, even allowing tree-based exploration of history.
- Emacs supports a reverse variable search: you can find variables with a given value.
- You can perform structural editing of code, allowing you to make changes without breaking syntax. This works for lisps (paredit) and non-lisps (smartparens).
- Many applications use a modal GUI: for example, you can’t do other edits during a find-and-replace operation. Emacs provides recursive editing that allow you to suspend what you’re currently doing, perform other edits, then continue the original task.
Emacs has a documentation culture. Emacs includes a usage manual, a lisp programming manual, pervasive docstrings and even an interactive tutorial.
Emacs has a broad ecosystem. If you want to edit code in a niche language, there’s probably an Emacs package for it.
Emacs doesn’t have a monopoly on good ideas, and there are other great tools out there. Nonetheless, we believe the Emacs learning curve pays off.
This beautifully written About EMACS section credits to Remacs.
Welcome to the Emacs Of Dreams. Wait no, I meant the Emacs Operating System.
This repository contains my personal configuration for GNU Emacs that I use on
the daily and port around from system to system with me.
The configuration depends on init.el, my-lisp(dir) and early-init.el (sets up a few initial GUI settings), bootstraps use-package. and loads init.el, which is where the majority of the configuration magic happens.
This is an Emacs distribution that aims to enhance the default Emacs experience. It alters a lot of the default settings, bundles of additional packages and adds its own core library to the mix. The final product offers an easy to use Emacs configuration for Emacs newcomers and lots of additional power for Emacs power users.
It’s able to run on Windows, GNU Linux and macOS. It is compatible ONLY with GNU Emacs 26.1 and above. In general you’re advised to always run with the latest stable release - currently 28.2.
Here are some demo…
A dashboard on startup can clean my mind.😌
Center text in the frame, looks nice ;) and =flycheck= with BitMap-Arrow on the right-fringe 😎
default Transparent mod 👍🏻
File navigation with Speed-bar.
feel the Org-mode :D
Company-mode with yasnippet 🔥
- Install GNU Emacs.
- Move
~/.emacs
or~/.emacs.d
, if you already have it. - Clone this repo to
HOME
or~/
path using git and update all the submodules.
Run this snippets on your terminal:
cd ~ git clone https://github.com/Likhon-baRoy/.emacs.d.git cd.emacs.d
- Ensure a stable connection to Melpa Packages, then open Emacs.
- Enter
y
when prompted withAuto-update packages now?
, wait for all packages to install. (Ignore the warnings on the first launch.) - In your favorite browser,
Ctrl-f Prerequisite
through this README and follow the Prerequisite instructions. - Restart Emacs and Start using your Dream Emacs! 🎉
I will be updating My-EMACS from time to time, it is best to git pull
once a while to stay up to date.
Please also execute git submodule update --recursive --remote
to sync with all the submodules.
If you spotted a bug or you have any suggestions, please fill in an issue. If you have something to fix, feel free to create a pull request.
Everyone starts somewhere, and I started here. My heart whelming Thanks 🙏🏽 to you guy’s 💜, who put all their effort always makes Emacs go one-step further.
- Uncle Dev (GitHub, YouTube)
- Mike Zamansky (GitHub, YouTube, Website)
- Mingde (Matthew) Zeng (GitHub)
- System Crafters (YouTube, Website, Website)
- Protesilaos Stavrou (GitHub, YouTube, Website)
And many other people from the Internet World.
Please update this file your personal info.
(setq user-full-name "Likhon Barai"
user-login-name "likhon"
user-real-login-name "raxit"
user-mail-address "[email protected]")
Also this project relies on the following list of applications:
- Exuberant Ctags (
ctags
) - Install cmake, clang, llvm, gdb for programming purpose
- Install JetBrains Mono (
font
) - Install emoji font (Noto Emoji &
noto-cjk
, for all the fonts imaginable) for Linux - Install all-the-icons fonts:
M-x all-the-icons-install-fonts
- GNU GLOBAL (
global
) - Git (
git
) - GnuPG (
gpg
) - Hunspell (
hunspell
) with dictionaries - ID Utils (
mkid
,lid
,fid
,fnid
,xtokid
) - Password Store (
pass
) - ripgrep (
rg
)
📝 Note: (for beginners) I’ll be using Ctrl
as C
, Alt
as M
, Space
as S
and BackSpace
as BS
.
After installation process is done. Whenever you open a files within Emacs, the whole file will be opened in folding mode. Which you’ll obviously won’t see until you find the shortcut key-binding. There is a default feature for this which called hs-minor-mode I just change some default key-bindings for more useful.
check this out:
C-c h (hide-all) C-c s (show-all) S-BS (hide-block) C-BS (show-block) C-TAB (toggle-hiding) - fold the current section. S-TAB (hide-level) - fold the sub sections of the current section.
Here is my some personal changes for Emacs which comes default with this configuration. Checkout full documentation of Keybindings in Emacs user-manual.
;; Disable Ctrl-z.
(global-unset-key "\^z")
;; (global-set-key "\C-z" 'call-last-kbd-macro) ; call-last-kbd-macro frequently used key on a double key sequence (I think original is ^Xe)
(global-set-key "\C-w" 'backward-kill-word)
;; I use `C-h' for backspace in Emacs and move `help-command' elsewhere:
(global-set-key "\^h" 'backward-delete-char)
(define-key isearch-mode-map "\C-h" 'isearch-delete-char)
(global-set-key (kbd "C-S-H") 'kill-whole-line)
;; this lets us have long lines go off the side of the screen instead of hosing up the ascii art
(global-set-key "\C-x\C-l" 'toggle-truncate-lines)
(global-set-key "\C-c\C-d" "\C-a\C- \C-n\M-w\C-y") ; Duplicate a whole line
(global-set-key (kbd "C-S-R") 'rename-file)
(global-set-key "\C-cD" 'Delete-current-file)
(global-set-key "\C-x\C-k" 'kill-region)
(global-set-key "\C-c\C-k" 'kill-region)
(global-set-key "\M-o" 'other-window)
(global-set-key "\M-n" 'next-buffer)
(global-set-key "\M-p" 'previous-buffer)
(global-set-key (kbd "M-<tab>") 'company-complete-common-or-cycle)
(global-set-key "\M-TAB" 'company-complete-common-or-cycle)
(global-set-key (kbd "C-.") #'other-window)
(global-set-key (kbd "C-,") #'prev-window)
;; Unfill paragraph
;; Might be good. For instance for canceling all of the paragraph quickly or for commenting it away.
(defun unfill-paragraph ()
"Convert a multi-line paragraph into a single line of text."
(interactive)
(let ((fill-column (point-max)))
(fill-paragraph nil)))
;; Handy key definition
(define-key global-map "\M-Q" 'unfill-paragraph)
- Now now, how much you like transparency? With this config this method comes default.
you can toggleon
/off
transparency usingC-c t
keystrokes.
;;________________________________________________________________
;; Transparent Emacs
;;________________________________________________________________
(set-frame-parameter (selected-frame) 'alpha '(85 . 50))
(add-to-list 'default-frame-alist '(alpha . (85 . 50)))
;; (set-frame-parameter (selected-frame) 'alpha '(<active> . <inactive>))
;; (set-frame-parameter (selected-frame) 'alpha <both>)
;; Use the following snippet after you’ve set the alpha as above to assign a toggle to “C-c t”:
(defun toggle-transparency ()
"Crave for transparency!"
(interactive)
(let ((alpha (frame-parameter nil 'alpha)))
(set-frame-parameter
nil 'alpha
(if (eql (cond ((numberp alpha) alpha)
((numberp (cdr alpha)) (cdr alpha))
;; Also handle undocumented (<active> <inactive>) form.
((numberp (cadr alpha)) (cadr alpha)))
100)
'(85 . 50) '(100 . 100)))))
(global-set-key (kbd "C-c t") 'toggle-transparency)
Here’s a input method for Bengali
or Bangla
language. Which I used with Probhat
key-layout.
(setq default-input-method "bengali-probhat")
(set-fontset-font "fontset-default" 'bengali (font-spec :family "Kalpurush" :size 16))
(defun remove-quail-show-guidance ()
"Function for removing guidance."
nil)
(defun remove-quail-completion ()
"Function for removing completion."
(quail-select-current))
(defun bn-company-wordfreq ()
"Bangla auto-suggestion with company-wordfreq."
(interactive)
(advice-add 'quail-show-guidance :override #'remove-quail-show-guidance)
(advice-add 'quail-completion :override #'remove-quail-completion)
(setq ispell-local-dictionary "bengali")
(setq-local company-backends '(company-wordfreq))
(setq-local company-transformers nil))
(add-hook 'text-mode-hook (lambda ()
(setq-local company-backends '(company-wordfreq))
(setq-local company-transformers nil)))
Here are some general recommendations on Emacs usage that you might find helpful:
Most people don’t use the CapsLock key (unless you like YELLING ON THE INTERNET) so you can use this simple fix to replace it with the CTRL to make your Emacs life easier. Doing this will prevent you from having to bend your pinky down all day long to hit all those fabled Emacs keybindings, allowing you to keep your hands on the home row of the keyboard.
Here’s how to do it across all 3 major operating systems:
Linux X11
There are many ways to accomplish this in Linux, but the easiest (and most repeatable) I’ve found is to use xmodmap. First, create a file named .Xmodmap
in your home folder and populate it like so:
clear lock clear control keycode 66 = Control_L add control = Control_L add Lock = Control_R
This replaces CapsLock with control and also replaces the Ctrl key on the right side with CapsLock just in case you ever need to use it. Most login systems (GDM, KDM, etc) will load this file when you log in so you might not need to do anything extra for it to take effect, just log out and log back in again. If that doesn’t seem to work, you can add this line to one of your startup files (.xinitrc
, .profile
, window manager configuration, etc):
xmodmap ~/.Xmodmap
This beautifully written Replace CapsLock with CTRL section credits to Emacs From Scratch
💬 Ask a question 📖 Read questionsI get questions by email, occasionally. This way anyone can read the answer!
Anything means anything. Personal questions. Money. Work. Life. Code. Cooking. Traveling. Sports. Teaching. Pokémon. Whatever. 😂
This project is open source software licensed under the GNU General Public Licence version 3.
Copyright © 2020, 2022, Free Software Foundation, Inc.