dotfiles: update vim, bash, tmux

This commit is contained in:
2019-05-21 22:37:31 +03:00
parent d319182ddb
commit 7914ce835c
5 changed files with 35 additions and 246 deletions

View File

@@ -4,6 +4,7 @@ tap "homebrew/cask"
tap "homebrew/core" tap "homebrew/core"
tap "homebrew/services" tap "homebrew/services"
brew "bash"
brew "bat" brew "bat"
brew "curl" brew "curl"
brew "diff-so-fancy" brew "diff-so-fancy"
@@ -11,14 +12,14 @@ brew "fd"
brew "fzf" brew "fzf"
brew "git" brew "git"
brew "htop" brew "htop"
brew "httpie"
brew "mysql", restart_service: true brew "mysql", restart_service: true
brew "postgresql", restart_service: true
brew "redis", restart_service: true
brew "neovim" brew "neovim"
brew "nmap" brew "nmap"
brew "node" brew "node"
brew "rbenv" brew "rbenv"
brew "reattach-to-user-namespace" brew "reattach-to-user-namespace"
brew "redis", restart_service: true
brew "ripgrep" brew "ripgrep"
brew "speedtest-cli" brew "speedtest-cli"
brew "stow" brew "stow"
@@ -29,9 +30,6 @@ brew "tldr"
brew "tmux" brew "tmux"
brew "urlview" brew "urlview"
brew "wget" brew "wget"
brew "zsh"
brew "heroku/brew/heroku"
brew "mpv"
cask "alfred" cask "alfred"
cask "dash" cask "dash"

View File

