diff --git a/bashrc b/bashrc index 72f2235..ebe789d 100755 --- a/bashrc +++ b/bashrc @@ -312,7 +312,7 @@ cd(){ if test $# -eq 0 then pushd ~/ >/dev/null - elif test $1 = - + elif test "$1" = - then local pwd="$PWD" command cd "$OLDPWD" @@ -800,7 +800,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(){ diff --git a/emacs.el b/emacs.el index d5813fd..6a547cc 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 @@ -668,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" @@ -776,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))) 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; }