Mercurial > ec-dotfiles
annotate tcsh @ 35:a8dc309a1b8a
Misc adjusments for vim keys
author | Edho Prima Arief <me@myconan.net> |
---|---|
date | Wed, 30 Mar 2011 23:04:15 +0700 |
parents | 330587be514c |
children | 3a9d39d8805b |
rev | line source |
---|---|
0 | 1 #!/usr/bin/env tcsh |
25
e0b9a89a559d
Support for "before" script.
Edho Prima Arief <me@myconan.net>
parents:
17
diff
changeset
|
2 [ -e "${HOME}/.tcsh_init.before" ] && source "${HOME}/.tcsh_init.before" |
0 | 3 umask 22 |
4 limit coredumpsize 0 | |
5 | |
6 set prompt="[%B%n@%m %~%b]%# " | |
17 | 7 set path=({,/usr}/{bin,sbin} "${HOME}"/{,.ecos.}bin) |
0 | 8 set history=1000 |
9 set savehist=1000 | |
10 set nobeep | |
11 set filec | |
12 | |
13 setenv EDITOR vi | |
14 setenv PAGER less | |
15 setenv BLOCKSIZE K | |
16 setenv LC_COLLATE C | |
17 setenv LANG en_US.UTF-8 | |
18 | |
19 unset autologout | |
20 unset autoexpand | |
21 unset autolist | |
22 unset ignoreeof | |
23 | |
24 unalias \* | |
25 alias h history 25 | |
26 alias j jobs -l | |
27 alias la ls -A | |
28 alias ll ls -lA | |
29 alias ls ls -F | |
30 | |
31 if ($?prompt) then | |
32 set gnuls_opts="--color=auto --group-directories-first -F" | |
33 set iscolor=0 | |
34 switch (${TERM}) | |
35 case xterm*: | |
36 case dtterm: | |
37 case screen*: | |
38 setenv CLICOLOR | |
39 set myhost=`hostname | cut -d '.' -f 1` | |
40 set prompt="[%{\033[0;33m%}%n%{\033[0m%}@%{\033[0;32m%}%m%{\033[0m%} %{\033[1;34m%}%c%{\033[0m%}]%# " | |
41 alias mypwd 'printf "%s\n" "${PWD}" | sed -e "s#^${HOME}#~#"' | |
42 alias precmd 'printf "\033]0;${USER}@${myhost}: %s\007" "`mypwd`"' | |
43 set iscolor=1 | |
44 breaksw | |
45 endsw | |
46 | |
47 if ("$TERM" == "screen") then | |
48 bindkey '\e[1~' beginning-of-line | |
49 bindkey '\e[3~' delete-char | |
50 bindkey '\e[4~' end-of-line | |
51 bindkey '\e[5~' history-search-backward | |
52 bindkey '\e[6~' history-search-forward | |
53 bindkey '\eOD' backward-word | |
54 bindkey '\eOC' forward-word | |
55 bindkey '\e\e[D' backward-word | |
56 bindkey '\e\e[C' forward-word | |
57 endif | |
58 bindkey "^W" backward-delete-word | |
59 bindkey -k up history-search-backward | |
60 bindkey -k down history-search-forward | |
61 endif | |
62 | |
63 switch (`uname -s`) | |
64 case FreeBSD: | |
65 set path=(${path} /usr/local/{bin,sbin}) | |
66 setenv LSCOLORS ExGxFxdxCxegedabagExEx | |
67 alias ls ls -FG | |
68 ( which gnuls ) > /dev/null && alias ls gnuls ${gnuls_opts} | |
69 alias man man -o | |
70 breaksw | |
71 case NetBSD: | |
72 set path=(${path} /usr/pkg/{bin,sbin}) | |
73 breaksw | |
74 case OpenBSD: | |
75 set path=(${path} /usr/local/{bin,sbin}) | |
76 [ "${iscolor}" -eq 1 ] && setenv TERM xterm-256color | |
77 breaksw | |
78 case DragonFly: | |
79 set path=(${path} /usr/pkg/{bin,sbin}) | |
80 setenv LSCOLORS ExGxFxdxCxegedabagExEx | |
81 alias ls ls -FG | |
82 breaksw | |
83 case SunOS: | |
84 set path=(${path} /usr/{gnu,csw,xpg4}/{bin,sbin}) | |
85 [ -x /usr/gnu/bin/ls ] && alias ls /usr/gnu/bin/ls ${gnuls_opts} | |
86 breaksw | |
87 case Linux: | |
88 alias ls ls ${gnuls_opts} | |
89 alias grep grep --color=auto | |
90 breaksw | |
91 endsw | |
92 unset gnuls_opts | |
93 | |
33 | 94 ( which vim ) > /dev/null && alias vi vim && setenv EDITOR vim |
0 | 95 |
25
e0b9a89a559d
Support for "before" script.
Edho Prima Arief <me@myconan.net>
parents:
17
diff
changeset
|
96 [ -e "${HOME}/.tcsh_init.after" ] && source "${HOME}/.tcsh_init.after" |