@@ -1,97 +1,37 @@
# Configuration for Alacritty, the GPU enhanced terminal emulator
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty it self.
env:
# TERM env customization.
#
# If this property is not set, alacritty will set it to xterm-256color.
#
# Note that some xterm terminfo databases don't declare support for italics.
# You can verify this by checking for the presence of `smso` and `sitm` in
# `infocmp xterm-256color`.
TERM: xterm-256color
window: window:
# Window dimensions in character columns and lines
# (changes require restart)
dimensions: dimensions:
columns: 80 columns: 80
lines: 24 lines: 24
# Adds this many blank pixels of padding around the window
# Units are physical pixels; this is not DPI aware.
# (change requires restart)
padding: padding:
x: 3 x: 3
y: 3 y: 3
# Window decorations
# Setting this to false will result in window without borders and title bar.
decorations: none decorations: none
# When true, alacritty starts maximized.
start_maximized: true start_maximized: true
tabspaces: 4
# Display tabs using this many cells (changes require restart)
tabspaces: 8
# When true, bold text is drawn using the bright variant of colors.
draw_bold_text_with_bright_colors: true draw_bold_text_with_bright_colors: true
# Font configuration (changes require restart)
font: font:
# The normal (roman) font face to use.
normal: normal:
family: Fira Code family: Fira Code
# Style can be specified to pick a specific face.
style: Retina style: Retina
# The bold font face
bold: bold:
family: Fira Code family: Fira Code
# Style can be specified to pick a specific face.
style: Bold style: Bold
# The italic font face
italic: italic:
family: Fira Code family: Fira Code
# Style can be specified to pick a specific face.
style: Light style: Light
# Point size of the font
size: 14.0 size: 14.0
# Offset is the extra space around each character. offset.y can be thought of
# as modifying the linespacing, and offset.x as modifying the letter spacing.
offset: offset:
x: 0 x: 0
y: 0 y: 0
# Glyph offset determines the locations of the glyphs within their cells with
# the default being at the bottom. Increase the x offset to move the glyph to
# the right, increase the y offset to move the glyph upward.
glyph_offset: glyph_offset:
x: 0 x: 0
y: 0 y: 0
# OS X only: use thin stroke font rendering. Thin strokes are suitable
# for retina displays, but for non-retina you probably want this set to
# false.
use_thin_strokes: true use_thin_strokes: true
# Should display the render timer
render_timer: false
# Colors (Solarized Dark)
colors: colors:
# Default colors
primary: primary:
background: '0x002b36' background: '0x002b36'
foreground: '0x839496' foreground: '0x839496'
# Normal colors
normal: normal:
black: '0x073642' black: '0x073642'
red: '0xdc322f' red: '0xdc322f'
@@ -101,8 +41,6 @@ colors:
magenta: '0xd33682' magenta: '0xd33682'
cyan: '0x2aa198' cyan: '0x2aa198'
white: '0xeee8d5' white: '0xeee8d5'
# Bright colors
bright: bright:
black: '0x002b36' black: '0x002b36'
red: '0xcb4b16' red: '0xcb4b16'
@@ -113,131 +51,23 @@ colors:
cyan: '0x93a1a1' cyan: '0x93a1a1'
white: '0xfdf6e3' white: '0xfdf6e3'
# Visual Bell
#
# Any time the BEL code is received, Alacritty "rings" the visual bell. Once
# rung, the terminal background will be set to white and transition back to the
# default background color. You can control the rate of this transition by
# setting the `duration` property (represented in milliseconds). You can also
# configure the transition function by setting the `animation` property.
#
# Possible values for `animation`
# `Ease`
# `EaseOut`
# `EaseOutSine`
# `EaseOutQuad`
# `EaseOutCubic`
# `EaseOutQuart`
# `EaseOutQuint`
# `EaseOutExpo`
# `EaseOutCirc`
# `Linear`
#
# To completely disable the visual bell, set its duration to 0.
#
visual_bell: visual_bell:
animation: EaseOutExpo
duration: 0 duration: 0
# Background opacity
background_opacity: 1.0 background_opacity: 1.0
# Mouse bindings
#
# Currently doesn't support modifiers. Both the `mouse` and `action` fields must
# be specified.
#
# Values for `mouse`:
# - Middle
# - Left
# - Right
# - Numeric identifier such as `5`
#
# Values for `action`:
# - Paste
# - PasteSelection
# - Copy (TODO)
mouse_bindings:
- { mouse: Middle, action: PasteSelection }
mouse: mouse:
# Click settings hide_when_typing: true
#
# The `double_click` and `triple_click` settings control the time
# alacritty should wait for accepting multiple clicks as one double
# or triple click.
double_click: { threshold: 300 }
triple_click: { threshold: 300 }
# Faux Scrollback
#
# The `faux_scrollback_lines` setting controls the number
# of lines the terminal should scroll when the alternate
# screen buffer is active. This is used to allow mouse
# scrolling for applications like `man`.
#
# To disable this completely, set `faux_scrollback_lines` to 0.
faux_scrolling_lines: 1
hide_when_typing: false
selection: selection:
semantic_escape_chars: ",│`|:\"' ()[]{}<>" semantic_escape_chars: ",│`|:\"' ()[]{}<>"
dynamic_title: true dynamic_title: true
cursor: cursor:
style: Block style: Block
unfocused_hollow: true unfocused_hollow: true
# Live config reload (changes require restart)
live_config_reload: true live_config_reload: true
# Shell
#
# You can set shell.program to the path of your favorite shell, e.g. /bin/fish.
# Entries in shell.args are passed unmodified as arguments to the shell.
#
shell: shell:
program: /bin/bash program: /bin/bash
args: args:
- --login - --login
# Key bindings
#
# Each binding is defined as an object with some properties. Most of the
# properties are optional. All of the alphabetical keys should have a letter for
# the `key` value such as `V`. Function keys are probably what you would expect
# as well (F1, F2, ..). The number keys above the main keyboard are encoded as
# `Key1`, `Key2`, etc. Keys on the number pad are encoded `Number1`, `Number2`,
# etc. These all match the glutin::VirtualKeyCode variants.
#
# A list with all available `key` names can be found here:
# https://docs.rs/glutin/*/glutin/enum.VirtualKeyCode.html#variants
#
# Possible values for `mods`
# `Command`, `Super` refer to the super/command/windows key
# `Control` for the control key
# `Shift` for the Shift key
# `Alt` and `Option` refer to alt/option
#
# mods may be combined with a `|`. For example, requiring control and shift
# looks like:
#
# mods: Control|Shift
#
# The parser is currently quite sensitive to whitespace and capitalization -
# capitalization must match exactly, and piped items must not have whitespace
# around them.
#
# Either an `action`, `chars`, or `command` field must be present.
# `action` must be one of `Paste`, `PasteSelection`, `Copy`, or `Quit`.
# `chars` writes the specified string every time that binding is activated.
# These should generally be escape sequences, but they can be configured to
# send arbitrary strings of bytes.
# `command` must be a map containing a `program` string, and `args` array of
# strings. For example:
# - { ... , command: { program: "alacritty", args: ["-e", "vttest"] } }
key_bindings: key_bindings:
- { key: V, mods: Command, action: Paste } - { key: V, mods: Command, action: Paste }
- { key: C, mods: Command, action: Copy } - { key: C, mods: Command, action: Copy }

View File

