Created
February 10, 2022 17:07
-
-
Save ishan9299/aa320ad659914a2517af3772b547f9a0 to your computer and use it in GitHub Desktop.
minimal emacs config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; for performance | |
(setq gc-cons-threshold 100000000) | |
(setq read-process-output-max (* 1024 1024)) | |
(add-hook 'after-init-hook #'(lambda () | |
(setq gc-cons-threshold 800000))) | |
(require 'package) | |
(add-to-list 'package-archives '("gnu" . "https://elpa.gnu.org/packages/")) | |
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) | |
(package-initialize) | |
(unless (package-installed-p 'use-package) | |
(package-refresh-contents) | |
(package-install 'use-package)) | |
(eval-and-compile | |
(setq use-package-always-ensure t | |
use-package-expand-minimally t)) | |
(setq custom-file (expand-file-name "custom.el" user-emacs-directory)) | |
(use-package vertico | |
:ensure t | |
:init | |
(vertico-mode) | |
:bind (:map vertico-map | |
("RET" . vertico-directory-enter) | |
("DEL" . vertico-directory-delete-char) | |
("M-DEL" . vertico-directory-delete-word))) | |
(use-package orderless | |
:ensure t | |
:init | |
(setq completion-style '(orderless) | |
completion-category-defaults nil | |
completion-category-overrides '((file (styles partial-completion))))) | |
(use-package savehist | |
:ensure t | |
:init | |
(savehist-mode)) | |
(use-package go-mode | |
:ensure t) | |
(use-package ibuffer | |
:ensure nil | |
:bind ("C-x C-b" . ibuffer) | |
:hook (ibuffer-mode . hl-line-mode)) | |
(use-package magit | |
:ensure t | |
:bind ("C-c g s" . magit-status) | |
:commands magit) | |
(use-package expand-region | |
:ensure t | |
:bind ("C-=" . er/expand-region)) | |
(menu-bar-mode -1) ;;; disable menu-bar-mode | |
(scroll-bar-mode -1) ;;; disable scroll-bar-mode | |
(tool-bar-mode -1) ;;; disable tool-bar-mode | |
(when (version< emacs-version "26.3") | |
(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")) | |
;;; settings for camel case words | |
(global-subword-mode 1) | |
;;; highlight the current line | |
(global-hl-line-mode 1) | |
;;; font settings | |
(set-frame-font "Victor Mono Semibold-12" t t) | |
;;; time settings | |
(setq display-time-24hr-format t) | |
(setq display-time-format "%H:%M - %d %B %Y") | |
(display-time-mode 1) | |
;;; bar mode cursor | |
(setq-default cursor-type 'bar) | |
;;; don't show startup screen and scratch message | |
(setq inhibit-startup-screen t) | |
(setq initial-scratch-message "") | |
;;; window title | |
(setq-default frame-title-format '("%b")) | |
;;; shut up emacs | |
(setq ring-bell-function 'ignore) | |
(fset 'yes-or-no-p 'y-or-n-p) | |
;;; show paren mode | |
(show-paren-mode 1) | |
;;; don't create lockfiles | |
(setq create-lockfiles nil) | |
;;; tabs settings | |
(setq tab-width 4) | |
(setq indent-tabs-mode t) ;;; use tabs to indent | |
;;; load theme | |
(load-theme 'modus-vivendi t) | |
;;; always kill the current buffer | |
(defun kill-current-buffer () | |
"Kills the current buffer." | |
(interactive) | |
(kill-buffer (current-buffer))) | |
(global-set-key (kbd "C-x k") 'kill-current-buffer) |
Wow I forgot I had this. Glad it helped you.
…On Thu, 8 Jun, 2023, 3:36 pm Sepehr Aryani, ***@***.***> wrote:
***@***.**** commented on this gist.
------------------------------
I just by accident deleted my own config and I did not put it into git so
there was no way for me to quickly go back to my emacs experience.
fortunately I found this and now I'm back at my emacs again.
thanks for sharing this
—
Reply to this email directly, view it on GitHub
<https://gist.github.com/ishan9299/aa320ad659914a2517af3772b547f9a0#gistcomment-4593294>
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALM3ZBFIB4PRSWAJ3QXOWWDXKGP3RBFKMF2HI4TJMJ2XIZLTSKBKK5TBNR2WLJDHNFZXJJDOMFWWLK3UNBZGKYLEL52HS4DFQKSXMYLMOVS2I5DSOVS2I3TBNVS3W5DIOJSWCZC7OBQXE5DJMNUXAYLOORPWCY3UNF3GS5DZVRZXKYTKMVRXIX3UPFYGLK2HNFZXIQ3PNVWWK3TUUZ2G64DJMNZZDAVEOR4XAZNEM5UXG5FFOZQWY5LFVEYTCNBWGU3DANZSU52HE2LHM5SXFJTDOJSWC5DF>
.
You are receiving this email because you authored the thread.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>
.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I just by accident deleted my own config and I did not put it into git so there was no way for me to quickly go back to my emacs experience. fortunately I found this and now I'm back at my emacs again.
thanks for sharing this