Начальный коммит
Изменения, которые будут включены в коммит:
новый файл: .tmux.conf
новый файл: .vimrc
новый файл: .zshrc
This commit is contained in:
+73
@@ -0,0 +1,73 @@
|
|||||||
|
#
|
||||||
|
# Example .tmux.conf
|
||||||
|
#
|
||||||
|
# By Nicholas Marriott. Public domain.
|
||||||
|
# Many examples with description on
|
||||||
|
#https://mutelight.org/practical-tmux
|
||||||
|
|
||||||
|
# Start Window Numbering at 1
|
||||||
|
set -g base-index 1
|
||||||
|
|
||||||
|
# Set aggressive-resize option
|
||||||
|
setw -g aggressive-resize on
|
||||||
|
|
||||||
|
# Some tweaks to the status line
|
||||||
|
set -g status-bg green
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
set -g status-left " "
|
||||||
|
set -g status-right "%H:%M %d-%m-%y%y | #[fg=red,dim,bg=default]#(/sbin/ip -o -4 addr list ens192 | awk '{print $4}' | cut -d/ -f1) "
|
||||||
|
|
||||||
|
set -g window-status-current-attr "underscore"
|
||||||
|
|
||||||
|
# No bells at all
|
||||||
|
set -g bell-action none
|
||||||
|
|
||||||
|
# Lock after 15 minutes
|
||||||
|
set -g lock-after-time 1800
|
||||||
|
|
||||||
|
# Keep windows around after they exit
|
||||||
|
set -g remain-on-exit on
|
||||||
|
|
||||||
|
# Turn on xterm-keys so that additional function keys get escape sequences
|
||||||
|
set -g xterm-keys on
|
||||||
|
|
||||||
|
# Change the prefix key to C-a
|
||||||
|
#set -g prefix C-a
|
||||||
|
#unbind C-b
|
||||||
|
#bind C-a send-prefix
|
||||||
|
|
||||||
|
# Turn the mouse on, but without copy mode dragging
|
||||||
|
set -g mouse on
|
||||||
|
#unbind -n MouseDrag1Pane
|
||||||
|
#unbind -temacs-copy MouseDrag1Pane
|
||||||
|
|
||||||
|
# Some extra key bindings to select higher numbered windows
|
||||||
|
bind F1 selectw -t:10
|
||||||
|
bind F2 selectw -t:11
|
||||||
|
bind F3 selectw -t:12
|
||||||
|
bind F4 selectw -t:13
|
||||||
|
bind F5 selectw -t:14
|
||||||
|
bind F6 selectw -t:15
|
||||||
|
bind F7 selectw -t:16
|
||||||
|
bind F8 selectw -t:17
|
||||||
|
bind F9 selectw -t:18
|
||||||
|
bind F10 selectw -t:19
|
||||||
|
bind F11 selectw -t:20
|
||||||
|
bind F12 selectw -t:21
|
||||||
|
|
||||||
|
# Keys to toggle monitoring activity in a window, and synchronize-panes
|
||||||
|
bind m set monitor-activity
|
||||||
|
bind y set synchronize-panes\; display 'synchronize-panes #{?synchronize-panes,on,off}'
|
||||||
|
|
||||||
|
# Keys to hide and show a window name from the status line
|
||||||
|
bind '-' set window-status-format '#I'\; set window-status-current-format '#I'
|
||||||
|
bind '+' set window-status-format '#I:#W#F'\; set window-status-current-format '#I:#W#F'
|
||||||
|
|
||||||
|
# Create a single default session
|
||||||
|
#new -d -s0 -nirssi 'exec irssi'
|
||||||
|
#set -t0:0 monitor-activity on
|
||||||
|
#set -t0:0 aggressive-resize on
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,121 @@
|
|||||||
|
set nocompatible
|
||||||
|
colorscheme desert
|
||||||
|
|
||||||
|
" Включение Юникода
|
||||||
|
set encoding=utf-8
|
||||||
|
set termencoding=utf-8
|
||||||
|
set fileencoding=utf-8
|
||||||
|
set fileencodings=utf-8,ucs-bom,utf-16le,cp1251,koi-8,cp866
|
||||||
|
|
||||||
|
"Also note that UTF8 files often begin with a Byte Order Mark (BOM) which indicates endianness. The BOM is optional but some programs use it exclusively to determine the file encoding. Under certain conditions Vim will write the BOM but sometimes it won't. To explicitly set the BOM do this:
|
||||||
|
"set bomb
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if has("gui_running")
|
||||||
|
if has("gui_gtk2")
|
||||||
|
set guifont=Inconsolata\ 12
|
||||||
|
elseif has("gui_win32")
|
||||||
|
" Отображение кириллицы во внутренних сообщениях программы
|
||||||
|
lan mes ru_RU.UTF-8
|
||||||
|
|
||||||
|
" Отображение кириллицы в меню
|
||||||
|
source $VIMRUNTIME/delmenu.vim
|
||||||
|
set langmenu=ru_RU.UTF-8
|
||||||
|
source $VIMRUNTIME/menu.vim
|
||||||
|
|
||||||
|
" Установка шрифта
|
||||||
|
set guifont=Consolas:h14
|
||||||
|
source $VIMRUNTIME/mswin.vim
|
||||||
|
behave mswin
|
||||||
|
|
||||||
|
" Убрать верхнее меню и тулбар
|
||||||
|
set guioptions-=T
|
||||||
|
set guioptions-=m
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Включение поддержки русского языка
|
||||||
|
set keymap=russian-jcukenwin
|
||||||
|
set iminsert=0
|
||||||
|
set imsearch=0
|
||||||
|
highlight lCursor guifg=NONE guibg=Cyan
|
||||||
|
|
||||||
|
" Формат Файла - от него зависит код завершения строки
|
||||||
|
":set ff=unix
|
||||||
|
":set ff=dos
|
||||||
|
|
||||||
|
" словари с ё
|
||||||
|
":setlocal spell spelllang=ru_yo,en_us
|
||||||
|
|
||||||
|
" Язык помощи
|
||||||
|
set helplang=ru
|
||||||
|
|
||||||
|
" Включить подсветку синтаксиса
|
||||||
|
syntax on
|
||||||
|
|
||||||
|
"Включение автоматического перечтения файла при изменении
|
||||||
|
set autoread
|
||||||
|
|
||||||
|
" Автоматически устанавливать текущей, директорию отрытого файла
|
||||||
|
set autochdir
|
||||||
|
|
||||||
|
" История команд
|
||||||
|
set history=150
|
||||||
|
|
||||||
|
" Максимальное количество изменений, которые могут быть отменены
|
||||||
|
set undolevels=5000
|
||||||
|
|
||||||
|
" Показывать номера в начале строки
|
||||||
|
set number
|
||||||
|
" Автоотступ
|
||||||
|
set autoindent
|
||||||
|
set expandtab
|
||||||
|
set shiftwidth=4
|
||||||
|
set softtabstop=4
|
||||||
|
set tabstop=4
|
||||||
|
|
||||||
|
" Сворачивание блоков по отсупам
|
||||||
|
set foldenable
|
||||||
|
set foldmethod=syntax
|
||||||
|
set foldcolumn=3
|
||||||
|
|
||||||
|
hi User1 guibg=#C2BFA5 guifg=#363636 ctermbg=gray ctermfg=Green
|
||||||
|
hi User2 guibg=#C2BFA5 guifg=DarkGreen ctermbg=gray ctermfg=DarkGreen
|
||||||
|
hi User3 guibg=#C2BFA5 guifg=red ctermbg=gray ctermfg=red
|
||||||
|
hi User4 guibg=#C2BFA5 guifg=#CD6600 ctermbg=gray ctermfg=red
|
||||||
|
hi User5 guibg=#C2BFA5 guifg=#8B4500 ctermbg=gray ctermfg=red
|
||||||
|
|
||||||
|
hi LineNr guibg=#2B2B2B guifg=#737373 ctermfg=grey
|
||||||
|
|
||||||
|
highlight NonText ctermfg=Cyan
|
||||||
|
" Last status
|
||||||
|
set noruler
|
||||||
|
set laststatus=2 " always show the status line
|
||||||
|
set statusline=%1*%F%* "tail of the filename
|
||||||
|
set statusline+=%2*\ \ [%{strlen(&fenc)?&fenc:'none'}, "file encoding
|
||||||
|
set statusline+=%{&ff}]%* "file format
|
||||||
|
set statusline+=%3*\ %h%* "help file flag
|
||||||
|
set statusline+=%3*\ %m%* "modified flag
|
||||||
|
set statusline+=%3*\ %r%* "read only flag
|
||||||
|
set statusline+=\ %=\ col:%4*%c%*, "cursor column
|
||||||
|
set statusline+=\ row:%4*%l%*/%4*%L%* "cursor line/total lines
|
||||||
|
set statusline+=\ %1*%P%* "percent through file
|
||||||
|
|
||||||
|
" Сохранение
|
||||||
|
imap <F2> <ESC> :w<CR>
|
||||||
|
map <F2> :w<CR>
|
||||||
|
|
||||||
|
" Просмотр структуры директории
|
||||||
|
imap <F4> <ESC> :Texplore<CR>
|
||||||
|
map <F4> <ESC> :Texplore<CR>
|
||||||
|
|
||||||
|
|
||||||
|
"set wildmenu
|
||||||
|
"set smarttab
|
||||||
|
"Включаем 256 цветов в терминале, мы ведь работаем из иксов?
|
||||||
|
"Нужно во многих терминалах, например в gnome-terminal
|
||||||
|
"set t_Co=256
|
||||||
|
|
||||||
|
"Подключаем файл смакросами
|
||||||
|
source ~/.vim/macros/*.conf
|
||||||
@@ -0,0 +1,103 @@
|
|||||||
|
autoload -U colors select-word-style
|
||||||
|
colors #Colors
|
||||||
|
select-word-style bash #ctrl+w on words
|
||||||
|
|
||||||
|
export EDITOR="vim"
|
||||||
|
|
||||||
|
### Colored MAN
|
||||||
|
export LESS_TERMCAP_mb=$'\E[01;31m'
|
||||||
|
export LESS_TERMCAP_md=$'\E[01;31m'
|
||||||
|
export LESS_TERMCAP_me=$'\E[0m'
|
||||||
|
export LESS_TERMCAP_se=$'\E[0m'
|
||||||
|
export LESS_TERMCAP_so=$'\E[01;44;33m'
|
||||||
|
export LESS_TERMCAP_ue=$'\E[0m'
|
||||||
|
export LESS_TERMCAP_us=$'\E[01;32m'
|
||||||
|
|
||||||
|
|
||||||
|
##
|
||||||
|
# Completion
|
||||||
|
##
|
||||||
|
# Дополнение по TAB
|
||||||
|
autoload -Uz compinit && compinit
|
||||||
|
# completion dot-files
|
||||||
|
_comp_options+=(globdots)
|
||||||
|
|
||||||
|
|
||||||
|
setopt complete_aliases # Complete aliases
|
||||||
|
setopt always_to_end # when completing from the middle of a word, move the cursor to the end of the word
|
||||||
|
|
||||||
|
zstyle ':completion:*' completer _expand _complete _ignored _approximate #list of completers to use
|
||||||
|
zstyle ':completion:*' list-colors ''
|
||||||
|
zstyle ':completion:*' menu select=2 # menu if nb items > 2
|
||||||
|
zstyle ':completion:*' verbose yes
|
||||||
|
# Add color to Completion
|
||||||
|
zstyle ':completion:*:descriptions' format $'%{\e[0;31m%}completing %B%d%b%{\e[0m%}'
|
||||||
|
zstyle ':completion:*:messages' format $'%{\e[0;31m%}%d'
|
||||||
|
zstyle ':completion:*' group-name ''
|
||||||
|
zstyle ':completion:*:manuals' separate-sections true
|
||||||
|
zstyle :compinstall filename '/home/VIVAIT/r.ainetdinov/.zshrc'
|
||||||
|
|
||||||
|
##
|
||||||
|
# HISTORY
|
||||||
|
##
|
||||||
|
|
||||||
|
HISTFILE=~/.histfile
|
||||||
|
HISTSIZE=9999
|
||||||
|
SAVEHIST=9999
|
||||||
|
|
||||||
|
setopt extended_history # Добавляет в историю время выполнения комманды
|
||||||
|
setopt inc_append_history # append history except that new line are added
|
||||||
|
setopt hist_ignore_all_dups # no duplicate
|
||||||
|
unsetopt hist_ignore_space # ignore space prefixed commands
|
||||||
|
setopt hist_reduce_blanks # trim blanks
|
||||||
|
setopt hist_verify # show before executing history commands
|
||||||
|
setopt inc_append_history # add commands as they are typed, don't wait until shell exit
|
||||||
|
setopt share_history # share hist between sessions
|
||||||
|
setopt hist_no_store
|
||||||
|
|
||||||
|
##
|
||||||
|
# VARIOUS
|
||||||
|
##
|
||||||
|
|
||||||
|
setopt chase_links # resolve symlinks
|
||||||
|
unsetopt rm_star_silent # ask for confirmation for `rm *' or `rm path/*'
|
||||||
|
|
||||||
|
|
||||||
|
#PROMPT
|
||||||
|
color="green"
|
||||||
|
if [ "$EUID" -eq 0 ]; then
|
||||||
|
color="red"
|
||||||
|
fi
|
||||||
|
PROMPT="[%T](%{$fg[yellow]%}%m%{$reset_color%})%{$fg[$color]%}%n %{$fg[blue]%}%~ %#%{$reset_color%} "
|
||||||
|
|
||||||
|
alias ls='ls --color=auto --group-directories-first'
|
||||||
|
alias ll='ls -alF --color'
|
||||||
|
alias tail='multitail'
|
||||||
|
alias df='df -h'
|
||||||
|
alias du='du -h -max-depth=1 | sort -h'
|
||||||
|
alias start='sudo systemctl start'
|
||||||
|
alias restart='sudo systemctl restart'
|
||||||
|
alias stop='sudo systemctl stop'
|
||||||
|
alias status='sudo systemctl status'
|
||||||
|
alias reload='sudo systemctl reload'
|
||||||
|
alias grep='grep --color=auto'
|
||||||
|
|
||||||
|
# Export java option IPv4 Preference
|
||||||
|
export _JAVA_OPTIONS="-Djava.net.preferIPv4Stack=true"
|
||||||
|
|
||||||
|
# key bindings
|
||||||
|
# How know: cat > /dev/null and print Key
|
||||||
|
bindkey "^[[1~" beginning-of-line
|
||||||
|
bindkey "^[[4~" end-of-line
|
||||||
|
bindkey "^[[5~" beginning-of-history
|
||||||
|
bindkey "^[[6~" end-of-history
|
||||||
|
bindkey "^[[3~" delete-char
|
||||||
|
bindkey "^[[2~" quoted-insert
|
||||||
|
bindkey "^[[1;5C" forward-word
|
||||||
|
bindkey "^[[1;5D" backward-word
|
||||||
|
bindkey "^H" backward-delete-word
|
||||||
|
bindkey "^[[A" history-search-backward
|
||||||
|
bindkey "^[[B" history-search-forward
|
||||||
|
|
||||||
|
# completion in the middle of a line
|
||||||
|
bindkey '^i' expand-or-complete-prefix
|
||||||
Reference in New Issue
Block a user