@@ -1,9 +1,10 @@
[ -z "$TMUX" ] && tmux a [ -z "$TMUX" ] && tmux a
[ -f /etc/bashrc ] && . /etc/bashrc [ -f ~/iCloud/secrets.sh ] && . ~/iCloud/secrets.sh
. /usr/local/etc/profile.d/z.sh [ -f /etc/bashrc ] && . /etc/bashrc
[ -f /etc/bash_completion ] && . /etc/bash_completion [ -f /usr/local/etc/profile.d/z.sh ] && . /usr/local/etc/profile.d/z.sh
[ -f ~/.fzf.bash ] && source ~/.fzf.bash [ -f /etc/bash_completion ] && . /etc/bash_completion
[ -f ~/.fzf.bash ] && . ~/.fzf.bash
# Don't put duplicate lines in the history. See bash(1) for more options # Don't put duplicate lines in the history. See bash(1) for more options
export HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups export HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups
@@ -21,9 +22,6 @@ export EDITOR=nvim
export LANG=en_US.UTF-8 export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8 export LC_ALL=en_US.UTF-8
# Creds
export HOMEBREW_GITHUB_API_TOKEN="ea82cdedd1d5d45d4a5dfc6ec62137ca83bec6ee"
# fzf # fzf
export FZF_DEFAULT_COMMAND='fd --type f --hidden --follow --exclude .git' export FZF_DEFAULT_COMMAND='fd --type f --hidden --follow --exclude .git'
export FZF_DEFAULT_OPTS='--layout=reverse --inline-info' export FZF_DEFAULT_OPTS='--layout=reverse --inline-info'
@@ -35,7 +33,7 @@ alias ll='ls -l'
alias v='vim' alias v='vim'
alias vi='vim' alias vi='vim'
alias vim='nvim' alias vim='nvim'
alias cat='bat --style plain --theme=solarized' alias cat='bat --style plain'
alias grep='rg' alias grep='rg'
alias be='bundle exec' alias be='bundle exec'
alias ..='cd ..' alias ..='cd ..'

View File

@@ -5,7 +5,7 @@
set -g base-index 1 set -g base-index 1
# Set the base index for panes to 1 instead of 0. # Set the base index for panes to 1 instead of 0.
setw -g pane-base-index 1 set -g pane-base-index 1
# Vi-mode # Vi-mode
set -g mode-keys vi set -g mode-keys vi
@@ -17,23 +17,11 @@ set -g visual-activity off
set -g renumber-windows on set -g renumber-windows on
# => Theme # => Theme
set -g status-bg black set -g status-style fg=white,bg=black
set -g status-fg white set -g window-status-current-style fg=black,bg=white,bold
set -g window-status-current-bg white set -g window-status-style fg=colour244,bg=default
set -g window-status-current-fg black set -g window-status-current-style fg=colour166,bg=default
set -g window-status-current-attr bold set -g message-style fg=colour166,bg=colour235
# Default window title colors
setw -g window-status-fg colour244 #base0
setw -g window-status-bg default
# Active window title colors
setw -g window-status-current-fg colour166 #orange
setw -g window-status-current-bg default
# Message text
set -g message-bg colour235 #base02
set -g message-fg colour166 #orange
set -g window-status-format " #W " set -g window-status-format " #W "
set -g window-status-current-format " #W " set -g window-status-current-format " #W "

View File

