<commit_before>(use-package hexrgb)

(use-package wgrep)

(use-package haskell-mode)

;(use-package sqlplus)

;(use-package sql)

(use-package ack)

(use-package whole-line-or-region)

(use-package csharp-mode)

; http://docutils.sourceforge.net/docs/user/emacs.html
(use-package rst)

(use-package nxml-mode)

(use-package idomenu)

;;;_. emacs-lisp-mode-hook
(add-hook 'emacs-lisp-mode-hook
          '(lambda () 
             (define-key emacs-lisp-mode-map (kbd "C-c C-r") 'eval-region)))

;;;_. calc
(global-set-key [XF86Calculator] 'full-calc)

;; ;;;_. iy-go-to-char
;; (use-package iy-go-to-char
;;      :init 
;;      (progn
;;        (bind-key "M-m" 'jump-char-forward)
;;        (bind-key "M-M" 'jump-char-backward)))

;; ;; ;;;_. workgroups
; TODO: Loading of workgroups is current broken :(
;; (use-package workgroups
;;   :init
;;   (progn
;;     (workgroups-mode 1)
;;     (setq wg-prefix-key (kbd "C-c w"))
;;     (setq wg-switch-on-load nil) ; don't auto switch to the first workgroup 
;;     (wg-load "~/.emacs.d/.cache/workgroups")))

;;;_. desktop-save-mode
;(setq desktop-path "~/.emacs.d/.cache/")
;(desktop-save-mode 1)

; http://emacs-fu.blogspot.com/2009/11/copying-lines-without-selecting-them.html
(defadvice kill-ring-save (before slick-copy activate compile) "When called
  interactively with no active region, copy a single line instead."
  (interactive (if mark-active (list (region-beginning) (region-end)) (message
  "Copied line") (list (line-beginning-position) (line-beginning-position
  2)))))

(defadvice kill-region (before slick-cut activate compile)
  "When called interactively with no active region, kill a single line instead."
  (interactive
    (if mark-active (list (region-beginning) (region-end))
      (list (line-beginning-position)
        (line-beginning-position 2)))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Highlight mark
; http://lists.gnu.org/archive/html/help-gnu-emacs/2003-11/msg00328.html
; nice mark - shows mark as a highlighted 'cursor' so user 'always' 
; sees where the mark is. Especially nice for killing a region.
(defvar pg-mark-overlay nil
  "Overlay to show the position where the mark is") 
(make-variable-buffer-local 'pg-mark-overlay)

(put 'pg-mark-mark 'face 'secondary-selection)

(defvar pg-mark-old-position nil
  "The position the mark was at. To be able to compare with the
current position")

(defun pg-show-mark () 
  "Display an overlay where the mark is at. Should be hooked into 
activate-mark-hook" 
  (unless pg-mark-overlay 
    (setq pg-mark-overlay (make-overlay 0 0))
    (overlay-put pg-mark-overlay 'category 'pg-mark-mark))
  (let ((here (mark t)))
    (when here
      (move-overlay pg-mark-overlay here (1+ here)))))

(defadvice  exchange-point-and-mark (after pg-mark-exchange-point-and-mark)
  "Show visual marker"
  (pg-show-mark))

(ad-activate 'exchange-point-and-mark)
(add-hook 'activate-mark-hook 'pg-show-mark)

;;;_. lusty explorer

; http://www.emacswiki.org/emacs/LustyExplorer
;; (use-package lusty-explorer
;;   :init 
;;   (progn
;;     (bind-key "C-x C-f" 'lusty-file-explorer)
;;     (bind-key "C-x b" 'lusty-buffer-explorer)))

(iswitchb-mode t)
(bind-key "C-x b" 'iswitchb-buffer)

  ;; overrride the normal file-opening, buffer switching
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defun tab-width-two ()
  (setq default-tab-width 2)            ; set tab-width
  (setq-default tab-stop-list (list 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 100 102 104 106 108))<commit_msg>Remove iswitchb.<commit_after>(use-package hexrgb)

(use-package wgrep)

(use-package haskell-mode)

;(use-package sqlplus)

;(use-package sql)

(use-package ack)

(use-package whole-line-or-region)

(use-package csharp-mode)

; http://docutils.sourceforge.net/docs/user/emacs.html
(use-package rst)

(use-package nxml-mode)

(use-package idomenu)

;;;_. emacs-lisp-mode-hook
(add-hook 'emacs-lisp-mode-hook
          '(lambda () 
             (define-key emacs-lisp-mode-map (kbd "C-c C-r") 'eval-region)))

;;;_. calc
(global-set-key [XF86Calculator] 'full-calc)

;; ;;;_. iy-go-to-char
;; (use-package iy-go-to-char
;;      :init 
;;      (progn
;;        (bind-key "M-m" 'jump-char-forward)
;;        (bind-key "M-M" 'jump-char-backward)))

;; ;; ;;;_. workgroups
; TODO: Loading of workgroups is current broken :(
;; (use-package workgroups
;;   :init
;;   (progn
;;     (workgroups-mode 1)
;;     (setq wg-prefix-key (kbd "C-c w"))
;;     (setq wg-switch-on-load nil) ; don't auto switch to the first workgroup 
;;     (wg-load "~/.emacs.d/.cache/workgroups")))

;;;_. desktop-save-mode
;(setq desktop-path "~/.emacs.d/.cache/")
;(desktop-save-mode 1)

; http://emacs-fu.blogspot.com/2009/11/copying-lines-without-selecting-them.html
(defadvice kill-ring-save (before slick-copy activate compile) "When called
  interactively with no active region, copy a single line instead."
  (interactive (if mark-active (list (region-beginning) (region-end)) (message
  "Copied line") (list (line-beginning-position) (line-beginning-position
  2)))))

(defadvice kill-region (before slick-cut activate compile)
  "When called interactively with no active region, kill a single line instead."
  (interactive
    (if mark-active (list (region-beginning) (region-end))
      (list (line-beginning-position)
        (line-beginning-position 2)))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Highlight mark
; http://lists.gnu.org/archive/html/help-gnu-emacs/2003-11/msg00328.html
; nice mark - shows mark as a highlighted 'cursor' so user 'always' 
; sees where the mark is. Especially nice for killing a region.
(defvar pg-mark-overlay nil
  "Overlay to show the position where the mark is") 
(make-variable-buffer-local 'pg-mark-overlay)

(put 'pg-mark-mark 'face 'secondary-selection)

(defvar pg-mark-old-position nil
  "The position the mark was at. To be able to compare with the
current position")

(defun pg-show-mark () 
  "Display an overlay where the mark is at. Should be hooked into 
activate-mark-hook" 
  (unless pg-mark-overlay 
    (setq pg-mark-overlay (make-overlay 0 0))
    (overlay-put pg-mark-overlay 'category 'pg-mark-mark))
  (let ((here (mark t)))
    (when here
      (move-overlay pg-mark-overlay here (1+ here)))))

(defadvice  exchange-point-and-mark (after pg-mark-exchange-point-and-mark)
  "Show visual marker"
  (pg-show-mark))

(ad-activate 'exchange-point-and-mark)
(add-hook 'activate-mark-hook 'pg-show-mark)

;;;_. lusty explorer

; http://www.emacswiki.org/emacs/LustyExplorer
;; (use-package lusty-explorer
;;   :init 
;;   (progn
;;     (bind-key "C-x C-f" 'lusty-file-explorer)
;;     (bind-key "C-x b" 'lusty-buffer-explorer)))

  ;; overrride the normal file-opening, buffer switching
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defun tab-width-two ()
  (setq default-tab-width 2)            ; set tab-width
  (setq-default tab-stop-list (list 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 100 102 104 106 108))
{'fraction_non_alphanumeric': 0.20691503618332888, 'fraction_numerical': 0.036451353524524256, 'mean_word_length': 3.6411691542288556, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, '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': '1424085', 'n_tokens_mistral': 3067, 'n_tokens_neox': 2630, 'n_words': 688}