]> git.siccegge.de Git - dotfiles/emacs.git/commitdiff
Import old config
authorChristoph Egger <christoph@christoph-egger.org>
Fri, 6 Nov 2015 13:47:48 +0000 (14:47 +0100)
committerChristoph Egger <christoph@christoph-egger.org>
Fri, 6 Nov 2015 13:50:46 +0000 (14:50 +0100)
14 files changed:
config/c.el [new file with mode: 0644]
config/erc.el [new file with mode: 0644]
config/general.el [new file with mode: 0644]
config/identica.el [new file with mode: 0644]
config/irony.el [new file with mode: 0644]
config/jabber.el [new file with mode: 0644]
config/org.el [new file with mode: 0644]
config/pastebin.el [new file with mode: 0644]
config/python.el [new file with mode: 0644]
config/slime.el [new file with mode: 0644]
config/vamos.el [new file with mode: 0644]
config/whitespace.el [new file with mode: 0644]
config/yas.el [new file with mode: 0644]
emacs [new file with mode: 0644]

diff --git a/config/c.el b/config/c.el
new file mode 100644 (file)
index 0000000..6e6e4ad
--- /dev/null
@@ -0,0 +1,10 @@
+(require 'smart-tabs-mode)
+(setq-default c-basic-offset 4
+              tab-width 4
+              indent-tabs-mode t)
+
+(setq c-default-style
+         '((java-mode . "ellemtel")
+               (c++-mode . "ellemtel")))
+
+(smart-tabs-insinuate 'c 'javascript 'c++)
diff --git a/config/erc.el b/config/erc.el
new file mode 100644 (file)
index 0000000..c7268ca
--- /dev/null
@@ -0,0 +1,83 @@
+(message "Starting ERC IRC Client")
+(require 'erc)
+
+;; Colorfull nicknames
+(and
+ (require 'erc-highlight-nicknames)
+ (add-to-list 'erc-modules 'highlight-nicknames)
+ (erc-update-modules))
+
+(setq erc-autojoin-channels-alist
+; Uni Erlangen / IRCnet
+         '(("uni-erlangen.de"
+                "#faui2k9"
+                "#fau-kiosk"
+                "#fau"
+                "#vamos"
+                "#faui2k10"
+                "#faui2k6"
+                "#hallowelt")
+; OFTC
+               ("oftc.net"
+                "#debian-devel-changes"
+                "#debian-games"
+                "#debian-devel"
+                "#debian-release"
+                "#debian-buildd"
+                "#debian-ftp"
+                "#debian-newmaint"
+                "#debian-mentors"
+                "#debian.de"
+                "#debian-devel.de"
+                "#debian-muc"
+                "#debian-python"
+                "#debian-kbsd"
+                "#debian-mentors")
+; Freenode
+               ("freenode.net"
+                "#unknown-horizons"
+                "#fife"
+                "#lisp"
+                "#parpg"
+                "#freedesktop-games"
+                "#stk"
+                "#warzone2100-dev"
+                "#supertux"
+                "#openwrt"
+                "#glou")))
+
+(setq erc-modules
+      '(netsplit
+               fill
+               button
+               match
+               track
+               completion
+               readonly
+               networks
+               ring
+               autojoin
+               noncommands
+               irccontrols
+               move-to-prompt
+               stamp
+               menu
+               list
+               log
+               scrolltobottom
+               highlight-nicknames
+               keep-place))
+
+(erc-autojoin-mode 1)
+
+(setq erc-log-insert-log-on-open nil
+         erc-log-channels t
+         erc-log-channels-directory "~/.irclogs/"
+         erc-save-buffer-on-part t
+         erc-hide-timestamps nil
+         erc-fill-column 200
+         erc-user-full-name "Christoph Egger")
+
+;; Regularly save stuff
+(add-hook 'erc-insert-post-hook 'erc-save-buffer-in-logs)
+
diff --git a/config/general.el b/config/general.el
new file mode 100644 (file)
index 0000000..1a80a6d
--- /dev/null
@@ -0,0 +1,74 @@
+(message "General emacs setup")
+
+;; Indentation
+(setq tab-width 4)
+(setq-default tab-width 4)
+(setq-default indent-tabs-mode t)
+(setq mail-user-agent 'sendmail-user-agent)
+;; Insert stuff at cursor position not at mouse position
+;(setq mouse-yank-at-point t)
+
+;; Emacs autobrabel configuration goes into extra file
+
+;; More uniq, parsable buffer names
+(require 'uniquify)
+(setq uniquify-buffer-name-style 'post-forward)
+
+(require 'auto-complete)
+
+(require 'magit)
+
+;; Ido mode
+(require 'ido)
+(ido-mode t)
+
+;; Reindenting the whole buffer
+(defun iwb ()
+  "indent whole buffer"
+  (interactive)
+  (delete-trailing-whitespace)
+  (indent-region (point-min) (point-max) nil)
+  (untabify (point-min) (point-max)))
+
+(when (>= emacs-major-version 23)
+  (global-linum-mode 1)
+  (setq linum-format "%3d")
+  (modify-all-frames-parameters
+     '((font . "DejaVu Sans Mono-9"))))
+
+;; Django template mode
+(when (locate-library "django-html-mode")
+  (require 'django-html-mode)
+  (message "Django HTML Mode available"))
+
+;; Some file extensions autoloading
+(add-to-list 'auto-mode-alist '("\\.mdn$" . markdown-mode))
+(add-to-list 'auto-mode-alist '("\\.dtpl$" . django-html-mode))
+
+(setq browse-url-generic-program (executable-find "midori")
+         browse-url-browser-function 'browse-url-generic)
+
+(global-set-key (kbd "C-x d") 'dired)
+
+(set-input-method "german-postfix")
+
+(load-file "/home/christoph/.emacs.d/rudel/rudel-loaddefs.el")
+
+(winner-mode)
+
+(defun paste-x-selection ()
+  (interactive)
+  (let ((x-select-enable-primary t)
+        (x-select-enable-clipboard nil))
+    (yank)))
+(global-set-key (kbd "<XF86Paste>") 'paste-x-selection)
+(global-set-key (kbd "C-S-<insert>") 'paste-x-selection)
+
+
+(defun paste-x-selection ()
+  (interactive)
+  (let ((x-select-enable-primary t)
+        (x-select-enable-clipboard nil))
+    (yank)))
+(global-set-key (kbd "<XF86Paste>") 'paste-x-selection)
+(global-set-key (kbd "C-S-<insert>") 'paste-x-selection)
diff --git a/config/identica.el b/config/identica.el
new file mode 100644 (file)
index 0000000..1f1157b
--- /dev/null
@@ -0,0 +1,12 @@
+(message "Bringin up Identi.ca")
+
+(if (locate-library "identica-mode")
+       (progn
+         (require 'identica-mode)
+         (setq identica-soft-wrap-status t)
+         (when (require 'netrc nil t)
+               (autoload 'identica-mode "identica-mode" nil t)
+               (let ((identica (netrc-machine (netrc-parse "~/.netrc") "identi.ca" t))) ; remove this `t' if you didn't specify a port
+                 (setq identica-password (netrc-get identica "password") ; if it's last, avoid doing C-M-x in public spaces at least ;-)
+                               identica-username (netrc-get identica "login")))))
+  (message "[W] no identica mode found!"))
\ No newline at end of file
diff --git a/config/irony.el b/config/irony.el
new file mode 100644 (file)
index 0000000..95b6c48
--- /dev/null
@@ -0,0 +1,13 @@
+(require 'irony)
+(add-hook 'c++-mode-hook 'irony-mode)
+(add-hook 'c-mode-hook 'irony-mode)
+(add-hook 'objc-mode-hook 'irony-mode)
+
+;; replace the `completion-at-point' and `complete-symbol' bindings in
+;; irony-mode's buffers by irony-mode's function
+(defun my-irony-mode-hook ()
+  (define-key irony-mode-map [remap completion-at-point]
+    'irony-completion-at-point-async)
+  (define-key irony-mode-map [remap complete-symbol]
+    'irony-completion-at-point-async))
+(add-hook 'irony-mode-hook 'my-irony-mode-hook)
diff --git a/config/jabber.el b/config/jabber.el
new file mode 100644 (file)
index 0000000..fc60069
--- /dev/null
@@ -0,0 +1,8 @@
+(message "Bringing up Jabber client")
+(if (locate-library "jabber")
+       (progn
+         (require 'jabber-autoloads)
+         ;(require 'jabber)
+
+         (setq jabber-roster-line-format "%c %-25n %u %-8s  %S"))
+  (message "[W] No jabber available"))
\ No newline at end of file
diff --git a/config/org.el b/config/org.el
new file mode 100644 (file)
index 0000000..1d70373
--- /dev/null
@@ -0,0 +1,2 @@
+
+(setq org-log-done 'time)
diff --git a/config/pastebin.el b/config/pastebin.el
new file mode 100644 (file)
index 0000000..ced33c5
--- /dev/null
@@ -0,0 +1,12 @@
+(message "Bringing up pastebin support")
+
+(if (locate-library "pastebin")
+       (require 'pastebin)
+  (message "[W] No pastebin stuff available"))
+
+(if (locate-library "identica-mode")
+       (defun snippet-publish ()
+         "Takes the actual region, pastes it on paste.q0a.de an asks you for a identi.ca message"
+         (interactive)
+         (identica-update-status-from-minibuffer
+          (pastebin (region-beginning) (region-end) "f"))))
\ No newline at end of file
diff --git a/config/python.el b/config/python.el
new file mode 100644 (file)
index 0000000..1310614
--- /dev/null
@@ -0,0 +1 @@
+(setq py-indent-offset tab-width)
diff --git a/config/slime.el b/config/slime.el
new file mode 100644 (file)
index 0000000..fe80d2f
--- /dev/null
@@ -0,0 +1,10 @@
+(message "Slime setup")
+;; Make Common Lisp implementation M-- M-x selectable
+
+(setq slime-lisp-implementations
+      '((sbcl ("sbcl"))
+        (abcl ("abcl"))))
+
+(add-hook 'slime-mode-hook
+          (lambda ()
+            (setq indent-tabs-mode nil)))
diff --git a/config/vamos.el b/config/vamos.el
new file mode 100644 (file)
index 0000000..081794c
--- /dev/null
@@ -0,0 +1,9 @@
+(defun vamos-include (config-name)
+  (interactive "MConfig variable: ")
+  (insert-file "/proj/i4vamos/users/siccegge/patch-template")
+  (replace-string "FOOBAR" config-name)
+  (fill-paragraph))
+
+(global-set-key (kbd "C-c v") 'vamos-include)
+
+(load-file (expand-file-name "~/.emacs.d/org-view-link.el"))
\ No newline at end of file
diff --git a/config/whitespace.el b/config/whitespace.el
new file mode 100644 (file)
index 0000000..1c1ad0c
--- /dev/null
@@ -0,0 +1,3 @@
+;; Show whitespaces by default
+(require 'show-wspace)
+(global-font-lock-mode 1)
diff --git a/config/yas.el b/config/yas.el
new file mode 100644 (file)
index 0000000..e309c49
--- /dev/null
@@ -0,0 +1,5 @@
+(require 'yasnippet)
+(yas/initialize)
+
+(setq yas/root-directory '("~/proj/snipets"))
+(mapc 'yas/load-directory yas/root-directory)
diff --git a/emacs b/emacs
new file mode 100644 (file)
index 0000000..8e678e7
--- /dev/null
+++ b/emacs
@@ -0,0 +1,25 @@
+(add-to-list 'load-path "~/.emacs.d/lisp/")
+
+(require 'cl)
+
+(setq emacs-private-config (expand-file-name "~/.emacs.d/config/"))
+
+(load-file "~/.emacs-site.el")
+
+(setq custom-file "~/.emacs.d/emacs-custom.el")
+(load custom-file)
+
+(dolist (file-to-load '("yas.el"
+                        "python.el"
+                        "c.el"
+                        "irony.el"
+                        "org.el"
+                        "vamos.el"
+                        "slime.el"
+                        "whitespace.el"
+                        "general.el"
+                        "jabber.el"
+                        "erc.el"
+                        "identica.el"
+                        "pastebin.el"))
+  (load-file (concat emacs-private-config file-to-load)))