<commit_before>;; Turn on mark highlighting

(setq transient-mark-mode t)

;; Window management

(defun prev-window ()
  (interactive)
  (other-window -1))

(global-set-key (kbd "M-o") 'other-window)
(global-set-key (kbd "M-i") 'prev-window)

;; Show column-number in the mode line
(column-number-mode 1)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Python setup
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(add-to-list 'load-path "~/.emacs.d/")

(require 'ipython)
(require 'python-mode)
(add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))

(require 'auto-complete)
(global-auto-complete-mode t)

(fset 'py-execute-line
   "\C-a\C-@\C-e\C-c\C-r")
(global-set-key (kbd "C-c C-j") 'py-execute-line)

;; Mini-buffer customization
(require 'ido)
(setq ido-enable-flex-matching t)
  (setq ido-everywhere t)
  (ido-mode 1)

;; Colors
(require 'color-theme)
(color-theme-initialize)
(color-theme-tty-dark)

(defvar python-comment (make-face 'python-comment))
(set-face-foreground 'python-comment "Pink")

(font-lock-add-keywords
 'python-mode
 '(("\\(#.*$\\)" 1 python-comment prepend)))

;; Line specific python rules
(require 'column-marker)
(add-hook 'python-mode-hook (lambda () (interactive) (column-marker-1 80)))
(setq-default py-indent-offset 2)
(add-hook 'javascript-mode-hook (lambda () (interactive) (column-marker-1 80)))

;; Require newline
(setq require-final-newline t)

;; NO BACKUPS
(setq make-backup-files nil)

;; PBPASTE
;; http://www.lingotrek.com/2010/12/integrate-emacs-with-mac-os-x-clipboard.html
(when (eq system-type 'darwin)
  (defun mac-copy ()
  (shell-command-to-string "pbpaste"))

  (defun mac-paste (text &optional push)
  (let ((process-connection-type nil))
  (let ((proc (start-process "pbcopy-process" "*Messages*" "pbcopy")))
  (process-send-string proc text)
  (process-send-eof proc))))

  (setq interprogram-cut-function 'mac-paste)
  (setq interprogram-paste-function 'mac-copy)<commit_msg>Adding 80 char hook for LaTeX.<commit_after>;; Turn on mark highlighting

(setq transient-mark-mode t)

;; Window management

(defun prev-window ()
  (interactive)
  (other-window -1))

(global-set-key (kbd "M-o") 'other-window)
(global-set-key (kbd "M-i") 'prev-window)

;; Show column-number in the mode line
(column-number-mode 1)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Python setup
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(add-to-list 'load-path "~/.emacs.d/")

(require 'ipython)
(require 'python-mode)
(add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))

(require 'auto-complete)
(global-auto-complete-mode t)

(fset 'py-execute-line
   "\C-a\C-@\C-e\C-c\C-r")
(global-set-key (kbd "C-c C-j") 'py-execute-line)

;; Mini-buffer customization
(require 'ido)
(setq ido-enable-flex-matching t)
  (setq ido-everywhere t)
  (ido-mode 1)

;; Colors
(require 'color-theme)
(color-theme-initialize)
(color-theme-tty-dark)

(defvar python-comment (make-face 'python-comment))
(set-face-foreground 'python-comment "Pink")

(font-lock-add-keywords
 'python-mode
 '(("\\(#.*$\\)" 1 python-comment prepend)))

;; Line specific python rules
(require 'column-marker)
(add-hook 'python-mode-hook (lambda () (interactive) (column-marker-1 80)))
(setq-default py-indent-offset 2)
(add-hook 'javascript-mode-hook (lambda () (interactive) (column-marker-1 80)))
(add-hook 'latex-mode-hook (lambda () (interactive) (column-marker-1 80)))

;; Require newline
(setq require-final-newline t)

;; NO BACKUPS
(setq make-backup-files nil)

;; PBPASTE
;; http://www.lingotrek.com/2010/12/integrate-emacs-with-mac-os-x-clipboard.html
(when (eq system-type 'darwin)
  (defun mac-copy ()
  (shell-command-to-string "pbpaste"))

  (defun mac-paste (text &optional push)
  (let ((process-connection-type nil))
  (let ((proc (start-process "pbcopy-process" "*Messages*" "pbcopy")))
  (process-send-string proc text)
  (process-send-eof proc))))

  (setq interprogram-cut-function 'mac-paste)
  (setq interprogram-paste-function 'mac-copy)
{'fraction_non_alphanumeric': 0.22832080200501254, 'fraction_numerical': 0.009774436090225564, 'mean_word_length': 4.474622770919067, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '713745', 'n_tokens_mistral': 1600, 'n_tokens_neox': 1490, 'n_words': 312}