diff --git a/.gitconfig b/.gitconfig index e98f189..cc63491 100644 --- a/.gitconfig +++ b/.gitconfig @@ -1,6 +1,6 @@ [core] excludesfile = ~/.gitignore - editor = vim + editor = nvim autocrlf = true [init] diff --git a/.gitignore b/.gitignore index 855af39..7b6f80e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,13 @@ + +# global + .idea -.vim/bundle/ *.sw[op] .env *.log - Session.vim + + +# local + +.vim/bundle/ diff --git a/.subbash/aliases b/.subbash/aliases index 09d3554..aeeb648 100644 --- a/.subbash/aliases +++ b/.subbash/aliases @@ -51,10 +51,10 @@ 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 +alias vi=nvim +alias svi="sudo -E nvim" +alias vis='nvim "+set si"' +alias edit=nvim # net alias ports='netstat -tulanp' @@ -91,4 +91,4 @@ alias drma='docker rm $(docker ps -a -q -f status=exited)' alias pipir='python3 -m pip install -r requirements.txt' # git -alias watch-diff='watch --color "git diff --color=always"' \ No newline at end of file +alias watch-diff='watch --color "git diff --color=always"' diff --git a/light/.bashrc b/light/.bashrc new file mode 100644 index 0000000..07bd37c --- /dev/null +++ b/light/.bashrc @@ -0,0 +1,95 @@ + +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 va='source "$(find -P . -maxdepth 3 -type f -name activate | sort | head -n 1)" &>/dev/null || echo "error: virtual env not found, use python3 -m virtualenv venv" >&2' +alias ve='python3 -m virtualenv venv && . venv/bin/activate' +alias vd='deactivate' + + +# docker +alias drma='docker rm $(docker ps -a -q -f status=exited)' + +# python +alias pipir='python3 -m pip install -r requirements.txt' + +# git +alias watch-diff='watch --color "git diff --color=always"' + +PS1="\n┌──(\u@\H)-[\w]\n└─\$ " + diff --git a/light/.vimrc b/light/.vimrc new file mode 100644 index 0000000..8556daf --- /dev/null +++ b/light/.vimrc @@ -0,0 +1,56 @@ + +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 :set invhlsearch + +" 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 :tabprevious +nnoremap :tabnext +nnoremap :tabprevious +nnoremap :tabnext