Commits

Taylor Venable committed ce62963 Merge

merge

Comments (0)

Files changed (6)

Config/Xresources

 ! Defaults applied to all xterm instances.
 xterm.vt100.cursorBlink: true
 xterm.vt100.utf8: 1
+xterm.vt100.utf8Title: true
 xterm.vt100.locale: UTF-8
 xterm.vt100.geometry: 120x40
 xterm.vt100.metaSendsEscape: true
-xterm.vt100.saveLines: 1000
+xterm.vt100.saveLines: 4096
 xterm.vt100.scrollBar: true
 xterm.vt100.scrollBarBorder: 0
 xterm.vt100.showMissingGlyphs: true

Config/bash_profile

 perlbrew_bashrc="${HOME}/perl5/perlbrew/etc/bashrc"
 if [[ -r "$perlbrew_bashrc" ]]; then
     source "$perlbrew_bashrc"
+elif [[ -r "${HOME}/perl5/lib/perl5/local/lib.pm" ]]; then
+    eval $(perl -I "${HOME}/perl5/lib/perl5/" -Mlocal::lib)
 fi
 
 godi_enable() {
 (require 'autoinsert)                   ; insert text when opening new files
 (require 'calendar)			; organize your life
 (require 'compile)                      ; display the results of compiling a file
-(require 'cperl-mode)			; a superior Perl mode
 (require 'darcsum)                      ; finds the differences in Darcs repositories
 ;(require 'doxymacs)                    ; Doxygen integration
 (require 'erc)				; the ERC chat client
 ;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
+(require 'cperl-mode)
+
 (setq cperl-indent-level 4)
 (setq cperl-close-paren-offset -4)
 (setq cperl-highlight-variables-indiscriminately t)
 (setq cperl-indent-parens-as-block t)
 
+(defvar tcv-cperl-array-face-attrs nil)
+(defvar tcv-cperl-hash-face-attrs nil)
+
 (add-hook
  'cperl-mode-hook
  (lambda ()
-   (set-face-attribute
-    'cperl-array-face nil
-    :weight 'normal
-    :background nil
-    :foreground (face-attribute 'error :foreground))
-   (set-face-attribute
-    'cperl-hash-face nil
-    :weight 'normal
-    :background nil
-    :foreground (face-attribute 'warning :foreground))))
+   (if (cl-find-if (lambda (x) (string-prefix-p "sanityinc-tomorrow-" x))
+		   (mapcar (lambda (x) (symbol-name x)) custom-enabled-themes))
+       (progn
+	 (mapc (lambda (face)
+		 (let ((var (intern (concat "tcv-" (symbol-name face) "-attrs"))))
+		   (set var
+			(cons (reverse
+			       (cl-reduce
+				(lambda (lst attr)
+				  (cons (face-attribute face attr) (cons attr lst)))
+				'(:weight :background :foreground)
+				:initial-value nil))
+			      (symbol-value var)))))
+	       '(cperl-array-face cperl-hash-face))
+	 (set-face-attribute
+	  'cperl-array-face nil
+	  :weight 'normal
+	  :background nil
+	  :foreground (face-attribute 'error :foreground))
+	 (set-face-attribute
+	  'cperl-hash-face nil
+	  :weight 'normal
+	  :background nil
+	  :foreground (face-attribute 'warning :foreground)))
+     (progn
+       (apply #'set-face-attribute `(cperl-array-face ,nil ,@(car tcv-cperl-array-face-attrs)))
+       (apply #'set-face-attribute `(cperl-hash-face ,nil ,@(car tcv-cperl-hash-face-attrs)))
+       (setq tcv-cperl-array-face-attrs (cdr tcv-cperl-array-face-attrs))
+       (setq tcv-cperl-hash-face-attrs (cdr tcv-cperl-hash-face-attrs))))))
 
 ;(require 'slime)                   ; autoloads a superior Lisp interaction mode
 ;(require 'swank-clojure)           ; to use Clojure from within SLIME
 (setq pp^L-^L-string-post "")
 (set-face-attribute 'pp^L-highlight nil :weight 'bold :foreground "white" :background "blue" :box nil)
 
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;;  Which-Function
+;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(require 'which-func)
+
+(set-face-attribute 'which-func nil :inherit 'modeline-buffer-id :weight 'normal)
+(setq which-func-format `("{" ,(cadr which-func-format) "}"))
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
 ;;  PLANNER
 (setq safe-local-variable-values
       '((js2-additional-externs)))
 
-(setq lazy-highlight-cleanup nil)               ; Don't automatically un-highlight isearch hits.
+;; (setq lazy-highlight-cleanup nil)               ; Don't automatically un-highlight isearch hits.
 (setq-default buffer-file-coding-system 'utf-8-unix)
 (setq-default bidi-display-reordering nil)     ; turn off all bidi stuff
 (setq-default fill-column 80)                  ; fill up to column 80
 (defalias 'ack-find-file-same 'ack-and-a-half-find-file-same)
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;;  Version Control
+;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(if (string-match "\\.med-web\\.com$" system-name)
+    (add-hook 'vc-git-log-edit-mode-hook
+      (lambda ()
+	(insert-file "~/Templates/git"))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;;
 ;;;  Fonts
 ;;;
   :inverse-video t)
 
 (let ((error-pattern "\\<\\(FIXME\\|ERROR\\):")
-      (warning-pattern "\\<\\(TODO\\|NOTE\\|WARNING\\|NOTREACHED\\):"))
+      (warning-pattern "\\<\\(TODO\\|NOTE\\|XXX\\|WARNING\\|NOTREACHED\\):"))
   (mapc
    (lambda (mode)
      (font-lock-add-keywords mode `((,error-pattern 1 'tcv-error prepend)))
 (global-set-key (kbd "C-c m") 'blink-matching-open)
 (global-set-key (kbd "C-,") 'hs-toggle-hiding)
 
+(require 'boxquote)
 
+(global-set-key (kbd "C-c b b") 'boxquote-insert-buffer)
+(global-set-key (kbd "C-c b f") 'boxquote-insert-file)
+(global-set-key (kbd "C-c b k") 'boxquote-kill)
+(global-set-key (kbd "C-c b n") 'boxquote-narrow-to-boxquote)
+(global-set-key (kbd "C-c b p") 'boxquote-paragraph)
+(global-set-key (kbd "C-c b q") 'boxquote-fill-paragraph)
+(global-set-key (kbd "C-c b r") 'boxquote-region)
+(global-set-key (kbd "C-c b s") 'boxquote-shell-command)
+(global-set-key (kbd "C-c b t") 'boxquote-title)
+(global-set-key (kbd "C-c b u") 'boxquote-unbox-region)
+(global-set-key (kbd "C-c b y") 'boxquote-yank)
 
 ;; The important distinction here is that these delete instead of killing. I
 ;; originally implemented this because XFCE's clipboard manager had some problem
     (run-at-time 5 nil 'message nil)))
 
 (global-set-key (kbd "<f9>") 'cmus-prev)
-(global-set-key (kbd "<f10>") 'cmus-stop)
-(global-set-key (kbd "<f11>") 'cmus-play)
+(global-set-key (kbd "<f10>") 'cmus-play)
+(global-set-key (kbd "<f11>") 'cmus-stop)
 (global-set-key (kbd "<f12>") 'cmus-next)
 (global-set-key (kbd "C-<f9>") 'cmus-vol-down)
 (global-set-key (kbd "C-<f12>") 'cmus-vol-up)
         (set-variable 'tab-width 4))))
 
 (add-hook 'find-file-hook 'work-code-conventions)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;;  Whitespace Cleanup
+;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
 (add-hook 'before-save-hook 'delete-trailing-whitespace)
 
+;; These buffer-local variables are not set until `whitespace-mode' is
+;; activated, but they are used by `whitespace-cleanup' --- so we must set them
+;; manually to be sure that `whitespace-cleanup' will work correctly without
+;; requiring that the mode be on first.
+
+(defadvice whitespace-cleanup
+  (around whitespace-cleanup-indent-tab activate)
+  (let ((whitespace-indent-tabs-mode indent-tabs-mode)
+        (whitespace-tab-width tab-width))
+    ad-do-it))
+
 ; I just figured out how input methods work and they're too damn useful.
 ; (global-set-key (kbd "C-\\") #'hs-toggle-hiding)
 
 		      ;; |                   "string";
 		      ;; `----
 
-		      (statement-cont c-lineup-string-cont (c-lineup-assignments +))
+		      (statement-cont
+		       c-lineup-string-cont
+		       (c-lineup-assignments +))
+
+		      ;; ,----[ Example ]
+		      ;; | function(
+		      ;; |     long_argument_1,
+		      ;; |     long_argument_2
+		      ;; | );
+		      ;; `----
+
+		      (arglist-intro . +)
 
 		      ;; ,----[ Example ]
 		      ;; | function(arg1, "concatenated"
 
 		      (arglist-cont-nonempty
 		       c-lineup-string-cont
-		       ,@(cdr (assoc 'arglist-cont-nonempty (get 'c-offsets-alist 'c-stylevar-fallback))))
+		       ,@(cdr (assoc 'arglist-cont-nonempty
+				     (get 'c-offsets-alist 'c-stylevar-fallback))))
+
+		      ;; ,----[ Example ]
+		      ;; | if ( some_long_condition()
+		      ;; |      && some_other_condition()
+		      ;; |    )
+		      ;; `----
+
+		      (arglist-close
+		       c-lineup-close-paren
+		       c-lineup-arglist)
 		      )
 		     ))
 
  ;; 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.
- '(which-func ((t (:inherit modeline-buffer-id :weight normal)))))
+ )
 
 (defun tcv-insert-tab ()
   (interactive)

Config/weechat/buffers.conf

 [look]
 core_to_front = off
 detach = 0
-hide_merged_buffers = none
+hide_merged_buffers = keepserver
 immune_detach_buffers = ""
 indenting = off
 indenting_number = on
 jump_prev_next_visited_buffer = off
-name_crop_suffix = "+"
+name_crop_suffix = ""
 name_size_max = 0
 number_char = ": "
 prefix = off
 prefix_empty = on
 short_names = on
 show_lag = off
-show_number = on
+show_number = off
 sort = number
 whitelist_buffers = ""

Config/weechat/weechat.conf

 buffers.filling_top_bottom = horizontal
 buffers.hidden = off
 buffers.items = "buffers"
-buffers.position = left
+buffers.position = top
 buffers.priority = 0
-buffers.separator = on
-buffers.size = 20
+buffers.separator = off
+buffers.size = 1
 buffers.size_max = 0
 buffers.type = root
 input.color_bg = default

Support/weechat/ijchain.py

 import re
 import weechat
 
-weechat.register("ijchain", "metasyntax", "1.0", "GPL3", "Interprets messages from ijchain in #tcl, making them look like messages from in-room users.", "", "")
+weechat.register("ijchain", "metasyntax", "1.1", "GPL3", "Interprets messages from ijchain in #tcl, making them look like messages from in-room users.", "", "")
 
+ijchain_regexp = re.compile('^ijchain')
 talk_regexp = re.compile('<([^>]+)>')
 action_regexp = re.compile('\x01ACTION ([^ ]+)')
 
 def modifier_cb(data, modifier, modifier_data, string):
     if modifier == 'irc_in_PRIVMSG':
         parsed = weechat.info_get_hashtable("irc_message_parse", { "message": string })
-        if parsed['channel'] == '#tcl' and parsed['nick'] == 'ijchain':
+        if parsed['channel'] == '#tcl' and ijchain_regexp.match(parsed['nick']):
             channel = parsed['channel']
             msg = parsed['arguments'][len(channel)+2:] # strip '{channel} :' from message
             match = talk_regexp.match(msg)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.