dotfiles: update vim, bash, tmux
This commit is contained in:
8
Brewfile
8
Brewfile
@@ -4,6 +4,7 @@ tap "homebrew/cask"
|
||||
tap "homebrew/core"
|
||||
tap "homebrew/services"
|
||||
|
||||
brew "bash"
|
||||
brew "bat"
|
||||
brew "curl"
|
||||
brew "diff-so-fancy"
|
||||
@@ -11,14 +12,14 @@ brew "fd"
|
||||
brew "fzf"
|
||||
brew "git"
|
||||
brew "htop"
|
||||
brew "httpie"
|
||||
brew "mysql", restart_service: true
|
||||
brew "postgresql", restart_service: true
|
||||
brew "redis", restart_service: true
|
||||
brew "neovim"
|
||||
brew "nmap"
|
||||
brew "node"
|
||||
brew "rbenv"
|
||||
brew "reattach-to-user-namespace"
|
||||
brew "redis", restart_service: true
|
||||
brew "ripgrep"
|
||||
brew "speedtest-cli"
|
||||
brew "stow"
|
||||
@@ -29,9 +30,6 @@ brew "tldr"
|
||||
brew "tmux"
|
||||
brew "urlview"
|
||||
brew "wget"
|
||||
brew "zsh"
|
||||
brew "heroku/brew/heroku"
|
||||
brew "mpv"
|
||||
|
||||
cask "alfred"
|
||||
cask "dash"
|
||||
|
||||
@@ -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 dimensions in character columns and lines
|
||||
# (changes require restart)
|
||||
dimensions:
|
||||
columns: 80
|
||||
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:
|
||||
x: 3
|
||||
y: 3
|
||||
|
||||
# Window decorations
|
||||
# Setting this to false will result in window without borders and title bar.
|
||||
decorations: none
|
||||
|
||||
# When true, alacritty starts maximized.
|
||||
start_maximized: true
|
||||
|
||||
# Display tabs using this many cells (changes require restart)
|
||||
tabspaces: 8
|
||||
|
||||
# When true, bold text is drawn using the bright variant of colors.
|
||||
tabspaces: 4
|
||||
draw_bold_text_with_bright_colors: true
|
||||
|
||||
# Font configuration (changes require restart)
|
||||
font:
|
||||
# The normal (roman) font face to use.
|
||||
normal:
|
||||
family: Fira Code
|
||||
# Style can be specified to pick a specific face.
|
||||
style: Retina
|
||||
|
||||
# The bold font face
|
||||
bold:
|
||||
family: Fira Code
|
||||
# Style can be specified to pick a specific face.
|
||||
style: Bold
|
||||
|
||||
# The italic font face
|
||||
italic:
|
||||
family: Fira Code
|
||||
# Style can be specified to pick a specific face.
|
||||
style: Light
|
||||
|
||||
# Point size of the font
|
||||
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:
|
||||
x: 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:
|
||||
x: 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
|
||||
|
||||
# Should display the render timer
|
||||
render_timer: false
|
||||
|
||||
# Colors (Solarized Dark)
|
||||
colors:
|
||||
# Default colors
|
||||
primary:
|
||||
background: '0x002b36'
|
||||
foreground: '0x839496'
|
||||
|
||||
# Normal colors
|
||||
normal:
|
||||
black: '0x073642'
|
||||
red: '0xdc322f'
|
||||
@@ -101,8 +41,6 @@ colors:
|
||||
magenta: '0xd33682'
|
||||
cyan: '0x2aa198'
|
||||
white: '0xeee8d5'
|
||||
|
||||
# Bright colors
|
||||
bright:
|
||||
black: '0x002b36'
|
||||
red: '0xcb4b16'
|
||||
@@ -113,131 +51,23 @@ colors:
|
||||
cyan: '0x93a1a1'
|
||||
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:
|
||||
animation: EaseOutExpo
|
||||
duration: 0
|
||||
|
||||
# Background opacity
|
||||
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:
|
||||
# Click settings
|
||||
#
|
||||
# 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
|
||||
|
||||
hide_when_typing: true
|
||||
selection:
|
||||
semantic_escape_chars: ",│`|:\"' ()[]{}<>"
|
||||
|
||||
dynamic_title: true
|
||||
|
||||
cursor:
|
||||
style: Block
|
||||
unfocused_hollow: true
|
||||
|
||||
# Live config reload (changes require restart)
|
||||
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:
|
||||
program: /bin/bash
|
||||
args:
|
||||
- --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: V, mods: Command, action: Paste }
|
||||
- { key: C, mods: Command, action: Copy }
|
||||
|
||||
10
bash/.bashrc
10
bash/.bashrc
@@ -1,9 +1,10 @@
|
||||
[ -z "$TMUX" ] && tmux a
|
||||
|
||||
[ -f ~/iCloud/secrets.sh ] && . ~/iCloud/secrets.sh
|
||||
[ -f /etc/bashrc ] && . /etc/bashrc
|
||||
. /usr/local/etc/profile.d/z.sh
|
||||
[ -f /usr/local/etc/profile.d/z.sh ] && . /usr/local/etc/profile.d/z.sh
|
||||
[ -f /etc/bash_completion ] && . /etc/bash_completion
|
||||
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
|
||||
[ -f ~/.fzf.bash ] && . ~/.fzf.bash
|
||||
|
||||
# Don't put duplicate lines in the history. See bash(1) for more options
|
||||
export HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups
|
||||
@@ -21,9 +22,6 @@ export EDITOR=nvim
|
||||
export LANG=en_US.UTF-8
|
||||
export LC_ALL=en_US.UTF-8
|
||||
|
||||
# Creds
|
||||
export HOMEBREW_GITHUB_API_TOKEN="ea82cdedd1d5d45d4a5dfc6ec62137ca83bec6ee"
|
||||
|
||||
# fzf
|
||||
export FZF_DEFAULT_COMMAND='fd --type f --hidden --follow --exclude .git'
|
||||
export FZF_DEFAULT_OPTS='--layout=reverse --inline-info'
|
||||
@@ -35,7 +33,7 @@ alias ll='ls -l'
|
||||
alias v='vim'
|
||||
alias vi='vim'
|
||||
alias vim='nvim'
|
||||
alias cat='bat --style plain --theme=solarized'
|
||||
alias cat='bat --style plain'
|
||||
alias grep='rg'
|
||||
alias be='bundle exec'
|
||||
alias ..='cd ..'
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
set -g base-index 1
|
||||
|
||||
# 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
|
||||
set -g mode-keys vi
|
||||
@@ -17,23 +17,11 @@ set -g visual-activity off
|
||||
set -g renumber-windows on
|
||||
|
||||
# => Theme
|
||||
set -g status-bg black
|
||||
set -g status-fg white
|
||||
set -g window-status-current-bg white
|
||||
set -g window-status-current-fg black
|
||||
set -g window-status-current-attr bold
|
||||
|
||||
# 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 status-style fg=white,bg=black
|
||||
set -g window-status-current-style fg=black,bg=white,bold
|
||||
set -g window-status-style fg=colour244,bg=default
|
||||
set -g window-status-current-style fg=colour166,bg=default
|
||||
set -g message-style fg=colour166,bg=colour235
|
||||
|
||||
set -g window-status-format " #W "
|
||||
set -g window-status-current-format " #W "
|
||||
|
||||
37
vim/.vimrc
37
vim/.vimrc
@@ -101,15 +101,6 @@ call plug#end()
|
||||
" -> 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()
|
||||
let _s=@/
|
||||
let l = line(".")
|
||||
@@ -165,10 +156,7 @@ function! CloseNERDTree()
|
||||
endfunction
|
||||
|
||||
function! TweakSolarized()
|
||||
" Some adjustments stolen from YADR project
|
||||
hi! link txtBold Identifier
|
||||
hi! link zshVariableDef Identifier
|
||||
hi! link zshFunction Function
|
||||
hi! link rubyControl Statement
|
||||
hi! link rspecGroupMethods rubyControl
|
||||
hi! link rspecMocks Identifier
|
||||
@@ -184,23 +172,12 @@ function! TweakSolarized()
|
||||
hi! link rubyRailsMethod Title
|
||||
hi! link rubyDoBlock Normal
|
||||
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 javascriptFunction Statement
|
||||
hi! link javascriptThis Statement
|
||||
hi! link javascriptParens Normal
|
||||
hi! link jOperators javascriptStringD
|
||||
hi! link jId Title
|
||||
hi! link jClass Title
|
||||
hi! link NERDTreeFile Constant
|
||||
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 Search DiffAdd
|
||||
hi! link Delimiter Identifier
|
||||
@@ -232,7 +209,7 @@ function! TweakSolarized()
|
||||
hi TabLine cterm=NONE ctermbg=0 ctermfg=244
|
||||
hi TabLineFill cterm=NONE ctermbg=0 ctermfg=4
|
||||
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
|
||||
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_warning = '│'
|
||||
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 = {
|
||||
\ 'ruby': ['rubocop'],
|
||||
@@ -489,12 +469,7 @@ set conceallevel=2
|
||||
" Highlight VCS conflict markers
|
||||
match ErrorMsg '^\(<\|=\|>\)\{7\}\([^=].\+\)\?$'
|
||||
|
||||
set statusline=
|
||||
set statusline+=%#PmenuSel#
|
||||
set statusline+=%{StatuslineGit()}
|
||||
set statusline+=%#LineNr#
|
||||
set statusline+=\ %t
|
||||
set statusline+=%m
|
||||
set statusline=%<%f\ (%{&ft})\ %-4(%m%)%=%-19(%3l,%02c%03V%)
|
||||
|
||||
|
||||
" ========================================================
|
||||
@@ -661,7 +636,7 @@ xmap \ <Plug>Commentary
|
||||
nmap \ <Plug>Commentary
|
||||
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>ss <c-w>s TODO:
|
||||
|
||||
Reference in New Issue
Block a user