Initial import

This commit is contained in:
Andrea Mistrali 2008-10-09 16:15:16 +00:00
parent b68c98a6f5
commit 2475eced60
13 changed files with 814 additions and 0 deletions

70
Emacs/AquaMacs.pref.el Normal file
View File

@ -0,0 +1,70 @@
;-*- coding: latin-1 -*-
;Copyright (c)2008 CUBE S.p.A.
;
; Author: Andrea Mistrali <andre@cubeholding.com>
; Description: Aquamacs Setup file
;
; $Id: AquaMacs.pref.el,v 1.6 2008-10-09 12:55:23 andre Exp $
;; -----------------------------
;; Aquamacs ONLY customizations
;; -----------------------------
(defvar aquamacs-p (string-match "Aquamacs" (version))) ;; are we on Aquamacs?
;; Se stiamo usando acquamacs
(when (featurep 'aquamacs)
;; default window dimensions
(setq default_height 55)
(setq default_width 120)
;; non gestire il posizionamento dei frame
(smart-frame-positioning-mode t)
;; set size of main window
(set-frame-height (selected-frame) default_height);; set size of main window
(set-frame-width (selected-frame) default_width)
;; ;; Apre un nuovo frame con il buffer *Scratch*
;; (defun my-new-frame-with-new-scratch ()
;; "Open a new window with default height and width"
;; (interactive)
;; (let ((one-buffer-one-frame t))
;; (make-frame `((width . ,default_width)
;; (height . ,default_height)))))
(defun my-new-frame-with-new-scratch ()
(interactive)
(let ((one-buffer-one-frame t))
(new-frame-with-new-scratch))
(set-frame-height (selected-frame) default_height);; set size of main window
(set-frame-width (selected-frame) default_width))
;; Chiudiamo salvando
(one-buffer-one-frame-mode 0)
(defun my-close-current-window-asktosave ()
(interactive)
(let ((one-buffer-one-frame t))
(close-current-window-asktosave)))
;; in Dired usiamo il comando open
(defun dired-open-mac ()
"Uses open command in dired mode"
(interactive)
(let (( file-name (dired-get-file-for-visit)))
(if (file-exists-p file-name)
(call-process "/usr/bin/open" nil 0 nil file-name))))
;; OSX Keybindings
(define-key osx-key-mode-map (kbd "<home>") 'beginning-of-line)
(define-key osx-key-mode-map (kbd "<end>") 'end-of-line)
;; Mela-N per aprire una nuova finestra
(define-key osx-key-mode-map (kbd "A-n") 'my-new-frame-with-new-scratch)
;; Mela-W per chiudere salvando
(define-key osx-key-mode-map (kbd "A-W") 'my-close-current-window-asktosave)
(define-key osx-key-mode-map (kbd "A-w") 'kill-this-buffer)
(define-key osx-key-mode-map (kbd "A-j") 'join-line)
;; o in dired per aprire con l'applicazione di default
(define-key dired-mode-map "o" 'dired-open-mac)
)

293
Emacs/Preferences.el Normal file
View File

@ -0,0 +1,293 @@
;;
;; Copyright (c)2007 CUBE S.p.A.
;;
;; Author: Andrea Mistrali <andre@cubeholding.com>
;; Description: Emacs Startup script
;;
;;
;;
;; This file should go in ~/Library/Preferences/Emacs on OSX and
;; in .emacs on Unix/Linux
;; Definiamo i path di ricerca di moduli e librerie
;;(ignore-errors
(add-to-list 'load-path "~/.emacs.d/")
(add-to-list 'load-path "/sw/share/emacs/site-lisp/")
(add-to-list 'load-path "/usr/local/share/emacs/site-lisp/")
(add-to-list 'load-path "/usr/share/emacs/site-lisp")
;;(add-to-list 'load-path "/usr/share/emacs/21.2/lisp"))
;; Carichiamo i moduli che ci servono subito
(require 'dired)
(require 'autoinsert)
(require 'hippie-exp)
(require 'tramp)
(require 'saveplace)
;; (require 'desktop)
;; (setq-default save-place t)
;; (setq-default desktop-read t)
;; (desktop-save-mode 1)
;; global variables
(setq organization "CUBE S.p.A.")
(setq user-mail-address "andre@cubeholding.com")
(setq-default frame-title-format
(list (format "%s %%S: %%j " (system-name))
'(buffer-file-name "%f" (dired-directory dired-directory "%b"))))
(setq column-number-mode t)
(setq european-calendar-style t)
(setq calendar-week-start-day 1)
(toggle-text-mode-auto-fill)1
(line-number-mode t)
(setq transient-mark-mode t)
(setq kill-whole-line t)
(display-time) ;; in global prefs
(setq-default indent-tabs-mode nil)
(setq-default default-tab-width 2)
(global-font-lock-mode t)
(setq font-lock-maximum-decoration t)
(setq-default blink-match-paren t)
;; KEY BINDINGS
;; All version bindings
(global-set-key (kbd "C-x C-g") 'goto-line)
(global-set-key (kbd "C-x g") 'goto-line)
(global-set-key (kbd "C-c ;") 'comment-or-uncomment-region-or-line)
;; This is better than normal behavior
(global-set-key (kbd "C-x C-b") 'electric-buffer-list)
(global-set-key (kbd "<f6>") 'other-window)
(global-set-key (kbd "<S-f6>") 'delete-other-windows) ; remove the other windows
(global-set-key (kbd "<C-f6>") 'delete-window) ; remove the selected window
(global-set-key (kbd "<S-f8>") 'split-window-horizontally)
(global-set-key (kbd "<f8>") 'split-window-vertically)
(global-set-key (kbd "C-x SPC") 'toggle-showtabs)
(global-set-key (kbd "<C-f12>") 'eshell) ;; <f12> conflicts with Dashboard
(global-set-key (kbd "<S-C-f12>") 'term) ;; <f12> conflicts with Dashboard
(global-set-key [(meta right)] 'forward-word)
(global-set-key [(meta left)] 'backward-word)
;; Italian Keyboard on Mac OS X
(global-set-key (kbd "M-\230") "@")
(global-set-key (kbd "M-\223") "~")
(global-set-key (kbd "M-\210") "#")
(global-set-key (kbd "M-ò") "@")
(global-set-key (kbd "M-à") "#")
(global-set-key (kbd "M-ì") "~")
(global-set-key (kbd "M-è") "[")
(global-set-key (kbd "M-+") "]")
(global-set-key (kbd "M-é") "{")
(global-set-key (kbd "S-M-+") "}")
(global-set-key (kbd "M-\\") "`")
;;;;;;;;;;;;
;; hippie
;;;;;;;;;;;;
(setq hippie-expand-try-functions-list
'(
;; try-complete-tempo-tag
try-expand-dabbrev
try-expand-dabbrev-all-buffers
try-expand-dabbrev-from-kill
try-complete-file-name-partially
try-complete-file-name
try-expand-list
try-complete-lisp-symbol-partially
try-complete-lisp-symbol
try-expand-whole-kill))
;; the expand-function. Called with a positive prefix <P> it jumpes direct
;; to the <P>-th try-function.
(defun my-hippie-expand (arg)
(interactive "P")
;; hippie-expand does not have a customization-feature (like
;; dabbrev-expand) to search case-sensitive for completions.
;; So we must set 'case-fold-search' temp. to nil!
(let ((old-case-fold-search case-fold-search))
(setq case-fold-search nil)
(hippie-expand arg)
(setq case-fold-search old-case-fold-search)
)
)
;; all expansion is done by 'my-hippie-expand bound to C-TAB!
(global-set-key (kbd "<C-tab>") 'my-hippie-expand)
;;;;;;;;;;;
;; TRAMP
;;;;;;;;;;;
(setq tramp-shell-prompt-pattern "[#$%>] *")
(setq tramp-default-method "ssh")
;; Some useful functions
(defun ascii-table ()
"Print the ascii table. Based on a defun by Alex Schroeder <asc@bsiag.com>"
(interactive)
(switch-to-buffer "*ASCII*")
(erase-buffer)
(insert (format "ASCII characters up to number %d.\n\n" 254))
(let ((i 0))
(while (< i 254)
(setq i (+ i 1))
(insert (format "%4d %c\n" i i)))) (beginning-of-buffer))
;; emulate set list in vi
(defvar *showtabs* nil)
(defun toggle-showtabs ()
"toggle the display of tabs and newlines"
(interactive)
(setq *showtabs* (not *showtabs*))
(let ((disptab (make-display-table)))
(let ((i 0))
(while (< i 32)
(or (= i ?\t) (= i ?\n)
(aset disptab i (vector ?^ (+ i 64))))
(setq i (1+ i))))
(when *showtabs*
(aset disptab 127 (vector ?^ ??))
(aset disptab ?\t (vector ?- ?>))
(aset disptab ?\n (vector ?$ ?\n)))
(set-window-display-table (selected-window) disptab)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Auto Insert - Template add-on
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(add-hook 'find-file-hooks 'auto-insert)
(define-skeleton insert-cvs-tags ;; insert CVS ID Tag
"insert the CVS tags"
nil
comment-start " $Id$" comment-end)
(define-skeleton insert-gpl-disclaimer ;; insert GPL header
"insert GPL disclaimer"
nil
comment-start "This file is free software; you can redistribute it and/or modify" comment-end \n
comment-start "it under the terms of the GNU General Public License as published by" comment-end \n
comment-start "the Free Software Foundation; either version 2, or (at your option)" comment-end \n
comment-start "any later version." comment-end \n \n
comment-start "This file is distributed in the hope that it will be useful," comment-end \n
comment-start "but WITHOUT ANY WARRANTY; without even the implied warranty of" comment-end \n
comment-start "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the" comment-end \n
comment-start "GNU General Public License for more details." comment-end \n \n
comment-start "You should have received a copy of the GNU General Public License" comment-end \n
comment-start "along with this software; see the file COPYING. If not, write to" comment-end \n
comment-start "the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor," comment-end \n
comment-start "Boston, MA 02110-1301, USA." comment-end \n \n
)
(define-skeleton insert-standard-header
"insert a standard header in all programs"
"Purpose or description:"
comment-start "-*- coding: latin-1 -*-" comment-end \n
comment-start (concat "Copyright (c)" (substring (current-time-string) -4)
" " organization " ") comment-end \n
comment-start " " comment-end \n
comment-start " Author: " (user-full-name) " <" user-mail-address "> " comment-end \n
comment-start " Description: "
str
comment-end \n
comment-start comment-end \n
'(insert-cvs-tags)' "" \n
comment-start " " comment-end \n \n)
;; Python Mode
(define-skeleton insert-python-header
"inserts a Python header"
nil
"#!/usr/bin/env python" \n
'(insert-standard-header)' "" \n \n
"__version__=\"$Revision: 1.5 $\"[11:-2]" \n \n
"")
(defun my-python-mode-settings ()
"My Python programming mode settings."
(interactive)
(setq indent-tabs-mode nil)
(local-set-key (kbd "<f4>") 'insert-python-header)
(local-set-key (kbd "<M-up>") 'beginning-of-python-def-or-class)
(local-set-key (kbd "<M-down>") 'end-of-python-def-or-class))
(when (locate-library "python-mode")
(add-hook 'python-mode-hook 'my-python-mode-settings)
(add-to-list 'auto-mode-alist '("\\.py$" . python-mode))
(autoload 'python-mode "python-mode"))
(custom-set-variables
'(python-python-command "/usr/local/bin/python2.5")
)
;; CPerl Mode
(setq auto-mode-alist
(append '(("\\.\\([pP][Llm]\\|al\\)$" . cperl-mode)) auto-mode-alist ))
(setq interpreter-mode-alist (append interpreter-mode-alist
'(("miniperl" . perl-mode))))
(setq cperl-electric-parens t)
(setq cperl-electric-keywords t)
(setq cperl-electric-brace t)
(setq cperl-electric-backspace t)
(setq cperl-auto-newline-after-colon t)
(setq cperl-auto-newline t)
(define-skeleton insert-perl-header
"inserts a Perl header"
"Purpose of script: "
"#!/usr/bin/perl" \n
'(insert-standard-header)' "" \n \n
)
;;run the current perl program
(defun run-perl ()
(interactive "*")
(setq perl-buffer-name buffer-file-name)
(shell)
(setq perl-run-command "perl ")
(insert perl-run-command)
(insert perl-buffer-name)
)
;; debug the current perl program
(defun debug-perl ()
(interactive "*")
(setq perl-buffer-name buffer-file-name)
(shell)
(setq perl-run-command "perl -d ")
(insert perl-run-command)
(insert perl-buffer-name)
)
(dolist (insertion '((("\\.py\\'" . "Python file") . insert-python-header)
(("\\.pl\\'" . "Perl header") . insert-perl-header)))
(add-to-list 'auto-insert-alist insertion))
;;;;;;;;;;
;; GNUS
;;;;;;;;;;
(setq gnus-select-method '(nntp "news.fastwebnet.it"))

46
environment Normal file
View File

@ -0,0 +1,46 @@
# -*- coding: latin-1 -*-
# Copyright (c)2008 CUBE S.p.A.
#
# Author: Andrea Mistrali <andre@cubeholding.com>
# Description: Environment variables definition
#
# $Id: environment,v 1.6 2008-10-09 12:55:23 andre Exp $
LESS="-c -x2 -R -MM -PMFile\:?f%f:STDIN. Size\:?B%B:Unknown. Pos\:?pb%pb\%:Unknown. File No.\:%i/%m"
LANG=it_IT@euro
LESSCHARSET=latin1
SAVEHIST=500
HISTFILE=~/.history
HISTSIZE=10000
READNULLCMD=/usr/bin/less
PAGER=/usr/bin/less
MPAGE="-2 -f -P -bA4"
PS1="%B%m:%n:%~ %#%b "
PATH="/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/sbin:/usr/sbin:$HOME/bin:."
LOGCHECK=30
LOGD=/var/log
REPORTTIME=15
WATCH=notme
WATCHFMT="%n %a %l (%m) at %t."
PYTHONSTARTUP=~/.pythonrc.py
MIBS=all
MINICOM="-c on"
#export CVSROOT=":pserver:anonymous@anoncvs.opendarwin.org:/Volumes/src/cvs/od"
#export CVSROOT=":pserver:andre@lorien:/var/lib/cvs"
CVSROOT=":pserver:cvs:/var/lib/cvs"
EDITOR="vi"
# Distcc configuration
MAKEFLAGS=CC=distcc
DISTCC_HOSTS="localhost @zeus"
PATH="/usr/local/distcc/bin:$PATH"
CONCURRENCY_LEVEL=10
MAKEFLAGS="CC=distcc"

27
vim/gvimrc Normal file
View File

@ -0,0 +1,27 @@
set guifont=Monaco:h12
"set guifont=ProFontWindows:h9
set anti
set lines=50
"set lines=70
set columns=132
set nomousefocus
set ruler
set errorbells
set visualbell
set foldmethod=expr
if exists('&macatsui')
set nomacatsui
endif
"colorscheme zenburn
"colorscheme freya
colorscheme moria
" Let's do Ctrl-W work as expected, Gvim thinks we use a QZERTY Keyboard
nnoremap <silent> <C-Z> <C-W>
nnoremap <silent> <D-+> :call Zoom()<CR>
nnoremap <silent> <C-S> :set list!<CR>

33
vim/myfunx.vim Normal file
View File

@ -0,0 +1,33 @@
" Converts a file to PDF and display it (only on OS X)
function! ToPDF()
"define PS file name
let psname= "/tmp/" . expand("%:t:r") . ".ps"
"save colorscheme name
let g:colorname=g:colors_name
execute "write"
execute "colorscheme default"
execute "hardcopy > " . l:psname
execute "silent !launch -w " . l:psname
execute "silent !rm " . l:psname
execute "colorscheme" g:colorname
redraw!
endfunction
" Set up menu for the function
an 10.520 &File.-SEP3- <Nop>
an 10.530 &File.&ToPDF :call ToPDF()<CR>
vunmenu &File.&ToPDF
vnoremenu &File.&ToPDF :call ToPDF()<CR>
" Zoom in/out of gvim
function! Zoom()
if has("gui_running")
if &guifont =~ 'Monaco:h12'
set guifont=Monaco:h9
set lines=70
else
set guifont=Monaco:h12
set lines=50
endif
endif
endfunction

55
vim/skeleton.vim Normal file
View File

@ -0,0 +1,55 @@
" TEMPLATE SYSTEM FOR VIM
"
" Preserve template files
augroup newfiles
" First we load templates for the file type
autocmd BufNewFile * ks|call OpenFile()|'s
" Update of "Last Modified" date on writing
autocmd BufWritePre,FileWritePre * ks|call LastMod()|'s
" Protect templates, removing write commands
autocmd BufRead,BufNewFile ~/.vim/templates/* au! newfiles
" Reload .vimrc, after modifications
autocmd BufWritePost ~/.vimrc so ~/.vimrc
if has("gui_running")
autocmd BufWritePost ~/.gvimrc so ~/.gvimrc
endif
" Set up python support
au FileType python source ~/.vim/addon/python.vim
augroup END
" Function to modify "Last Modified" date. Works on first 10 lines
function! LastMod()
if line("$") > 20
let l = 20
else
let l = line("$")
endif
execute "1," . l . "g/Last modified: /s/Last modified: .*/Last modified: " .
\ strftime("%d:%b:%Y %H:%M")
endfunction
" Function to open a file and set some defaults
function! OpenFile()
let s:filename=expand("<afile>")
let l:ext=fnamemodify(s:filename, ":e")
let l:skel = "~/.vim/templates/skeleton.".l:ext
if filereadable(fnamemodify(l:skel,":p"))
execute "0r" l:skel
let s:syn=input("Synopsis: ")
if line("$") > 20
let l = 20
else
let l = line("$")
endif
execute "1," . l . "g/First version: /s/First version: .*/First version: ".
\ strftime("%d:%b:%Y %H:%M")
execute "1," . l . "g/Synopsis: /s/Synopsis: .*/Synopsis: ".
\ s:syn
endif
endfunction

19
vim/templates/skeleton.c Normal file
View File

@ -0,0 +1,19 @@
/*
-*- coding: latin-1 -*-
Copyright by Andrea Mistrali <am@am.cx>.
First version: <crdate>
Last modified: 06:Apr:2007 10:55
Synopsis: <description>
$Id: skeleton.c,v 1.2 2007-04-06 08:56:27 andre Exp $
*/
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
return 0
}

10
vim/templates/skeleton.pl Normal file
View File

@ -0,0 +1,10 @@
#!/usr/bin/env perl
# -*- coding: latin-1 -*-
# Copyright by Andrea Mistrali <am@am.cx>.
# First version: <crdate>
# Last modified: 06:Apr:2007 10:55
#
# Synopsis: <description>
#
# $Id: skeleton.pl,v 1.2 2007-04-06 08:56:27 andre Exp $

25
vim/templates/skeleton.py Normal file
View File

@ -0,0 +1,25 @@
#!/usr/bin/env python
#-*- coding: latin-1 -*-
"""
Copyright by Andrea Mistrali <am@am.cx>.
First version: <crdate>
Last modified: 06:Apr:2007 10:56
Synopsis: <description>
$Id: skeleton.py,v 1.2 2007-04-06 08:56:27 andre Exp $
"""
__version__ ='0.1'
__author__ ='Andrea Mistrali <am@am.cx>'
def main():
pass
# If we have been called as 'python <script>' let's call main function
if __name__ == "__main__":
main()

10
vim/templates/skeleton.sh Normal file
View File

@ -0,0 +1,10 @@
#!/bin/sh
# -*- coding: latin-1 -*-
# Copyright by Andrea Mistrali <am@am.cx>.
# First version: <crdate>
# Last modified: 06:Apr:2007 10:56
#
# Synopsis: <description>
#
# $Id: skeleton.sh,v 1.2 2007-04-06 08:56:27 andre Exp $

92
vim/vimrc Normal file
View File

@ -0,0 +1,92 @@
set nocompatible " Use Vim defaults (much better!)
set backspace=indent,eol,start " allow backspacing over everything
set noautoindent
set textwidth=78
set backup
set viminfo='20,\"50,f10
set history=50
set nohlsearch
set ruler
set cmdheight=1
set laststatus=2
set shiftwidth=2
set foldcolumn=1
" tab management
set tabstop=4
set softtabstop=4
set expandtab
set background=dark
"set title Uncomment with new version of iTerm
set title
set browsedir=current
set cpoptions=aAcF$
set modeline
set modelines=1
set encoding=iso-8859-1
set listchars=tab:->,trail:.,eol:$
"set paste
set smartcase
set errorbells
"set visualbell
set showcmd " Show (partial) command in status line.
set showmatch " Show matching brackets.
"set ignorecase " Do case insensitive matching
set incsearch " Incremental search
set autowrite " Automatically save before commands like :next and :make
set statusline=%<%f\ %H%m%r%=%-14.(%l,%c%)\ %P\ Buf.%n
set backupcopy=yes
set fileformats=unix,mac,dos
set fileformat=unix
" COMPLETION
"set completeopt=longest,menuone
"set completeopt=longest,menuone,preview
inoremap <expr> <cr> pumvisible() ? "<c-y>" : "<c-g>u<cr>"
inoremap <expr> <c-n> pumvisible() ? "<c-n>" : "<c-n><c-r>=pumvisible() ? "<down>" : "<cr>"
inoremap <expr> <m-;> pumvisible() ? "<c-n>" : "<c-x><c-o><c-n><c-p><c-r>=pumvisible() ? "<down>" : "<cr>"
"
set mouse=a
" Suffixes that get lower priority when doing tab completion for filenames.
"" These are files we are not likely to want to edit or read.
set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc
colorscheme torte
" TagLIST support
let Tlist_Ctags_Cmd="ctags"
"let Tlist_Use_Right_Window = 0
"let Tlist_Display_Prototype = 1
let Tlist_Exit_OnlyWindow = 1
"let Tlist_Compact_Format = 1
let Tlist_File_Fold_Auto_Close = 1
"let Tlist_Use_SingleClick = 0 "Do not use yet
" Map keys to functions
nnoremap <silent> <F8> :Tlist<CR>
nnoremap <silent> ,l :set list!<CR>
" Vim5 comes with syntaxhighlighting. If you want to enable syntaxhightlighting
" by default uncomment the next three lines.
if has("syntax")
syntax on " Default to no syntax highlightning
endif
if has("autocmd")
filetype plugin indent on
filetype plugin on
endif " has ("autocmd")
" Let's go to where we left
if has("autocmd")
" When editing a file, always jump to the last cursor position
autocmd BufReadPost *
\ if line("'\"") > 0 && line ("'\"") <= line("$") |
\ exe "normal g'\"" |
\ endif
endif

61
zshenv Normal file
View File

@ -0,0 +1,61 @@
# -*- coding: latin-1 -*-
# Copyright (c)2008 CUBE S.p.A.
#
# Author: Andrea Mistrali <andre@cubeholding.com>
# Description: Zsh Environment setup
#
# $Id: zshenv,v 1.8 2008-10-09 12:55:23 andre Exp $
. /etc/environment
umask 022
function cdb {
DIR=`dirname $1`
cd $DIR
unset DIR
}
function onAll {
pdsh -a $* | dshbak -c
}
alias ls='ls -F --color'
alias la='ls -A'
alias ll='ls -l'
alias lla='la -l'
alias dir='ls -l'
alias cls='/usr/bin/clear'
#alias cp='cp -v'
#alias mv='mv -v'
#alias rm='rm -v'
alias killall='killall -v'
alias skill=killall
alias dc=cd
alias les=less
alias mkdir='mkdir -p'
alias zap='rm -rf'
alias ftail='tail -f'
alias grep='grep --colour'
alias ns='host -t ns'
alias mx='host -t mx'
alias soa='host -t soa'
alias ptr='host -t ptr'
alias vi=vim
# Start autocoplete
autoload -U compinit; compinit
if [ `uname -s` = "Darwin" ]; then
# Alias for editors on OSX
alias vim='/Applications/Vim.app/Contents/MacOS/Vim'
alias aquamacs='open -a Aquamacs\ Emacs'
alias ldd='otool -L'
alias ls='ls -F -G'
fi

73
zshrc Normal file
View File

@ -0,0 +1,73 @@
# /etc/zshrc: system-wide .zshrc file for zsh(1).
#
# This file is sourced only for interactive shells. It
# should contain commands to set up aliases, functions,
# options, key bindings, etc.
#
# Global Order: zshenv, zprofile, zshrc, zlogin
setopt ALWAYS_TO_END
setopt APPEND_HISTORY
setopt AUTO_CD
setopt AUTO_MENU
setopt AUTONAMEDIRS
setopt AUTO_PARAM_SLASH
setopt AUTO_REMOVE_SLASH
setopt AUTO_RESUME
#setopt CDABLE_VARS
setopt CORRECT
setopt FUNCTION_ARGZERO
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_NO_STORE
setopt HIST_REDUCE_BLANKS
setopt LIST_TYPES
setopt LONG_LIST_JOBS
setopt MENU_COMPLETE
setopt NO_AUTOLIST
setopt NO_AUTOLIST
setopt NO_BEEP
setopt NOHUP
setopt NOTIFY
setopt PATH_DIRS
setopt SHORT_LOOPS
compctl -g "*(-/)" + -g ".*(-/)" cd
bindkey "-e"
bindkey "\e[1~" beginning-of-line
bindkey "\e[4~" end-of-line
bindkey "\e[3~" delete-char
#bindkey "\e[2~" overwrite-mode
#bindkey "\e[A" history-beginning-search-backward
#bindkey "\e[B" history-beginning-search-forward
bindkey "\eOA" history-search-backward
bindkey "\eOB" history-search-forward
bindkey "\e[A" history-search-backward
bindkey "\e[B" history-search-forward
##bindkey "Od" backward-word
##bindkey "Oc" forward-word
##bindkey "\eOd" backward-word
##bindkey "\eOc" forward-word
bindkey "\e[5D" backward-word
bindkey "\e[5C" forward-word
bindkey "" vi-backward-kill-word
ulimit -c 0
# PROMPT
if [ ${TERM} = "xterm-color" ] || [ ${TERM} = "rxvt" ] || [ ${TERM} = "xterm-new" ]; then
# We are on xterminal
PS1="%{]2;%n@%m:%.%}%{]1; %m:%. %}%B<%l> %~ %#%b "
else
# We are not on xterminal
PS1="%B[%l] %n@%m:%~ %#%b "
fi
if [ `uname -s` = "Linux" ]; then
eval `dircolors`
eval `lesspipe`
fi
if [ `uname -s` = "Darwin" ]; then
export LSCOLORS="GxgxcxdxCxegedabagacad"
fi