<commit_before>(global-font-lock-mode 1)
(add-to-list 'load-path "~/.emacs.d")

;; no menu or tool bars
(menu-bar-mode -1)
(tool-bar-mode -1)
(setq inhibit-startup-screen t)

;; highlight whitespace errors
(setq-default whitespace-style '(face tabs trailing lines space-before-tab space-after-tab empty line))
(whitespace-mode)
(setq require-final-newline t)

;; set up tabstop functions
(setq-default indent-tabs-mode nil)

(defun setup-tabstop (sw et)
  "Setup tabstop like vim's &sw and &et"
  (progn
    (setq tab-width sw)
    (setq c-basic-offset sw)
    (setq cperl-indent-level sw)
    (indent-tabs-mode et)))

(column-number-mode)

;; Keep backup {file}~ and autosave #{file}# files in central directories
(defvar autosave-dir "~/.emacs.d/autosaves")
(make-directory autosave-dir t)
(defvar backup-dir "~/.emacs.d/backups")
(make-directory backup-dir t)

(setq auto-save-list-file-prefix (concat autosave-dir))
(setq auto-save-file-name-transforms `((".*" ,(concat autosave-dir "/\\1") t)))
(setq backup-directory-alist `(("." . ,backup-dir)))

;; Keep VIPER settings in the emacs dir
(setq viper-custom-file-name "~/.emacs.d/viper")

;; Set up package management
(require 'package)
(setq package-archives
      '(("gnu" . "http://elpa.gnu.org/packages/")
      ("marmalade" . "http://marmalade-repo.org/packages/")
      ("melpa" . "http://melpa.milkbox.net/packages/")))
(package-initialize)

;; EMacs VIm compatibility Layer
(require 'evil)
(evil-mode)
(setq evil-default-state 'normal)
(evil-set-initial-state 'nrepl-mode 'insert)
(evil-set-initial-state 'fundamental-mode 'insert)

;; I DO things
(require 'ido)
(ido-mode t)

;; set font in X11
(if (display-graphic-p)
    (set-default-font "DejaVu Sans Mono-14"))

;; Set color-theme if running in X or a high-color terminal
(defun setup-color-theme-p ()
  "Returns true if it looks like the display can handle 24-bit colors"<commit_msg>Makes evil mode a little better for repls<commit_after>(global-font-lock-mode 1)
(add-to-list 'load-path "~/.emacs.d")

;; no menu or tool bars
(menu-bar-mode -1)
(tool-bar-mode -1)
(setq inhibit-startup-screen t)

;; highlight whitespace errors
(setq-default whitespace-style '(face tabs trailing lines space-before-tab space-after-tab empty line))
(whitespace-mode)
(setq require-final-newline t)

;; set up tabstop functions
(setq-default indent-tabs-mode nil)

(defun setup-tabstop (sw et)
  "Setup tabstop like vim's &sw and &et"
  (progn
    (setq tab-width sw)
    (setq c-basic-offset sw)
    (setq cperl-indent-level sw)
    (indent-tabs-mode et)))

(column-number-mode)

;; Keep backup {file}~ and autosave #{file}# files in central directories
(defvar autosave-dir "~/.emacs.d/autosaves")
(make-directory autosave-dir t)
(defvar backup-dir "~/.emacs.d/backups")
(make-directory backup-dir t)

(setq auto-save-list-file-prefix (concat autosave-dir))
(setq auto-save-file-name-transforms `((".*" ,(concat autosave-dir "/\\1") t)))
(setq backup-directory-alist `(("." . ,backup-dir)))

;; Keep VIPER settings in the emacs dir
(setq viper-custom-file-name "~/.emacs.d/viper")

;; Set up package management
(require 'package)
(setq package-archives
      '(("gnu" . "http://elpa.gnu.org/packages/")
      ("marmalade" . "http://marmalade-repo.org/packages/")
      ("melpa" . "http://melpa.milkbox.net/packages/")))
(package-initialize)

;; EMacs VIm compatibility Layer
(require 'evil)
(evil-mode)
(setq evil-default-state 'normal)
(evil-set-initial-state 'nrepl-mode 'insert)
(evil-set-initial-state 'fundamental-mode 'insert)

; clear default insert mode mappings
(setcdr evil-insert-state-map nil)
(define-key evil-insert-state-map
  [escape] 'evil-normal-state)
(define-key evil-insert-state-map
  (read-kbd-macro evil-toggle-key) 'evil-emacs-state)

;; I DO things
(require 'ido)
(ido-mode t)

;; set font in X11
(if (display-graphic-p)
    (set-default-font "DejaVu Sans Mono-14"))

;; Set color-theme if running in X or a high-color terminal
(defun setup-color-theme-p ()
  "Returns true if it looks like the display can handle 24-bit colors"
{'fraction_non_alphanumeric': 0.1626416954164613, 'fraction_numerical': 0.0049285362247412515, 'mean_word_length': 4.011111111111111, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3776978', 'n_tokens_mistral': 1531, 'n_tokens_neox': 1475, 'n_words': 387}