From 5ce9e2dc46d072f81905853cf2bad1d80f27f4ff Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Sun, 17 Feb 2013 02:07:13 +0900 Subject: [PATCH 1/4] fix bug about whitespaces --- bashrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bashrc b/bashrc index 9c75b13..185b6ce 100755 --- a/bashrc +++ b/bashrc @@ -311,7 +311,7 @@ cd(){ if test $# -eq 0 then pushd ~/ >/dev/null - elif test $1 = - + elif test "$1" = - then local pwd="$PWD" command cd "$OLDPWD" @@ -799,7 +799,7 @@ __my_set_title(){ esac } PROMPT_COMMAND="__my_set_title \${USER}@\${HOSTNAME}\:\${PWD}; -__my_set_screen_title \"\$(basename \$PWD)/\"" +__my_set_screen_title \$(basename \"\$PWD\")/" # copied from https://wiki.archlinux.org/index.php/X_resources invader(){ From 7d24bd934aed1966b533c10aa6e7bcc806613912 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Sun, 3 Mar 2013 23:42:48 +0900 Subject: [PATCH 2/4] use end-mark.el --- emacs.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/emacs.el b/emacs.el index d5813fd..59c4f4c 100644 --- a/emacs.el +++ b/emacs.el @@ -452,6 +452,13 @@ found, otherwise returns nil." (set-face-underline-p 'vertical-border nil) +(and (fetch-library + "https://raw.github.com/tarao/elisp/master/end-mark.el" + t) + (require 'end-mark nil t) + (global-end-mark-mode)) + + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; file handling From 1a408ea81b07e9d008eadc76c71a3665ec65a931 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Wed, 6 Mar 2013 11:22:08 +0900 Subject: [PATCH 3/4] reindent when C-m on html-mode --- emacs.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/emacs.el b/emacs.el index 59c4f4c..6a547cc 100644 --- a/emacs.el +++ b/emacs.el @@ -675,9 +675,6 @@ found, otherwise returns nil." (add-to-list 'interpreter-mode-alist '("python2" . python-mode)) -;; (add-hook default-majorg-mode -;; 'my-detect-major-mode-from-shebang) - ;; http://fukuyama.co/foreign-regexp '(and (fetch-library "https://raw.github.com/k-talo/foreign-regexp.el/master/foreign-regexp.el" @@ -783,6 +780,11 @@ found, otherwise returns nil." (setq auto-mode-alist (append '(("PKGBUILD\\'" . pkgbuild-mode)) auto-mode-alist))) +(add-hook 'html-mode-hook + (lambda () + (define-key html-mode-map (kbd "C-m") + 'reindent-then-newline-and-indent))) + (add-hook 'text-mode-hook (lambda () (define-key text-mode-map (kbd "C-m") 'newline))) From 449ac0ffbea94765b06bdf664d2041e043ff439a Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Wed, 6 Mar 2013 13:06:09 +0900 Subject: [PATCH 4/4] tmux def fg black --- tmux.conf.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tmux.conf.pl b/tmux.conf.pl index 06beb4e..36ee220 100755 --- a/tmux.conf.pl +++ b/tmux.conf.pl @@ -12,7 +12,7 @@ my %color_prefs = ( "darwin-mba.local" => "red,white", "newkiwi" => "magenta,white" ); -my $color_def = "green,white"; +my $color_def = "green,black"; sub tmux { my @command = ($tmux_command, ); @@ -57,7 +57,7 @@ sub get_hostname { my $hostname = $ENV{"HOSTNAME"}; if (! $hostname) { $hostname = `hostname`; - $hostname =~ s/\n//; + chomp($hostname) } return $hostname; }