Skip to content

habamax/.emacs.d_old

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

.emacs.d

Carefully crafted settings for alien’s editor I become used to.

My themes

Light theme

img README 1
Figure 1. habamax-theme — work in progress

Dark theme

img README 2
Figure 2. kosmos-theme — in melpa

Gotchas and Goodies

Windows cmd.exe shell encoding

Windows cmd shell encoding problems — can’t search russian text using ripgrep/grep/pt/ack or (shell-command "program.exe русский_файл.txt")

(defun windows? ()
  "return true if Windows"
  (eq system-type 'windows-nt))

;; This is windows only
;; I have finally solved the problem of external processes to use Russian language,
;; Now rg.exe can actually search Russian words from Emacs.
(when (windows?)
  (setq default-process-coding-system '(utf-8-dos . cp1251-dos)))

Follow mode

It is awesome for writing long documents — just vertically split a window and turn on follow-mode to have continuation of the buffer in the second splitted window.

img README 3

Change or Remove minibuffer text on startup

Define a function with the text you need:

;; show emacs startup time
(defun display-startup-echo-area-message ()
  (let ((elapsed (float-time (time-subtract (current-time)
                                            emacs-start-time)))) ; (1)
    (message "Loading Emacs configuration... DONE (%.3fs),  overral emacs-init-time: %s" elapsed (emacs-init-time))))
  1. is defined earlier as (defconst emacs-start-time (current-time))

Use ripgrep to search files in Projectile

It is way faster then using "native" emacs lisp implementation.

(use-package projectile
  :defer
  :diminish projectile-mode
  :config
  (setq projectile-completion-system 'ivy)
  (setq projectile-enable-caching t)

  (when (executable-find "rg")
    (setq projectile-indexing-method 'alien)

    (defun projectile-get-ext-command ()
      "Always use `rg' for getting a list of all files in the project."
      "rg --line-number --smart-case --follow --mmap --null --files")))

About

Emacs is useful.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published