;; --- Speed benchmarking (setq init-start-time (current-time)) ;; --- Straight.el bootstrap (defvar bootstrap-version) (let ((bootstrap-file (expand-file-name "straight/repos/straight.el/bootstrap.el" (or (bound-and-true-p straight-base-dir) user-emacs-directory))) (bootstrap-version 7)) (unless (file-exists-p bootstrap-file) (with-current-buffer (url-retrieve-synchronously "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el" 'silent 'inhibit-cookies) (goto-char (point-max)) (eval-print-last-sexp))) (load bootstrap-file nil 'nomessage)) ;; --- Evil (straight-use-package 'evil) (require 'evil) (evil-mode 1) ;; Use ctrl-h/j/k/l to switch between windows (like in vim-tmux-nav) (with-eval-after-load 'evil (global-set-key (kbd "C-h") 'windmove-left) (global-set-key (kbd "C-j") 'windmove-down) (global-set-key (kbd "C-k") 'windmove-up) (global-set-key (kbd "C-l") 'windmove-right)) ;; --- NANO (load-file "~/.emacs.d/nano.el") ;; --- Typography (set-face-attribute 'default nil :height 100 :weight 'light :family "CommitMono") (set-face-attribute 'bold nil :weight 'regular) (set-face-attribute 'bold-italic nil :weight 'regular) (set-display-table-slot standard-display-table 'truncation (make-glyph-code ?…)) (set-display-table-slot standard-display-table 'wrap (make-glyph-code ?–)) ;; --- Scrolling (setq scroll-step 1 scroll-conservatively 10000) ;; --- Line numbers (global-display-line-numbers-mode 1) ;; --- Speed benchmarking (let ((init-time (float-time (time-subtract (current-time) init-start-time))) (total-time (string-to-number (emacs-init-time "%f")))) (message (concat (propertize "Startup time: " 'face 'bold) (format "%.2fs " init-time) (propertize (format "(+ %.2fs system time)" (- total-time init-time))))))