From a2e1b5c58df6aa7583a6cc1954e0b7c01000ef1a Mon Sep 17 00:00:00 2001 From: Josha von Gizycki Date: Wed, 18 Jul 2018 13:46:40 +0200 Subject: [PATCH] initial commit --- .gitignore | 3 ++ init.el | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 .gitignore create mode 100644 init.el diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a8edbc9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/* +!init.el +!.gitignore diff --git a/init.el b/init.el new file mode 100644 index 0000000..90625cd --- /dev/null +++ b/init.el @@ -0,0 +1,92 @@ +(require 'package) +(add-to-list 'package-archives + '("melpa-stable" . "http://stable.melpa.org/packages/") t) +(package-initialize) + +(defvar my-packages + '(better-defaults projectile clojure-mode cider)) +(dolist (p my-packages) + (unless (package-installed-p p) + (package-install p))) + +(require 'rcirc) +(add-hook 'rcirc-mode-hook + (lambda () + (set (make-local-variable 'scroll-conservatively) + 8192))) +(setq rcirc-default-nick "jsha") +(setq rcirc-default-user-name "jsha") +(setq rcirc-default-full-name "jsha") +(setq rcirc-server-alist + '(("irc.quakenet.org" :channels ("#warofmadness")) + ("irc.freenode.org" :channels ("#stratum0")))) + +(global-set-key (kbd "C-x g") 'magit-status) + +(global-linum-mode) +; (windmove-default-keybindings) +; (git-auto-commit-mode) + +(defun indent-buffer () + (interactive) + (save-excursion + (indent-region (point-min) (point-max) nil))) +(global-set-key [f12] 'indent-buffer) + +(recentf-mode 1) +(setq recentf-max-menu-items 25) +(global-set-key "\C-x\ \C-r" 'recentf-open-files) + +(global-set-key (kbd "C-M-SPC") 'just-one-space) + +(global-set-key (kbd "C-x -") 'hs-toggle-hiding) + +(autoload 'enable-paredit-mode "paredit" "Turn on pseudo-structural editing of Lisp code." t) +(add-hook 'lisp-mode-hook #'enable-paredit-mode) +(add-hook 'emacs-lisp-mode-hook #'enable-paredit-mode) +(add-hook 'eval-expression-minibuffer #'enable-paredit-mode) +(add-hook 'clojure-mode-hook #'enable-paredit-mode #'hs-minor-mode) +(add-hook 'less-css-mode-hook #'hs-minor-mode) + +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(ansi-color-faces-vector + [default default default italic underline success warning error]) + '(custom-enabled-themes (quote (misterioso))) + '(package-selected-packages + (quote + (less-css-mode sass-mode paredit markdown-mode hy-mode yaml-mode editorconfig php-mode magit auto-complete parinfer git-commit rainbow-delimiters cyberpunk-theme flatui-dark-theme paper-theme cider clojure-mode projectile better-defaults)))) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(default ((t (:inherit nil :stipple nil :background "#2d3743" :foreground "#e1e1e0" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 128 :width normal :foundry "DAMA" :family "Ubuntu Mono"))))) + +(global-auto-complete-mode) + +;; CUA OS copypasta even in ncurses mode +;case system-type +; ('darwin (unless window-system +; (setq interprogram-cut-function +; (lambda (text &optional push) +; (let* ((process-connection-type nil) +; (pbproxy (start-process "pbcopy" "pbcopy" "/usr/bin/pbcopy"))) +; (process-send-string pbproxy text) +; (process-send-eof pbproxy)))))) +; ('gnu/linux (progn +; (setq x-select-enable-clipboard t) +; (defun xsel-cut-function (text &optional push) +; (with-temp-buffer +; (insert text) +; (call-process-region (point-min) (point-max) "xsel" nil 0 nil "--clipboard" "--input"))) +; (defun xsel-paste-function() +; +; (let ((xsel-output (shell-command-to-string "xsel --clipboard --output"))) +; (unless (string= (car kill-ring) xsel-output) +; xsel-output ))) +; (setq interprogram-cut-function 'xsel-cut-function) +; (setq interprogram-paste-function 'xsel-paste-function))))