My Daily use tools for working π¨βπ»
Homebrew π»
brew install vim tmux git pyenv gnupg httpie mosh fzf
brew install --casks macvim tableplus docker gpg-suite typora
Python packages π
Vim π
" No VI support!
set nocompatible
if has("gui_running")
call plug#begin('~/.vim/plugged')
Plug 'ayu-theme/ayu-vim'
Plug 'tpope/vim-fugitive'
Plug 'AnotherProksY/ez-window'
Plug 'preservim/tagbar'
call plug#end()
endif
" Mappings
map <silent> <C-y> "+y<CR>
command! W execute 'w !sudo tee % > /dev/null' <bar> edit!
command! MakeTags !ctags -R .
noremap <F6> <Esc>:syntax sync fromstart<CR>
inoremap <F6> <C-o>:syntax sync fromstart<CR>
" Standard settings
syntax on
set number
set tabstop=2
set shiftwidth=2
set expandtab
set ai
set si
set showmatch
set backspace=eol,start,indent
set whichwrap+=<,>,h,l
set autoindent
set smartindent
set breakindent
set breakindentopt=shift:2,min:40,sbr
" Autocomplete
set shortmess+=c " Shut off completion messages
" Search
set incsearch
set ignorecase
set smartcase
set wildmenu
set wildignore=*.o,*~,*.pyc
set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store
" Other
set autochdir
set wrap
set linebreak
set ttyfast
set lazyredraw
set ruler
set autoread
set path+=**
set t_Co=256
" Filetype
filetype plugin on
filetype indent on
au BufNewFile,BufRead /private/**/pass** setlocal noundofile
" Basic settings
set guifont=Menlo:h16
set guioptions=
set antialias
set termguicolors
let ayucolor="light"
colorscheme ayu
" TagBar settings
nmap <F5> :TagbarToggle<CR>
let g:tagbar_ctags_bin = "/opt/homebrew/bin/ctags"
let g:tagbar_type_groovy = {
\ 'ctagstype' : 'groovy',
\ 'kinds' : [
\ 'p:package:1',
\ 'c:classes',
\ 'i:interfaces',
\ 't:traits',
\ 'e:enums',
\ 'm:methods',
\ 'f:fields:1'
\ ]
\ }
" Explorer settings
let g:netrw_banner = 0
let g:netrw_liststyle = 3
let g:netrw_browse_split = 4
let g:netrw_altv = 1
let g:netrw_winsize = 15
map <silent> <C-E> :Lexplore<CR>
Tmux π₯
# Prefix
unbind C-b
set -g prefix2 C-a # C-a for prefix
bind C-a send-prefix -2
# Binds
bind-key tab last-window # go to last tab
bind-key e send-prefix
bind-key l send-keys 'C-l'
bind-key k send-keys "clear && tmux clear-history" \; send-keys "Enter"
bind r source-file ~/.tmux.conf \; display 'Tmux config reloaded!'
# Pane creation
bind - split-window -c "#{pane_current_path}" -v # split current window horizontally
bind _ split-window -c "#{pane_current_path}" -h # split current window vertically
bind c new-window -c "#{pane_current_path}" # create new window
# Pane navigation
bind -n C-h select-pane -L # move left
bind -n C-j select-pane -D # move down
bind -n C-k select-pane -U # move up
bind -n C-l select-pane -R # move right
# Pane swap
bind > swap-pane -D # swap current pane with the next one
bind < swap-pane -U # swap current pane with the previous one
# Pane resizing
bind -r H resize-pane -L 2
bind -r J resize-pane -D 2
bind -r K resize-pane -U 2
bind -r L resize-pane -R 2
# Copy mode
bind Enter copy-mode # enter copy mode
# Settings
set -g default-terminal "xterm-256color"
set-window-option -g xterm-keys on
set -s escape-time 10 # faster command sequences
set -sg repeat-time 600 # increase repeat timeout
set -s focus-events on
set-option -g renumber-windows on
set -q -g status-utf8 on # expect UTF-8 (tmux < 2.2)
setw -q -g utf8 on
set -g base-index 1
setw -g pane-base-index 1
# Status bar settings
set -g status-position bottom
set -g status-justify centre
set -g status-left ''
set -g status-right ''
set -g status-bg colour2
set -g status-fg '#ffffff'
setw -g window-status-current-format ' #I:#W#[fg=colour196]#F '
setw -g window-status-format ' #I#[fg=colour240]:#W#F '
set-option -g history-limit 5000
# Exports
unset RPROMPT
export PROMPT="%F{green}%~ %F{normal}$ "
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
export PATH=~/bin:/opt/homebrew/bin:/opt/homebrew/sbin:~/.pyenv/bin:$PATH
export FPATH=/opt/homebrew/share/zsh/site-functions:$FPATH
export EDITOR=vim
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export PASSWORD_STORE_ENABLE_EXTENSIONS=true
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
# Completions
autoload -Uz compinit && compinit
zmodload -i zsh/complist
zstyle ':completion:*' menu select
zstyle ':completion:*' completer _expand _complete _ignored _correct _approximate
zstyle ':completion:*' expand prefix suffix
zstyle ':completion:*' group-name ''
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*' list-suffixes true
zstyle ':completion:*' matcher-list '' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
zstyle ':completion:*' special-dirs true
zstyle :compinstall filename '/Users/k.fazilov/.zshrc'
# Shift-Tab
bindkey '^[[Z' reverse-menu-complete
# Aliases
alias p='pass'
alias dev='cd /Users/k.fazilov/Dev;ls'
alias ls='ls -GF'
alias o='open .'
alias rm='rm -f'
alias py='python3'
alias pip='python3 -m pip'
alias grep='grep --color=always'
alias genpass='openssl rand -base64 16'
alias fzf='fzf --preview "([[ -f {} ]] && (bat --style=numbers --color=always {} || cat {})) || ([[ -d {} ]] && (tree -C {} | less)) || echo {} 2> /dev/null | head -200"'
#Git aliases
alias gita='git add .'
alias gitc='git commit'
alias gitps='git push'
alias gitpl='git pull'
alias gits='git status'
alias gitl='git log --reverse'
alias gitl2='git log --reverse --max-count 2'
alias giff='git diff HEAD^ HEAD'
alias gip='git remote prune origin'
alias gir='git reset --soft HEAD~1'
#Abbrs
alias newtar='echo "tar -czf"'
alias untar='echo "tar -xf"'
# FZF
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# heroku autocomplete setup
HEROKU_AC_ZSH_SETUP_PATH=/Users/k.fazilov/Library/Caches/heroku/autocomplete/zsh_setup && test -f $HEROKU_AC_ZSH_SETUP_PATH && source $HEROKU_AC_ZSH_SETUP_PATH;