@@ -101,15 +101,6 @@ call plug#end()
" -> Functions " -> Functions
" ======================================================== " ========================================================
function! GitBranch()
return system("git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n'")
endfunction
function! StatuslineGit()
let l:branchname = GitBranch()
return strlen(l:branchname) > 0?' '.l:branchname.' ':''
endfunction
function! StripTrailingWhitespace() function! StripTrailingWhitespace()
let _s=@/ let _s=@/
let l = line(".") let l = line(".")
@@ -165,10 +156,7 @@ function! CloseNERDTree()
endfunction endfunction
function! TweakSolarized() function! TweakSolarized()
" Some adjustments stolen from YADR project
hi! link txtBold Identifier hi! link txtBold Identifier
hi! link zshVariableDef Identifier
hi! link zshFunction Function
hi! link rubyControl Statement hi! link rubyControl Statement
hi! link rspecGroupMethods rubyControl hi! link rspecGroupMethods rubyControl
hi! link rspecMocks Identifier hi! link rspecMocks Identifier
@@ -184,23 +172,12 @@ function! TweakSolarized()
hi! link rubyRailsMethod Title hi! link rubyRailsMethod Title
hi! link rubyDoBlock Normal hi! link rubyDoBlock Normal
hi! link MatchParen DiffText hi! link MatchParen DiffText
hi! link CTagsModule Type
hi! link CTagsClass Type
hi! link CTagsMethod Identifier
hi! link CTagsSingleton Identifier
hi! link javascriptFuncName Type hi! link javascriptFuncName Type
hi! link javascriptFunction Statement hi! link javascriptFunction Statement
hi! link javascriptThis Statement hi! link javascriptThis Statement
hi! link javascriptParens Normal hi! link javascriptParens Normal
hi! link jOperators javascriptStringD
hi! link jId Title
hi! link jClass Title
hi! link NERDTreeFile Constant hi! link NERDTreeFile Constant
hi! link NERDTreeDir Identifier hi! link NERDTreeDir Identifier
hi! link sassMixinName Function
hi! link sassDefinition Function
hi! link sassProperty Type
hi! link htmlTagName Type
hi! link Visual DiffChange hi! link Visual DiffChange
hi! link Search DiffAdd hi! link Search DiffAdd
hi! link Delimiter Identifier hi! link Delimiter Identifier
@@ -221,18 +198,18 @@ function! TweakSolarized()
hi StatusLineNC cterm=NONE ctermbg=0 ctermfg=0 hi StatusLineNC cterm=NONE ctermbg=0 ctermfg=0
" Misc adjustments " Misc adjustments
hi WildMenu cterm=NONE ctermbg=0 ctermfg=7 hi WildMenu cterm=NONE ctermbg=0 ctermfg=7
hi Pmenu cterm=NONE ctermbg=0 ctermfg=25 hi Pmenu cterm=NONE ctermbg=0 ctermfg=25
hi PmenuSel cterm=NONE ctermbg=0 ctermfg=7 hi PmenuSel cterm=NONE ctermbg=0 ctermfg=7
hi PmenuSbar cterm=NONE ctermbg=0 ctermfg=7 hi PmenuSbar cterm=NONE ctermbg=0 ctermfg=7
hi PmenuThumb cterm=NONE ctermbg=0 ctermfg=7 hi PmenuThumb cterm=NONE ctermbg=0 ctermfg=7
hi SpecialKey cterm=NONE ctermbg=8 ctermfg=1 hi SpecialKey cterm=NONE ctermbg=8 ctermfg=1
hi CtrlPLinePre cterm=NONE ctermbg=8 ctermfg=8 hi CtrlPLinePre cterm=NONE ctermbg=8 ctermfg=8
hi Folded cterm=NONE ctermbg=0 ctermfg=4 hi Folded cterm=NONE ctermbg=0 ctermfg=4
hi TabLine cterm=NONE ctermbg=0 ctermfg=244 hi TabLine cterm=NONE ctermbg=0 ctermfg=244
hi TabLineFill cterm=NONE ctermbg=0 ctermfg=4 hi TabLineFill cterm=NONE ctermbg=0 ctermfg=4
hi TabLineSel cterm=NONE ctermbg=0 ctermfg=166 hi TabLineSel cterm=NONE ctermbg=0 ctermfg=166
hi VertSplit cterm=NONE ctermbg=NONE ctermfg=0 hi VertSplit cterm=NONE ctermbg=0 ctermfg=0
" GitGutter sign column adjustments " GitGutter sign column adjustments
hi GitGutterAdd ctermbg=8 ctermfg=2 hi GitGutterAdd ctermbg=8 ctermfg=2
@@ -292,6 +269,9 @@ let g:gitgutter_sign_removed_first_line = '│'
let g:ale_sign_error = 'x' let g:ale_sign_error = 'x'
let g:ale_sign_warning = '│' let g:ale_sign_warning = '│'
let g:ale_echo_msg_format = '[%severity%] %s' let g:ale_echo_msg_format = '[%severity%] %s'
let g:ale_lint_on_text_changed = 'normal'
let g:ale_lint_on_insert_leave = 1
let g:ale_lint_delay = 0
let g:ale_fixers = { let g:ale_fixers = {
\ 'ruby': ['rubocop'], \ 'ruby': ['rubocop'],
@@ -489,12 +469,7 @@ set conceallevel=2
" Highlight VCS conflict markers " Highlight VCS conflict markers
match ErrorMsg '^\(<\|=\|>\)\{7\}\([^=].\+\)\?$' match ErrorMsg '^\(<\|=\|>\)\{7\}\([^=].\+\)\?$'
set statusline= set statusline=%<%f\ (%{&ft})\ %-4(%m%)%=%-19(%3l,%02c%03V%)
set statusline+=%#PmenuSel#
set statusline+=%{StatuslineGit()}
set statusline+=%#LineNr#
set statusline+=\ %t
set statusline+=%m
" ======================================================== " ========================================================
@@ -661,7 +636,7 @@ xmap \ <Plug>Commentary
nmap \ <Plug>Commentary nmap \ <Plug>Commentary
nmap \\ <Plug>CommentaryLine nmap \\ <Plug>CommentaryLine
nnoremap <BS> :tabnew ~/iCloud/Wiki/index.md<CR> nnoremap <BS> :tabnew ~/iCloud/Notebook/index.md<CR>
nnoremap <silent>vv <c-w>v nnoremap <silent>vv <c-w>v
" nnoremap <silent>ss <c-w>s TODO: " nnoremap <silent>ss <c-w>s TODO: