mathmos
404
- Registriert
- 14 Juli 2013
- Beiträge
- 4.415
Ab und an finde ich es ganz interessant von anderen Nutzen die Konfigurationsdateien zu diversen Programmen zu sehen um eventuell etwas abkupfern zu können. Von daher fange ich mal mit meiner Konfigurationsdatei des Editors nano an.
nano (~/.nanorc)
zsh (~/.zshrc) [ACHTUNG KRAUT UND RÜBEN ALARM]
zsh (~./zsh-additions)
nano (~/.nanorc)
Code:
## Sample initialization file for GNU nano.
##
## Please note that you must have configured nano with --enable-nanorc
## for this file to be read! Also note that this file should not be in
## DOS or Mac format, and that characters specially interpreted by the
## shell should not be escaped here.
##
## To make sure a value is disabled, use "unset <option>".
##
## For the options that take parameters, the default value is given.
## Other options are unset by default.
##
## Quotes inside string parameters don't have to be escaped with
## backslashes. The last double quote in the string will be treated as
## its end. For example, for the "brackets" option, ""')>]}" will match
## ", ', ), >, ], and }.
## Backup files to filename~.
set backup
## The directory to put unique backup files in.
set backupdir "/hom/mathmos/Dokumente/nanobackup"
## Constantly display the cursor position in the statusbar. Note that
## this overrides "quickblank".
set const
## Enable ~/.nano_history for saving and reading search/replace strings.
set historylog
## Don't convert files from DOS/Mac format.
set noconvert
## Fix numeric keypad key confusion problem.
set rebindkeypad
## Make the Home key smarter. When Home is pressed anywhere but at the
## very beginning of non-whitespace characters on a line, the cursor
## will jump to that beginning (either forwards or backwards). If the
## cursor is already at that position, it will jump to the true
## beginning of the line.
set smarthome
## Use smooth scrolling as the default.
set smooth
## Enable soft line wrapping (AKA full line display).
set softwrap
## Allow nano to be suspended.
set suspend
bind ^S research main
## Syntax-Highlightning
## Nanorc files
include "/usr/share/nano/nanorc.nanorc"
## Makefiles
include "/usr/share/nano/makefile.nanorc"
## Cascading Style Sheets
include "/usr/share/nano/css.nanorc"
## HTML
include "/usr/share/nano/html.nanorc"
## PHP
include "/usr/share/nano/php.nanorc"
## TeX
include "/usr/share/nano/tex.nanorc"
## Patch files
include "/usr/share/nano/patch.nanorc"
## Manpages
include "/usr/share/nano/man.nanorc"
## Perl
include "/usr/share/nano/perl.nanorc"
## Python
include "/usr/share/nano/python.nanorc"
## Ruby
include "/usr/share/nano/ruby.nanorc"
## Java
include "/usr/share/nano/java.nanorc"
## Bourne shell scripts
include "/usr/share/nano/sh.nanorc"
## XML-type files
include "/usr/share/nano/xml.nanorc"
zsh (~/.zshrc) [ACHTUNG KRAUT UND RÜBEN ALARM]
Code:
# Neue History-Einträge werden werden sofort nach dem Ausführen des Befehls hinzugefügt. Die History steht allen Anwendern zur Verfügung
setopt INC_APPEND_HISTORY SHARE_HISTORY
# Neue Einträge in der History werden hinzugefügt. Alte werden nicht überschrieben.
setopt APPEND_HISTORY
# Background Jobs bekommen keine niedrigere Priorität
unsetopt BG_NICE
# Korrektur von Befehlen
setopt CORRECT
# Einträge der History werden mit einem Timestamp versehen
setopt EXTENDED_HISTORY
# Erster Treffer der Verzeichnisvervollständigung wird automatisch eingetragen
setopt MENUCOMPLETE
# All parameters subsequently defined are automatically exported
setopt ALL_EXPORT
# Status von Background-Jobs wird sofort angezeigt | Ergebnisse beziehen auch Datein mit einem Punkt am Anfang mit ein |
# Befehle werden korrigiert | mit pushd in Homeverzeichnis | cd in Variablen | Bei Unklarheiten Möglichkeiten auflisten
setopt notify globdots correct pushdtohome cdablevars autolist
# Alle Argumente korrigieren | Ohne cd Verzeichnis wechseln | ? | Job standardmäßig im langen Format ausgeben
setopt correctall autocd recexact longlistjobs
# ? | Keine doppelten aufeinander folgenden Einträge in der History | Der Verzeichnis-Stack wird nicht ausgegeben
setopt autoresume histignoredups pushdsilent
# cd verhält sich wie pushd | ? | Erweiterte Globbing-Funktionen | ? |
setopt autopushd pushdminus extendedglob rcquotes
# Background-Jobs bekommen keine niedrige Priorität | Parameter die einem Verzeichnisnamen entsprechen erhalten einen Slash
unsetopt bgnice autoparamslash
# Module werden geladen, wenn sie genötigt werden
zmodload -a zsh/stat stat
zmodload -a zsh/zpty zpty
zmodload -a zsh/zprof zprof
zmodload -ap zsh/mapfile mapfile
# Zeitzone
TZ="Europe/Berlin"
# History-Datei
HISTFILE=$HOME/.zhistory
# Maximale Einträge in der History
HISTSIZE=1000
# Anzahl der Einträge die beim Verlassen gespeichert werden
SAVEHIST=1000
# Hostname des Rechners
HOSTNAME="Sanctum"
# Befehl der als interner Pager verwendet wird
PAGER='less'
# Editor in zsh
EDITOR='nano'
# Browser in zsh
BROWSER='opera'
# Interface für terminfo Datenbank wird automatisch geladen
autoload zsh/terminfo
# Farbausgabe in zsh
autoload -U colors && colors
# Aufbau und Ausshen des Prompt in zsh
PS1=$'[%{\e[0;33m%}%n%{\e[0m%}|%{\e[1;30m%}%M%{\e[0m%}|%B%d%b]'
RPROMPT="(%D{%d.%m.%y} | %*)"
# Spracheinstellungen zsh
LC_ALL='de_DE.UTF-8'
LANG='de_DE.UTF-8'
LC_CTYPE='de_DE.UTF-8'
# Umgebungsvariable $Path
export PATH=$PATH:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin:/home/mathmos/Dokumente/shellscripte:
unsetopt ALL_EXPORT
#if [[ $HOSTNAME == "Sanctum" ]] {
# alias emacs='emacs -l ~/.emacs.Sanctum'
#}
# alias =clear
#chpwd() {
# [[ -t 1 ]] || return
# case $TERM in
# sun-cmd) print -Pn "\e]l%~\e\\"
# ;;
# *xterm*|screen|rxvt|(dt|k|E)term) print -Pn "\e]2;%~\a"
# ;;
# esac
#}
#chpwd
autoload -U compinit
compinit
bindkey '^[[3~' delete-char
bindkey '^Y' backward-delete-word
bindkey '^[[8~' end-of-line
bindkey '^[[4~' end-of-line
bindkey '^[[1~' beginning-of-line
bindkey '^[[7~' beginning-of-line
bindkey '^[[5~' backward-word
bindkey '^[[6~' forward-word
bindkey '^[[2~' overwrite-mode
bindkey '^[1' undo
bindkey '^[2' redo
bindkey '^[b' beep
bindkey '^[c' transpose-words
bindkey '^[y' transpose-chars
bindkey '^[[a' up-history
bindkey '^[[b' down-history
bindkey '^[s' copy-prev-shell-word
bindkey "^[d" backward-delete-word
zstyle ':completion::complete:*' use-cache on
zstyle ':completion::complete:*' cache-path ~/.zsh/cache/$HOST
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*' list-prompt '%SAt %p: Hit TAB for more, or the character to insert%s'
zstyle ':completion:*' menu select=1 _complete _ignored _approximate
zstyle -e ':completion:*:approximate:*' max-errors \
'reply=( $(( ($#PREFIX+$#SUFFIX)/2 )) numeric )'
zstyle ':completion:*' select-prompt '%SScrolling active: current selection at %p%s'
# Completion Styles
# list of completers to use
zstyle ':completion:*::::' completer _expand _complete _ignored _approximate
# allow one error for every three characters typed in approximate completer
zstyle -e ':completion:*:approximate:*' max-errors \
'reply=( $(( ($#PREFIX+$#SUFFIX)/2 )) numeric )'
# insert all expansions for expand completer
zstyle ':completion:*:expand:*' tag-order all-expansions
# formatting and messages
zstyle ':completion:*' verbose yes
zstyle ':completion:*:descriptions' format '%B%d%b'
zstyle ':completion:*:messages' format '%d'
zstyle ':completion:*:warnings' format 'No matches for: %d'
zstyle ':completion:*:corrections' format '%B%d (errors: %e)%b'
zstyle ':completion:*' group-name ''
# match uppercase from lowercase
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}'
# offer indexes before parameters in subscripts
zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters
# command for process lists, the local web server details and host completion
# on processes completion complete all user processes
# zstyle ':completion:*:processes' command 'ps -au$USER'
## add colors to processes for kill completion
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
#zstyle ':completion:*:processes' command 'ps ax -o pid,s,nice,stime,args | sed "/ps/d"'
zstyle ':completion:*:*:kill:*:processes' command 'ps --forest -A -o pid,user,cmd'
zstyle ':completion:*:processes-names' command 'ps axho command'
#zstyle ':completion:*:urls' local 'www' '/var/www/htdocs' 'public_html'
#
#NEW completion:
# 1. All /etc/hosts hostnames are in autocomplete
# 2. If you have a comment in /etc/hosts like #%foobar.domain,
# then foobar.domain will show up in autocomplete!
zstyle ':completion:*' hosts $(awk '/^[^#]/ {print $2 $3" "$4" "$5}' /etc/hosts | grep -v ip6- && grep "^#%" /etc/hosts | awk -F% '{print $2}') # Filename suffixes to ignore during completion (except after rm command)
zstyle ':completion:*:*:(^rm):*:*files' ignored-patterns '*?.o' '*?.c~' \
'*?.old' '*?.pro'
# the same for old style completion
#fignore=(.o .c~ .old .pro)
# ignore completion functions (until the _ignored completer)
zstyle ':completion:*:functions' ignored-patterns '_*'
zstyle ':completion:*:*:*:users' ignored-patterns \
adm apache bin daemon games gdm halt ident junkbust lp mail mailnull \
named news nfsnobody nobody nscd ntp operator pcap postgres radvd \
rpc rpcuser rpm shutdown squid sshd sync uucp vcsa xfs avahi-autoipd\
avahi backup messagebus beagleindex debian-tor dhcp dnsmasq fetchmail\
firebird gnats haldaemon hplip irc klog list man cupsys postfix\
proxy syslog www-data mldonkey sys snort
# SSH Completion
zstyle ':completion:*:scp:*' tag-order \
files users 'hosts:-host hosts:-domain:domain hosts:-ipaddr"IP\ Address *'
zstyle ':completion:*:scp:*' group-order \
files all-files users hosts-domain hosts-host hosts-ipaddr
zstyle ':completion:*:ssh:*' tag-order \
users 'hosts:-host hosts:-domain:domain hosts:-ipaddr"IP\ Address *'
zstyle ':completion:*:ssh:*' group-order \
hosts-domain hosts-host users hosts-ipaddr
zstyle '*' single-ignored show
##Additions to zshrc
if [ -f ~/.zshrc-additions ]; then
. ~/.zshrc-additions
fi
##THIS MAKES YAOURT WORK, DON'T TAKE IT OUT!
##export color=
export MANWIDTH=${MANWIDTH:-80}
## log out? set timeout in seconds...
## ...and do not log out in some specific terminals:
if [[ "${TERM}" == ([Exa]term*|rxvt|dtterm|screen*) ]] ; then
unset TMOUT
else
TMOUT=1800
fi
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
zsh (~./zsh-additions)
Code:
##Helpful Arch Linux Aliases
alias aurup='packer -Syu --auronly'
##Other aliases
alias su='su -'
alias untarbz2='tar -xvjf'
alias untargz='tar -xvzf'
alias listbz2='tar -tjf'
alias listgz='tar -tzf'
alias edit-cli='$CLIEDITOR'
alias suedit-cli='sudo $CLIEDITOR'
alias edit='$GUIEDITOR'
alias suedit='gksu $GUIEDITOR
alias start-timidity='timidity -iA -B2,8 -Oj -s 44100'
#alias upesvn='_CURRENTDIR=`pwd` && cd ~/ecvs/esvn/ && svn update && cd ~/ecvs/esvn-backup/ && svn update && cd $_CURRENTDIR' # Saves your current directory, changes to e17's svn directory, as well as the backup directory, and updates both, then goes back to your current directory
#alias gotoesvn='cd ~/ecvs/esvn/trunk/' # Changes to E17's svn trunk folder
#alias mknewe17theme='_CURRENTDIR=`pwd` && cd ~/ecvs/esvn/trunk/THEMES/b_and_w/ && edje_cc theme.edc new_e17.edj && cp new_e17.edj ~/.e/e/themes && enlightenment_remote -restart && cd $_CURRENTDIR' # Updates the new e17 theme and then changes back to the working directory
# copy with a progress bar.
alias cpv="rsync -poghb --backup-dir=/tmp/rsync -e /dev/null --progress --"
update='pacman -Syu'
##Environment variables
export CLIEDITOR=nano
export GUIEDITOR=gedit
##Commands to run at start
##cowsay `fortune`
Zuletzt bearbeitet: