<commit_before>;; Basics
(set-language-environment "UTF-8")
(show-paren-mode 1)
(global-hl-line-mode)
(setenv "PAGER" "cat")

(custom-set-variables
 '(auto-save-file-name-transforms
   `((".*" ,(expand-file-name "~/.emacs.d/backups") t)))
 '(backup-directory-alist
    `((".*" . ,(expand-file-name "~/.emacs.d/backups"))))
 '(inhibit-startup-screen t)
 '(inhibit-startup-echo-area-message t)
 '(save-place-file "~/.emacs.d/places")
 '(sentence-end-double-space nil)
 '(show-paren-mode t))

(when window-system
  (setq frame-title-format '(buffer-file-name "%f" ("%b")))
  (mouse-wheel-mode t)
  (blink-cursor-mode -1))

; Hide menubar, toolbar and scrollbar.
(dolist (mode '(menu-bar-mode tool-bar-mode scroll-bar-mode))
  (when (fboundp mode) (funcall mode -1)))

;; Defaults
(set-default 'tab-width 4)
(set-default 'c-basic-offset 4)
(set-default 'scroll-step 1)
(set-default 'indicate-empty-lines nil)
(set-default 'indent-tabs-mode nil)
(set-default 'imenu-auto-rescan t)

;; Hooks
(add-hook 'text-mode-hook 'turn-on-auto-fill)
(add-hook 'text-mode-hook 'turn-on-flyspell)
(add-hook 'before-save-hook 'delete-trailing-whitespace)

;; Aliases
(defalias 'yes-or-no-p 'y-or-n-p)
(defalias 'auto-tail-revert-mode 'tail-mode)

;; Unique buffer names
(require 'uniquify)

;; Auto completion and yasnippet
(require 'auto-complete-config)
(ac-config-default)
(yas-global-mode 1)

;; Speedbar
(require 'sr-speedbar)
(setq sr-speedbar-right-side nil
      sr-speedbar-skip-other-window-p t)

; Disable linum for speedbar.
(add-hook 'speedbar-mode-hook '(lambda () (linum-mode 0)))

;; Powerline
(require 'powerline)
(powerline-vim-theme)

;; Theme
(load-theme 'solarized-light t)
;; (my-zenburn)

;; Ido
(ido-mode t)
(ido-ubiquitous t)
(setq ido-enable-prefix nil
      ido-enable-flex-matching t
      ido-auto-merge-work-directories-length nil
      ido-create-new-buffer 'always
      ido-use-filename-at-point 'guess
      ido-use-virtual-buffers t
      ido-handle-duplicate-virtual-buffers 2
      ido-max-prospects 10)

;; Smex
(setq smex-save-file (concat user-emacs-directory ".smex-items"))
(smex-initialize)
(global-set-key (kbd "M-x") 'smex)

;; Keybinds
(define-key global-map (kbd "C-+") 'text-scale-increase)
(define-key global-map (kbd "C--") 'text-scale-decrease)

; Use regex searches
(global-set-key (kbd "C-s") 'isearch-forward-regexp)
(global-set-key (kbd "\C-r") 'isearch-backward-regexp)
(global-set-key (kbd "C-M-s") 'isearch-forward)
(global-set-key (kbd "C-M-r") 'isearch-backward)<commit_msg>Added global keybind for comment-or-uncomment-region.<commit_after>;; Basics
(set-language-environment "UTF-8")
(show-paren-mode 1)
(global-hl-line-mode)
(setenv "PAGER" "cat")

(custom-set-variables
 '(auto-save-file-name-transforms
   `((".*" ,(expand-file-name "~/.emacs.d/backups") t)))
 '(backup-directory-alist
    `((".*" . ,(expand-file-name "~/.emacs.d/backups"))))
 '(inhibit-startup-screen t)
 '(inhibit-startup-echo-area-message t)
 '(save-place-file "~/.emacs.d/places")
 '(sentence-end-double-space nil)
 '(show-paren-mode t))

(when window-system
  (setq frame-title-format '(buffer-file-name "%f" ("%b")))
  (mouse-wheel-mode t)
  (blink-cursor-mode -1))

; Hide menubar, toolbar and scrollbar.
(dolist (mode '(menu-bar-mode tool-bar-mode scroll-bar-mode))
  (when (fboundp mode) (funcall mode -1)))

;; Defaults
(set-default 'tab-width 4)
(set-default 'c-basic-offset 4)
(set-default 'scroll-step 1)
(set-default 'indicate-empty-lines nil)
(set-default 'indent-tabs-mode nil)
(set-default 'imenu-auto-rescan t)

;; Hooks
(add-hook 'text-mode-hook 'turn-on-auto-fill)
(add-hook 'text-mode-hook 'turn-on-flyspell)
(add-hook 'before-save-hook 'delete-trailing-whitespace)

;; Aliases
(defalias 'yes-or-no-p 'y-or-n-p)
(defalias 'auto-tail-revert-mode 'tail-mode)

;; Unique buffer names
(require 'uniquify)

;; Auto completion and yasnippet
(require 'auto-complete-config)
(ac-config-default)
(yas-global-mode 1)

;; Speedbar
(require 'sr-speedbar)
(setq sr-speedbar-right-side nil
      sr-speedbar-skip-other-window-p t)

; Disable linum for speedbar.
(add-hook 'speedbar-mode-hook '(lambda () (linum-mode 0)))

;; Powerline
(require 'powerline)
(powerline-vim-theme)

;; Theme
(load-theme 'solarized-light t)
;; (my-zenburn)

;; Ido
(ido-mode t)
(ido-ubiquitous t)
(setq ido-enable-prefix nil
      ido-enable-flex-matching t
      ido-auto-merge-work-directories-length nil
      ido-create-new-buffer 'always
      ido-use-filename-at-point 'guess
      ido-use-virtual-buffers t
      ido-handle-duplicate-virtual-buffers 2
      ido-max-prospects 10)

;; Smex
(setq smex-save-file (concat user-emacs-directory ".smex-items"))
(smex-initialize)
(global-set-key (kbd "M-x") 'smex)

;; Keybinds
(define-key global-map (kbd "C-+") 'text-scale-increase)
(define-key global-map (kbd "C--") 'text-scale-decrease)

(global-set-key (kbd "C-c c m") 'comment-or-uncomment-region)

; Use regex searches
(global-set-key (kbd "C-s") 'isearch-forward-regexp)
(global-set-key (kbd "\C-r") 'isearch-backward-regexp)
(global-set-key (kbd "C-M-s") 'isearch-forward)
(global-set-key (kbd "C-M-r") 'isearch-backward)
{'fraction_non_alphanumeric': 0.18853577695457205, 'fraction_numerical': 0.004679274712419575, 'mean_word_length': 4.009765625, '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': '4103405', 'n_tokens_mistral': 2121, 'n_tokens_neox': 2057, 'n_words': 397}