feat(zsh_history), add(etc/skel)
This commit is contained in:
parent
7935d87e7d
commit
dc9200e7c9
5
etc/skel/.bash_profile
Normal file
5
etc/skel/.bash_profile
Normal file
@ -0,0 +1,5 @@
|
||||
#
|
||||
# ~/.bash_profile
|
||||
#
|
||||
|
||||
[[ -f ~/.bashrc ]] && . ~/.bashrc
|
||||
84
etc/skel/.bashrc
Normal file
84
etc/skel/.bashrc
Normal file
@ -0,0 +1,84 @@
|
||||
|
||||
if [ -x "$(which dircolors)" ]; then
|
||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||
|
||||
alias dir='dir --color=auto'
|
||||
alias vdir='vdir --color=auto'
|
||||
alias grep='grep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
|
||||
alias ls='ls --color=auto'
|
||||
fi
|
||||
|
||||
# these aliases use the "ls" alias, which was defined earlier
|
||||
alias l.='ls -AF --ignore="*"'
|
||||
alias ll='ls -lhF'
|
||||
alias la='ls -AF'
|
||||
|
||||
alias lt='du -sh * | sort -h'
|
||||
|
||||
alias rm='rm -r'
|
||||
alias mkdir='mkdir -pv'
|
||||
|
||||
alias cd..='cd ..'
|
||||
alias ..='cd ..'
|
||||
alias ...='cd ../..'
|
||||
alias .3='cd ../../..'
|
||||
|
||||
alias path='echo -e ${PATH//:/\\n}'
|
||||
|
||||
# shorts
|
||||
alias c='clear'
|
||||
alias q='exit'
|
||||
alias h='history | less'
|
||||
alias j='jobs -l'
|
||||
alias hg='history|grep'
|
||||
|
||||
# utils
|
||||
alias sha='shasum -a 256'
|
||||
alias getpass="openssl rand -base64 12"
|
||||
alias diff='colordiff'
|
||||
alias mount='mount | column -t'
|
||||
alias upgrade_all='sudo apt update && sudo apt upgrade'
|
||||
alias tar-it='tar -czf "../${PWD##*/}.tar.gz" .'
|
||||
|
||||
|
||||
# time
|
||||
alias now='date +"%T"'
|
||||
alias nowdate='date +"%d-%m-%Y"'
|
||||
|
||||
# vim
|
||||
alias vi=vim
|
||||
alias svi="sudo -E vim"
|
||||
alias vis='vim "+set si"'
|
||||
alias edit=vim
|
||||
|
||||
# net
|
||||
alias ports='netstat -tulanp'
|
||||
alias wget='wget -c'
|
||||
alias ping='ping -c 5'
|
||||
alias myip='curl ipinfo.io/ip'
|
||||
|
||||
# starts web server
|
||||
alias www='python3 -m http.server 8000'
|
||||
|
||||
# hard
|
||||
alias reboot='sudo /sbin/reboot'
|
||||
alias poweroff='sudo /sbin/poweroff'
|
||||
alias halt='sudo /sbin/halt'
|
||||
alias shutdown='sudo /sbin/shutdown'
|
||||
|
||||
alias meminfo='free -mlth'
|
||||
alias psmem='ps auxf | sort -nr -k 4 | less -R'
|
||||
alias wake="echo $'\a'" # command; wake &
|
||||
|
||||
alias music='mplayer -shuffle ~/Music/*'
|
||||
|
||||
|
||||
# initializes first ./*/*/activate
|
||||
alias ve='python3 -m virtualenv venv && . venv/bin/activate'
|
||||
alias vd='deactivate'
|
||||
|
||||
|
||||
PS1="\n┌──(\u@\H)-[\w]\n└─\$ "
|
||||
55
etc/skel/.vimrc
Normal file
55
etc/skel/.vimrc
Normal file
@ -0,0 +1,55 @@
|
||||
set number "номер строки
|
||||
set ruler
|
||||
set laststatus=2
|
||||
set encoding=utf-8 "Ставит кодировку UTF-8
|
||||
set nocompatible "Отключает обратную совместимость с Vi
|
||||
syntax on "Включает подсветку синтаксиса
|
||||
|
||||
set expandtab
|
||||
set smarttab
|
||||
set tabstop=4
|
||||
set softtabstop=4
|
||||
set shiftwidth=4
|
||||
set autoindent
|
||||
set smartindent
|
||||
set nowrap
|
||||
|
||||
set noerrorbells
|
||||
set novisualbell
|
||||
set showcmd
|
||||
set showtabline=2
|
||||
|
||||
set ignorecase
|
||||
set smartcase
|
||||
set hlsearch
|
||||
set incsearch
|
||||
|
||||
set mousehide
|
||||
set mouse=a
|
||||
|
||||
set colorcolumn=120
|
||||
set scrolloff=7
|
||||
|
||||
set virtualedit=onemore " allow for cursor beyond last character
|
||||
|
||||
" f4 toggle hlsearch
|
||||
nnoremap <F4> :set invhlsearch<CR>
|
||||
|
||||
" navigation on russian
|
||||
nmap о j
|
||||
nmap л k
|
||||
nmap р h
|
||||
nmap д l
|
||||
nmap ш i
|
||||
nmap ф a
|
||||
nmap в d
|
||||
|
||||
|
||||
set ffs=unix,dos,mac
|
||||
set encoding=utf8
|
||||
|
||||
" tabs
|
||||
nnoremap <C-Left> :tabprevious<CR>
|
||||
nnoremap <C-Right> :tabnext<CR>
|
||||
nnoremap <C-h> :tabprevious<CR>
|
||||
nnoremap <C-l> :tabnext<CR>
|
||||
@ -11,7 +11,7 @@ setopt hist_ignore_space # ignore commands that start with space
|
||||
setopt hist_verify # show command with history expansion to user before running it
|
||||
#setopt share_history # share command history data
|
||||
|
||||
HISTORY_IGNORE="(exit|q|c)"
|
||||
HISTORY_IGNORE="(exit|q|c|..|l[l,s,a,.])"
|
||||
|
||||
# configure `time` format
|
||||
TIMEFMT=$'\nreal\t%E\nuser\t%U\nsys\t%S\ncpu\t%P'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user