Skip to content

Instantly share code, notes, and snippets.

@bmatcuk bmatcuk/1README.md
Last active Oct 7, 2019

Embed
What would you like to do?
My Dot Files

I'm running OSX on my main machine, so these dot files are mainly configured for that. However, most of it should work fine on other *NIX platforms.

These dot files require a couple things to work properly.

  1. The bash_profile and neovim config require a font that has both the powerline symbols and Nerd Font symbols. Personally, I use a font called Hack, downloaded from the Nerd Font repository. See Nerd Font's documentation for downloading and installing the Nerd Font version of Hack.

    If you're on OSX like me, it can be done fairly easily with:

    brew tap homebrew/cask-fonts
    brew cask install font-hack-nerd-font
  2. The neovim init uses several tools for various things:

    • fzf: brew install fzf
    • ripgrep: brew install ripgrep
  3. I've included a tmux-256color terminfo because OSX doesn't include it by default (you need ncurses v6+). I've modified it slightly to have smaller tab stops (2 columns) and inherit from alacritty's terminfo since that's my terminal emulator of choice. Speaking of which, give alacritty a try.

Favorite linters:

Some of my favorite tools, installed via homebrew:

Some additional notes:

  • I use a dvorak layout. OSX doesn't have a way to set the default keyboard layout on the login screen. To fix, setup your account's keyboard layout the way you'd like and then:

    sudo cp ~/Library/Preferences/com.apple.HIToolbox.plist /Library/Preferences
# ~/.config/alacritty/alacritty.yml
env:
TERM: alacritty-direct
window:
dimensions:
columns: 0
lines: 0
padding:
x: 0
y: 0
dynamic_padding: false
decorations: full
startup_mode: Maximized
scrolling:
history: 0
multiplier: 3
faux_multiplier: 3
auto_scroll: false
tabspaces: 2
font:
normal:
family: Hack Nerd Font
style: Regular
bold:
family: Hack Nerd Font
style: Bold
italic:
family: Hack Nerd Font
style: Italic
size: 10.0
offset:
x: 0
y: 0
glyph_offset:
x: 0
y: 0
use_thin_strokes: true
draw_bold_text_with_bright_colors: false
colors:
primary:
background: '0x000f13'
foreground: '0x839496' # base0
normal:
black: '0x073642' # base02
red: '0xdc322f' # red
green: '0x859900' # green
yellow: '0xb58900' # yellow
blue: '0x268bd2' # blue
magenta: '0xd33682' # magenta
cyan: '0x2aa198' # cyan
white: '0xeee8d5' # base2
bright:
black: '0x002b36' # base03
red: '0xcb4b16' # orange
green: '0x586e75' # base01
yellow: '0x657b83' # base00
blue: '0x839496' # base0
magenta: '0x6c71c4' # violet
cyan: '0x93a1a1' # base1
white: '0xfdf6e3' # base3
indexed_colors: []
visual_bell:
animation: EaseOutExpo
duration: 0
color: '0xffffff'
background_opacity: 1.0
selection:
semantic_escape_chars: ",│`|:\"' ()[]{}<>"
save_to_clipboard: false
dynamic_title: true
cursor:
style: Block
unfocused_hollow: true
live_config_reload: true
working_directory: None
enable_experimental_conpty_backend: false
alt_send_esc: true
debug:
render_timer: false
persistent_logging: false
log_level: Warn
print_events: false
ref_test: false
mouse:
double_click: { threshold: 300 }
triple_click: { threshold: 300 }
hide_when_typing: false
url:
launcher: None
modifiers: None
key_bindings:
- { key: Paste, action: Paste }
- { key: Copy, action: Copy }
- { key: L, mods: Control, action: ClearLogNotice }
- { key: L, mods: Control, chars: "\x0c" }
- { key: Home, mods: Alt, chars: "\x1b[1;3H" }
- { key: Home, chars: "\x1bOH", mode: AppCursor }
- { key: Home, chars: "\x1b[H", mode: ~AppCursor }
- { key: End, mods: Alt, chars: "\x1b[1;3F" }
- { key: End, chars: "\x1bOF", mode: AppCursor }
- { key: End, chars: "\x1b[F", mode: ~AppCursor }
- { key: PageUp, mods: Shift, action: ScrollPageUp, mode: ~Alt }
- { key: PageUp, mods: Shift, chars: "\x1b[5;2~", mode: Alt }
- { key: PageUp, mods: Control, chars: "\x1b[5;5~" }
- { key: PageUp, mods: Alt, chars: "\x1b[5;3~" }
- { key: PageUp, chars: "\x1b[5~" }
- { key: PageDown, mods: Shift, action: ScrollPageDown, mode: ~Alt }
- { key: PageDown, mods: Shift, chars: "\x1b[6;2~", mode: Alt }
- { key: PageDown, mods: Control, chars: "\x1b[6;5~" }
- { key: PageDown, mods: Alt, chars: "\x1b[6;3~" }
- { key: PageDown, chars: "\x1b[6~" }
- { key: Tab, mods: Shift, chars: "\x1b[Z" }
- { key: Back, chars: "\x7f" }
- { key: Back, mods: Alt, chars: "\x1b\x7f" }
- { key: Insert, chars: "\x1b[2~" }
- { key: Delete, chars: "\x1b[3~" }
- { key: Left, mods: Shift, chars: "\x1b[1;2D" }
- { key: Left, mods: Control, chars: "\x1b[1;5D" }
- { key: Left, mods: Alt, chars: "\x1b[1;3D" }
- { key: Left, chars: "\x1b[D", mode: ~AppCursor }
- { key: Left, chars: "\x1bOD", mode: AppCursor }
- { key: Right, mods: Shift, chars: "\x1b[1;2C" }
- { key: Right, mods: Control, chars: "\x1b[1;5C" }
- { key: Right, mods: Alt, chars: "\x1b[1;3C" }
- { key: Right, chars: "\x1b[C", mode: ~AppCursor }
- { key: Right, chars: "\x1bOC", mode: AppCursor }
- { key: Up, mods: Shift, chars: "\x1b[1;2A" }
- { key: Up, mods: Control, chars: "\x1b[1;5A" }
- { key: Up, mods: Alt, chars: "\x1b[1;3A" }
- { key: Up, chars: "\x1b[A", mode: ~AppCursor }
- { key: Up, chars: "\x1bOA", mode: AppCursor }
- { key: Down, mods: Shift, chars: "\x1b[1;2B" }
- { key: Down, mods: Control, chars: "\x1b[1;5B" }
- { key: Down, mods: Alt, chars: "\x1b[1;3B" }
- { key: Down, chars: "\x1b[B", mode: ~AppCursor }
- { key: Down, chars: "\x1bOB", mode: AppCursor }
- { key: F1, chars: "\x1bOP" }
- { key: F2, chars: "\x1bOQ" }
- { key: F3, chars: "\x1bOR" }
- { key: F4, chars: "\x1bOS" }
- { key: F5, chars: "\x1b[15~" }
- { key: F6, chars: "\x1b[17~" }
- { key: F7, chars: "\x1b[18~" }
- { key: F8, chars: "\x1b[19~" }
- { key: F9, chars: "\x1b[20~" }
- { key: F10, chars: "\x1b[21~" }
- { key: F11, chars: "\x1b[23~" }
- { key: F12, chars: "\x1b[24~" }
- { key: F1, mods: Shift, chars: "\x1b[1;2P" }
- { key: F2, mods: Shift, chars: "\x1b[1;2Q" }
- { key: F3, mods: Shift, chars: "\x1b[1;2R" }
- { key: F4, mods: Shift, chars: "\x1b[1;2S" }
- { key: F5, mods: Shift, chars: "\x1b[15;2~" }
- { key: F6, mods: Shift, chars: "\x1b[17;2~" }
- { key: F7, mods: Shift, chars: "\x1b[18;2~" }
- { key: F8, mods: Shift, chars: "\x1b[19;2~" }
- { key: F9, mods: Shift, chars: "\x1b[20;2~" }
- { key: F10, mods: Shift, chars: "\x1b[21;2~" }
- { key: F11, mods: Shift, chars: "\x1b[23;2~" }
- { key: F12, mods: Shift, chars: "\x1b[24;2~" }
- { key: F1, mods: Control, chars: "\x1b[1;5P" }
- { key: F2, mods: Control, chars: "\x1b[1;5Q" }
- { key: F3, mods: Control, chars: "\x1b[1;5R" }
- { key: F4, mods: Control, chars: "\x1b[1;5S" }
- { key: F5, mods: Control, chars: "\x1b[15;5~" }
- { key: F6, mods: Control, chars: "\x1b[17;5~" }
- { key: F7, mods: Control, chars: "\x1b[18;5~" }
- { key: F8, mods: Control, chars: "\x1b[19;5~" }
- { key: F9, mods: Control, chars: "\x1b[20;5~" }
- { key: F10, mods: Control, chars: "\x1b[21;5~" }
- { key: F11, mods: Control, chars: "\x1b[23;5~" }
- { key: F12, mods: Control, chars: "\x1b[24;5~" }
- { key: F1, mods: Alt, chars: "\x1b[1;6P" }
- { key: F2, mods: Alt, chars: "\x1b[1;6Q" }
- { key: F3, mods: Alt, chars: "\x1b[1;6R" }
- { key: F4, mods: Alt, chars: "\x1b[1;6S" }
- { key: F5, mods: Alt, chars: "\x1b[15;6~" }
- { key: F6, mods: Alt, chars: "\x1b[17;6~" }
- { key: F7, mods: Alt, chars: "\x1b[18;6~" }
- { key: F8, mods: Alt, chars: "\x1b[19;6~" }
- { key: F9, mods: Alt, chars: "\x1b[20;6~" }
- { key: F10, mods: Alt, chars: "\x1b[21;6~" }
- { key: F11, mods: Alt, chars: "\x1b[23;6~" }
- { key: F12, mods: Alt, chars: "\x1b[24;6~" }
- { key: F1, mods: Super, chars: "\x1b[1;3P" }
- { key: F2, mods: Super, chars: "\x1b[1;3Q" }
- { key: F3, mods: Super, chars: "\x1b[1;3R" }
- { key: F4, mods: Super, chars: "\x1b[1;3S" }
- { key: F5, mods: Super, chars: "\x1b[15;3~" }
- { key: F6, mods: Super, chars: "\x1b[17;3~" }
- { key: F7, mods: Super, chars: "\x1b[18;3~" }
- { key: F8, mods: Super, chars: "\x1b[19;3~" }
- { key: F9, mods: Super, chars: "\x1b[20;3~" }
- { key: F10, mods: Super, chars: "\x1b[21;3~" }
- { key: F11, mods: Super, chars: "\x1b[23;3~" }
- { key: F12, mods: Super, chars: "\x1b[24;3~" }
- { key: NumpadEnter, chars: "\n" }
# ~/.asdfrc
legacy_version_file = yes
# ~/.bash_profile
# Function that echos as much of a string as possible,
# and automatically adds an ellipsis if necessary.
# It returns the length of the output
function ellipsis_echo {
if [ ${#1} -lt $2 ]; then
echo -en "$1"
return ${#1}
else
local MAX=$(( $2 - 3 ))
echo -en "${1:0:$MAX}..."
return $MAX
fi
}
# Custom command prompt shows current directory, current
# ruby/node/etc version, and current git branch
# NOTE: Requires a powerline compatible font.
function prompt {
local HARD_ARROW="\xEE\x82\xB0"
local DIR="${PWD/$HOME/~}"
local WIDTH=$(( $(tput cols) - 3 ))
local TOOL=""
local DIR_PREFIX=""
for i in $(seq 1 $(echo "$DIR"|tr -cd '/'|wc -c)); do
if [[ -f "${DIR_PREFIX}Gemfile" ]]; then
TOOL="ruby"
break
elif [[ -f "${DIR_PREFIX}package.json" ]]; then
TOOL="nodejs"
break
fi
DIR_PREFIX="${DIR_PREFIX}../"
done
echo
echo -en "$(tput bold)$(tput setab 23)$(tput setaf 15)"
ellipsis_echo "$DIR" $WIDTH
WIDTH=$(( $WIDTH - $? ))
echo -en " $(tput sgr0)$(tput setaf 23)"
if [ -n "$TOOL" ]; then
echo -en "$(tput setab 29)$HARD_ARROW $(tput setaf 15)$(tput bold)"
ellipsis_echo "$(asdf current $TOOL | awk '{print $1}')" $WIDTH
WIDTH=$(( $WIDTH - $? - 3 ))
echo -en " $(tput sgr0)$(tput setaf 29)"
fi
if [ "$(git rev-parse --is-inside-work-tree 2>&1)" == "true" ]; then
echo -en "$(tput setab 35)$HARD_ARROW $(tput setaf 15)$(tput bold)"
ellipsis_echo "$(git status -bs --porcelain | awk 'NR==1{w=substr($0,4,match($0,/\.{3}|$/)-4);x=y=z=""};!x&&$1~/\?/{x="?"};!y&&$1~/M/{y="*"};!z&&$1~/[ADRCU]/{z="+"};x&&y&&z{exit};END{print z y x w}')" $WIDTH
WIDTH=$(( $WIDTH - $? - 3 ))
echo -en " $(tput sgr0)$(tput setaf 35)"
fi
echo -e "$HARD_ARROW$(tput sgr0)"
}
PROMPT_COMMAND=prompt
PS1="\$ "
# Colors for ls and grep
alias ls='ls -GFh'
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
export GREP_OPTIONS='--color=auto'
export HISTCONTROL=ignoreboth
export LESS='-FRX'
# Path
export PATH="/usr/local/bin:/usr/local/sbin:$PATH"
# postgres - https://postgresapp.com/
export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/latest/bin
# node
export PATH=$PATH:./node_modules/.bin
# asdf - brew install asdf
# asdf plugin-add ruby https://github.com/asdf-vm/asdf-ruby.git
# asdf plugin-add nodejs https://github.com/asdf-vm/asdf-nodejs.git
export ASDF_DIR=$(brew --prefix asdf)
export NODEJS_CHECK_SIGNATURES=no
export PATH="$HOME/.asdf/shims:$PATH"
# brew install bat (https://github.com/sharkdp/bat)
export BAT_THEME="zenburn"
# fuck (https://github.com/nvbn/thefuck)
eval $(thefuck --alias)
# brew install bash-completion
[[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && . "/usr/local/etc/profile.d/bash_completion.sh"
source /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-completion.bash
# brew install fzf (https://github.com/junegunn/fzf)
# brew install fd (https://github.com/sharkdp/fd)
export FZF_DEFAULT_OPTS='--height 20% --no-mouse --bind="ctrl-o:execute(vim {})+abort,ctrl-v:toggle-preview,ctrl-d:preview-page-down,ctrl-u:preview-page-up" --no-border --preview="bat --color always {}" --preview-window="right:hidden"'
export FZF_DEFAULT_COMMAND='(git ls-files -co --exclude-standard || fd -tf -tl) 2> /dev/null'
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
function _fzf_compgen_path {
(git ls-files -co --exclude-standard || fd -HL -tf -tl -td --exclude '.git') 2> /dev/null
}
function _fzf_compgen_dir {
(git ls-files -co --exclude-standard || fd -HL -td --exclude '.git') 2> /dev/null
}
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
complete -F _fzf_path_completion -o default -o bashdefault bat
complete -F _fzf_path_completion -o default -o bashdefault tig
complete -F _fzf_dir_completion -o default -o bashdefault fd
complete -F _fzf_dir_completion -o default -o bashdefault rg
# Misc
alias vi='nvim'
alias vim='nvim'
alias gr='cd $(git root)'
alias qpreview='qlmanage -p &>/dev/null'
alias preview="fzf --preview 'bat --color \"always\" {}' --height 100% --no-border"
export EDITOR=nvim
export VISUAL=nvim
# Audio stops working on my Macbook Pro with Touchbar ALL THE DAMN TIME.
function fixaudio {
sudo killall coreaudiod
}
export -f fixaudio
# Start TMUX, but only if it exists, we're in an
# interactive shell, and we aren't inside tmux.
if command -v tmux >/dev/null && [[ $- == *i* && -z "$TMUX" ]]; then
if tmux has >/dev/null; then exec tmux att; else exec tmux; fi
fi
// ~/.config/nvim/coc-settings.json
{
"coc.preferences.currentFunctionSymbolAutoUpdate": true,
"coc.source.around.enable": false,
"coc.source.buffer.enable": false,
"css.validate": false,
"diagnostic.messageTarget": "echo",
"diagnostic.virtualText": true,
"diagnostic.virtualTextPrefix": " ",
"eslint.autoFixOnSave": true,
"eslint.filetypes": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
"git.addGlameToVirtualText": true,
"less.validate": false,
"lists.disabledLists": [
"colors",
"files",
"filetypes",
"grep",
"maps",
"sessions",
"windows"
],
"scss.validate": false,
"stylelintplus.autoFixOnFormat": true,
"suggest.acceptSuggestionOnCommitCharacter": true,
"suggest.enablePreview": true,
"suggest.noselect": false,
"wxss.validate": false,
}
# ~/.config/flake8
# pip install flake8
[flake8]
max-line-length = 160
---
# ~/.config/yamllint/config
# pip install yamllint
extends: default
rules:
line-length: disable
# ~/.default-gems
bundler
rubocop
rubocop-rspec
reek
brakeman
---
# ~/.eslintrc.yml
# npm install eslint eslint-plugin-import eslint-plugin-node \
# eslint-plugin-promise eslint-plugin-standard eslint-config-standard -g
extends: standard
env:
expect: true
jquery: true
mocha: true
rules:
space-before-function-paren:
- "off"
spaced-comment:
- error
- always
- line:
markers:
- "*package"
- "="
- "!"
- "/"
- ","
block:
balanced: true
markers:
- "*package"
- "="
- "!"
- ","
- ":"
- "::"
- "flow-include"
exceptions:
- "*"
# ~/.gemrc
gem: --no-ri --no-rdoc
# ~/.gitconfig
[user]
name = me!
email = my email!
[push]
default = current
followTags = true
[merge]
tool = opendiff
conflictstyle = diff3
[diff]
tool = opendiff
[color]
ui = auto
[alias]
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cblue(%aN)%Creset %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
lgf = "!_() { local SHA=`git lg | fzf --no-sort --ansi | sed 's/^[^a-z0-9]*//;/^$/d' | awk '{print $1}'`; [ -n \"${SHA}\" ] && git show ${SHA}; }; _"
new = !bash -c 'git lg $1@{1}..$1@{0} "$@"'
show-deleted = "!_() { local HASH=`git rev-list --max-count=1 --all -- $1`; git show ${HASH}^:$1; }; _"
gone-branches = "!_() { git branch -vv | awk '$3 $4 ~ /:gone/ { print $1 }'; }; _"
check-conflicts = "!_() { set -x; local BRANCH=${1-master}; local BASE=`git merge-base HEAD $BRANCH`; git format-patch $BASE..$BRANCH --stdout | git apply --3way --check -; }; _"
root = "!pwd"
[core]
excludesfile = /Users/bmatcuk/.gitignore_global
[submodule]
recurse = true
# ~/.gitignore_global
*.swp
*.gem
*.byebug_history
.env.local
.DS_Store
# ~/.inputrc
set editing-mode vi
$if mode=vi
set keymap vi-command
Control-l: clear-screen
set keymap vi-insert
Control-l: clear-screen
$endif
; ~/.npmrc
save-prefix = "~"
" ~/.config/nvim/init.vim
" Recommended nvim 0.4.0+ (brew install --HEAD neovim)
"
" Install vim-plug first: https://github.com/junegunn/vim-plug
" Then start nvim with:
" nvim +PlugInstall +UpdateRemotePlugins
call plug#begin()
" general plugins
Plug 'tpope/vim-sensible'
Plug 'guns/xterm-color-table.vim'
Plug 'altercation/vim-colors-solarized'
Plug 'itchyny/lightline.vim'
Plug 'mengelbrecht/lightline-bufferline'
" added functionality
Plug 'Olical/vim-enmasse'
Plug 't9md/vim-choosewin'
Plug '/usr/local/opt/fzf'
Plug 'junegunn/fzf.vim'
Plug 'Shougo/defx.nvim'
Plug 'kristijanhusak/defx-icons'
Plug 'kristijanhusak/defx-git'
" editing
Plug 'vim-scripts/restore_view.vim'
Plug 'editorconfig/editorconfig-vim'
Plug 'sheerun/vim-polyglot'
Plug 'luochen1990/rainbow'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-unimpaired'
Plug 'wellle/targets.vim'
Plug 'godlygeek/tabular'
Plug 'tpope/vim-repeat'
Plug 'tpope/vim-speeddating'
Plug 'tpope/vim-abolish'
Plug 'tpope/vim-commentary'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'honza/vim-snippets'
call plug#end()
" pip3 install pynvim
let g:python3_host_prog='/usr/local/opt/python/bin/python3'
let g:python_host_prog='/usr/local/bin/python'
set tabstop=2
set expandtab
set shiftwidth=2
set softtabstop=2
set number
set relativenumber
set splitbelow
set splitright
set hidden
set showmatch
set hlsearch
set ignorecase
set smartcase
set list
set listchars=tab:··,trail:␠,nbsp:⎵,extends:>,precedes:<
set viewoptions=cursor,folds
set updatetime=250
set wildignore+=*/.git/*,*/tmp/*,*.swp
set shortmess+=c
set signcolumn=yes
set noshowmode
set showtabline=2
set background=dark
colorscheme solarized
let mapleader=","
nnoremap <silent> <leader>/ :nohlsearch<CR>
" brew install fzf
nnoremap <C-p> :Files<CR>
let g:fzf_layout = { 'down': '~30%' }
" brew install ripgrep
if executable('rg')
command! -nargs=* Rg
\ call fzf#vim#grep(
\ 'rg --column --line-number --no-heading --color=always --smart-case '.shellescape(<q-args>), 1,
\ fzf#vim#with_preview({'options': '--nth=4.. --delimiter=:'}, 'right:50%'),
\ 0)
" :grep! --args query
set grepprg=rg\ --vimgrep
let g:rg_derive_root = 1
nnoremap \ :Rg<CR>
nnoremap <leader>\ :Rg <C-r><C-w><CR>
endif
augroup mylocquickcmds
autocmd!
autocmd QuickFixCmdPost [^l]* cwindow
autocmd QuickFixCmdPost l* lwindow
augroup END
" lightline settings
let g:lightline#bufferline#unicode_symbols=1
let g:lightline#bufferline#unnamed='[No Name]'
let g:lightline = {
\ 'colorscheme': 'solarized',
\ 'separator': { 'left': '', 'right': '' },
\ 'subseparator': { 'left': '', 'right': '' },
\ 'active': {
\ 'left': [
\ ['mode', 'paste'],
\ ['git'],
\ ['readonly', 'filename', 'currentfunc']
\ ],
\ 'right': [
\ ['percent', 'line', 'column'],
\ ['fileencodingandformat'],
\ ['filetype'],
\ ['cocwarning', 'cocerror']
\ ]
\ },
\ 'inactive': {
\ 'left': [['relativepath']],
\ 'right': [
\ ['percent', 'line', 'column'],
\ ['fileencodingandformat'],
\ ['filetype']
\ ]
\ },
\ 'tabline': {
\ 'left': [['buffers']],
\ 'right': []
\ },
\ 'component': {
\ 'column': '%v',
\ 'filename': '%t%m',
\ 'fileencodingandformat': '%{&fenc!=#""?&fenc:&enc}[%{&ff}]',
\ 'line': '%l/%L ',
\ 'paste': '[%{&paste?"PASTE":""}]',
\ 'percent': '%3p%% ☰',
\ 'relativepath': '%f%m'
\ },
\ 'component_function': {
\ 'currentfunc': 'LightlineCurrentFunc',
\ 'git': 'LightlineGitStatus',
\ 'readonly': 'LightlineReadonly'
\ },
\ 'component_expand': {
\ 'buffers': 'lightline#bufferline#buffers',
\ 'cocerror': 'LightlineCocError',
\ 'cocwarning': 'LightlineCocWarning',
\ },
\ 'component_type': {
\ 'buffers': 'tabsel',
\ 'cocerror': 'error',
\ 'cocwarning': 'warning'
\ }
\}
function! LightlineReadonly()
return &readonly ? '' : ''
endfunction
function! LightlineGitStatus()
return get(g:, 'coc_git_status', '')
endfunction
function! LightlineCurrentFunc()
let l:func = get(b:, 'coc_current_function', '')
if empty(l:func)
return ''
endif
return '('.l:func.')'
endfunction
function! s:lightline_coc_diagnostic(kind, sign) abort
let info = get(b:, 'coc_diagnostic_info', 0)
if empty(info) || get(info, a:kind, 0) == 0
return ''
endif
return a:sign.' '.info[a:kind]
endfunction
function! LightlineCocError()
return s:lightline_coc_diagnostic('error', '')
endfunction
function! LightlineCocWarning()
return s:lightline_coc_diagnostic('warning', '')
endfunction
" update colors for lightline errors and warnings
function! s:patch_lightline_colorscheme() abort
try
let l:palette = g:lightline#colorscheme#{g:lightline.colorscheme}#palette
let l:palette.normal.error[0][2] = l:palette.normal.error[0][3]
let l:palette.normal.error[0][3] = '0'
let l:palette.normal.warning[0][2] = l:palette.normal.warning[0][3]
let l:palette.normal.warning[0][3] = '0'
catch
endtry
endfunction
call s:patch_lightline_colorscheme()
augroup mylightline
autocmd!
autocmd User CocDiagnosticChange call lightline#update()
autocmd ColorScheme * call s:patch_lightline_colorscheme()
augroup END
" execute macros over a visual selection with @x where x = macro register
xnoremap @ :<C-u>call ExecuteMacroOverVisualRange()<CR>
function! ExecuteMacroOverVisualRange()
echo "@".getcmdline()
execute ":'<,'>normal @".nr2char(getchar())
endfunction
" highlight current match with *, rather than moving to the next match
nnoremap <silent> * :let stay_star_view = winsaveview()<CR>*:call winrestview(stay_star_view)<CR>
" defx
nnoremap <silent> <leader>e :Defx `expand('%:p:h')` -search=`expand('%:p')` -columns='indent:git:icons:filename:type' -split=vertical -winwidth=50 -direction=topleft<CR>
augroup mydefx
autocmd!
autocmd FileType defx call s:defx_my_settings()
augroup END
function! s:defx_my_settings() abort
" Define mappings
nnoremap <silent><buffer><expr> <CR>
\ defx#is_directory() ?
\ defx#do_action('open') :
\ defx#do_action('multi', ['drop', 'quit'])
nnoremap <silent><buffer><expr> c
\ defx#do_action('copy')
nnoremap <silent><buffer><expr> m
\ defx#do_action('move')
nnoremap <silent><buffer><expr> p
\ defx#do_action('paste')
nnoremap <silent><buffer><expr> v
\ defx#do_action('multi', [['drop', 'vsplit'], 'quit'])
nnoremap <silent><buffer><expr> P
\ defx#do_action('open', 'pedit')
nnoremap <silent><buffer><expr> o
\ defx#do_action('open_or_close_tree')
nnoremap <silent><buffer><expr> K
\ defx#do_action('new_directory')
nnoremap <silent><buffer><expr> N
\ defx#do_action('new_multiple_files')
nnoremap <silent><buffer><expr> d
\ defx#do_action('remove')
nnoremap <silent><buffer><expr> r
\ defx#do_action('rename')
nnoremap <silent><buffer><expr> !
\ defx#do_action('execute_command')
nnoremap <silent><buffer><expr> x
\ defx#do_action('execute_system')
nnoremap <silent><buffer><expr> yy
\ defx#do_action('yank_path')
nnoremap <silent><buffer><expr> ;
\ defx#do_action('toggle_ignored_files')
nnoremap <silent><buffer><expr> .
\ defx#do_action('repeat')
nnoremap <silent><buffer><expr> <BS>
\ defx#do_action('cd', ['..'])
nnoremap <silent><buffer><expr> ~
\ defx#do_action('cd')
nnoremap <silent><buffer><expr> q
\ defx#do_action('quit')
nnoremap <silent><buffer><expr> <Space>
\ defx#do_action('toggle_select') . 'j'
nnoremap <silent><buffer><expr> *
\ defx#do_action('toggle_select_all')
nnoremap <silent><buffer><expr> j
\ line('.') == line('$') ? 'gg' : 'j'
nnoremap <silent><buffer><expr> k
\ line('.') == 1 ? 'G' : 'k'
nnoremap <silent><buffer><expr> <C-l>
\ defx#do_action('redraw')
nnoremap <silent><buffer><expr> <C-g>
\ defx#do_action('print')
nnoremap <silent><buffer><expr> cd
\ defx#do_action('change_vim_cwd')
endfunction
" choosewin
nmap - <Plug>(choosewin)
let g:choosewin_overlay_enable = 1
" coc
"
" coc - general extensions
let g:coc_global_extensions = [
\ 'coc-snippets',
\ 'coc-lists',
\ 'coc-git',
\ 'coc-yank',
\ 'coc-pairs',
\]
" coc - language extensions
let g:coc_global_extensions = extend(g:coc_global_extensions, [
\ 'coc-html',
\ 'coc-css',
\ 'coc-json',
\ 'coc-tsserver',
\ 'coc-go',
\ 'coc-rls',
\])
" coc - linter extensions
let g:coc_global_extensions = extend(g:coc_global_extensions, [
\ 'coc-eslint',
\ 'coc-stylelintplus',
\])
" coc - tab/stab to cycle through completions/snippet jump locations
inoremap <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
\ coc#expandableOrJumpable() ? "\<C-r>=coc#rpc#request('doKeymap', ['snippets-expand-jump', ''])\<CR>" :
\ "\<TAB>"
inoremap <silent><expr><S-TAB>
\ pumvisible() ? "\<C-p>" :
\ coc#expandableOrJumpable() ? "\<C-r>=coc#rpc#request('snippetPrev', [])\<CR>" :
\ "\<S-TAB>"
" coc - enter to confirm completion
inoremap <silent><expr> <cr>
\ pumvisible() ? coc#_select_confirm() :
\ "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
" coc - hide floats; restart (unfortunately, some extensions break every now and again)
nmap <silent> <leader>ch <Plug>(coc-float-hide)
nmap <silent> <leader>cr :<C-u>CocRestart<cr>
" coc - navigate diagnostics
nmap <silent> [c <Plug>(coc-diagnostic-prev)
nmap <silent> ]c <Plug>(coc-diagnostic-next)
" coc - goto mappings
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)
" coc - show documentation with K
" set keywordprg=:call\ <SID>show_documentation()
nmap <silent> <space>d <Plug>(coc-diagnostic-info)
nnoremap <silent> K :call <SID>show_documentation()<CR>
function! s:show_documentation()
if (index(['vim','help'], &filetype) >= 0)
execute 'h '.expand('<cword>')
else
call CocAction('doHover')
endif
endfunction
augroup mycoc
autocmd!
autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
" coc - highlight symbol under cursor on CursorHold
autocmd CursorHold * silent call CocActionAsync('highlight')
augroup END
" coc - mapping to rename current word
nmap <silent> <leader>rn <Plug>(coc-rename)
" coc - format region
xmap <silent> <leader>f <Plug>(coc-format-selected)
nmap <silent> <leader>f <Plug>(coc-format-selected)
" coc - format entire file using :Format
command! -nargs=0 Format :call CocAction('format')
" coc - code action on region
xmap <silent> <leader>a <Plug>(coc-codeaction-selected)
nmap <silent> <leader>a <Plug>(coc-codeaction-selected)
" coc - code action / fix current line
nmap <silent> <leader>ac <Plug>(coc-codeaction)
nmap <silent> <leader>qf <Plug>(coc-fix-current)
" coc list shortcuts
nnoremap <silent> <leader>be :<C-u>CocList --normal buffers<cr>
nnoremap <silent> <space>a :<C-u>CocList diagnostics<cr>
nnoremap <silent> <space>c :<C-u>CocList commands<cr>
nnoremap <silent> <space>h :<C-u>CocList cmdhistory<cr>
nnoremap <silent> <space>l :<C-u>CocList lists<cr>
nnoremap <silent> <space>m :<C-u>CocList marks<cr>
nnoremap <silent> <space>o :<C-u>CocList outline<cr>
nnoremap <silent> <space>r :<C-u>CocList mru<cr>
nnoremap <silent> <space>s :<C-u>CocList -I symbols<cr>
nnoremap <silent> <space>y :<C-u>CocList -A --normal yank<cr>
" custom colors
" :so $VIMRUNTIME/syntax/hitest.vim
highlight SignColumn ctermbg=0
highlight NonText ctermbg=8 ctermfg=239
highlight Whitespace ctermbg=8 ctermfg=239
highlight CocCodeLens ctermfg=240
highlight Pmenu cterm=none ctermfg=8 ctermbg=10
highlight link CocInfoFloat CocHintFloat
" filetype-specific
augroup myfilespecific
autocmd!
autocmd filetype crontab setlocal nobackup nowritebackup
autocmd filetype go setlocal noexpandtab
autocmd BufWritePre *.go :call CocAction('runCommand', 'editor.action.organizeImport')
autocmd BufEnter * :syntax sync fromstart
augroup END
" rainbow settings
let g:rainbow_active = 1
let g:rainbow_conf = {
\ 'guifgs': ['#df0000', '#df5f00', '#dfdf00', '#00af00', '#005fff', '#5f00ff', '#8700df'],
\ 'ctermfgs': ['160', '166', '184', '34', '27', '57', '92'],
\ 'operators': '_,_',
\ 'parentheses': ['start=/(/ end=/)/ fold', 'start=/\[/ end=/\]/ fold', 'start=/{/ end=/}/ fold'],
\ 'separately': {
\ '*': {},
\ 'tex': {
\ 'parentheses': ['start=/(/ end=/)/', 'start=/\[/ end=/\]/'],
\ },
\ 'vim': {
\ 'parentheses': ['start=/(/ end=/)/', 'start=/\[/ end=/\]/', 'start=/{/ end=/}/ fold', 'start=/(/ end=/)/ containedin=vimFuncBody', 'start=/\[/ end=/\]/ containedin=vimFuncBody', 'start=/{/ end=/}/ fold containedin=vimFuncBody'],
\ },
\ 'xml': {
\ 'parentheses': ['start=/\v\<\z([-_:a-zA-Z0-9]+)(\s+[-_:a-zA-Z0-9]+(\=("[^"]*"|'."'".'[^'."'".']*'."'".'))?)*\>/ end=#</\z1># fold'],
\ },
\ 'xhtml': {
\ 'parentheses': ['start=/\v\<\z([-_:a-zA-Z0-9]+)(\s+[-_:a-zA-Z0-9]+(\=("[^"]*"|'."'".'[^'."'".']*'."'".'))?)*\>/ end=#</\z1># fold'],
\ },
\ 'html': {
\ 'parentheses': ['start=/\v\<((area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)[ >])@!\z([-_:a-zA-Z0-9]+)(\s+[-_:a-zA-Z0-9]+(\=("[^"]*"|'."'".'[^'."'".']*'."'".'|[^ '."'".'"><=`]*))?)*\>/ end=#</\z1># fold'],
\ },
\ 'php': {
\ 'parentheses': ['start=/\v\<((area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)[ >])@!\z([-_:a-zA-Z0-9]+)(\s+[-_:a-zA-Z0-9]+(\=("[^"]*"|'."'".'[^'."'".']*'."'".'|[^ '."'".'"><=`]*))?)*\>/ end=#</\z1># fold', 'start=/(/ end=/)/ containedin=@htmlPreproc contains=@phpClTop', 'start=/\[/ end=/\]/ containedin=@htmlPreproc contains=@phpClTop', 'start=/{/ end=/}/ containedin=@htmlPreproc contains=@phpClTop'],
\ },
\ 'css': 0,
\ }
\}
# ~/.pylint.rc
# pip install pylint
[MASTER]
profile=no
persistent=yes
ignore=migrations
cache-size=500
[MESSAGES CONTROL]
# C0103 Invalid name (we use dashes in the filename for management commands)
# C0111 Missing docstring
# I0011 Warning locally suppressed using disable-msg
# I0012 Warning locally suppressed using disable-msg
# W0704 Except doesn't do anything Used when an except clause does nothing but "pass" and there is no "else" clause
# W0142 Used * or * magic* Used when a function or method is called using *args or **kwargs to dispatch arguments.
# W0212 Access to a protected member %s of a client class
# W0232 Class has no __init__ method Used when a class has no __init__ method, neither its parent classes.
# W0613 Unused argument %r Used when a function or method argument is not used.
# W0702 No exception's type specified Used when an except clause doesn't specify exceptions type to catch.
# R0201 Method could be a function
# E1101 This causes errors when using abstract base classes
# W0621 Redefining variable name from outer scope - def pets newline pets
# R0902 Too many instance attributes (is dumb re: test cases)
# R0904 Too many public methods (is dumb re: test cases)
# E1103 Has no attr but cannot infer some (dumb dumb)
# R0901 Too many ancestors (RoverTestCase children already exceed 8)
# E1120 No value passed for parameter (Class-based views always trigger this)
disable=C0103,C0111,I0011,I0012,W0704,W0142,W0212,W0232,W0613,W0702,R0201,E1101,W0621,R0904,E1103,R0902,R0801,R0901,E1120
[REPORTS]
output-format=parseable
include-ids=yes
[BASIC]
no-docstring-rgx=__.*__|_.*
class-rgx=[A-Z_][a-zA-Z0-9_]+$
function-rgx=[a-zA_][a-zA-Z0-9_]{2,70}$
method-rgx=[a-z_][a-zA-Z0-9_]{2,70}$
const-rgx=(([A-Z_][A-Z0-9_]*)|([a-z_][a-z0-9_]*)|(__.*__)|register|urlpatterns)$
good-names=_,i,j,k,e,pk,setUp,tearDown
[TYPECHECK]
# Tells whether missing members accessed in mixin class should be ignored. A
# mixin class is detected if its name ends with "mixin" (case insensitive).
ignore-mixin-members=yes
# List of classes names for which member attributes should not be checked
# (useful for classes with attributes dynamically set).
ignored-classes=SQLObject
# When zope mode is activated, add a predefined set of Zope acquired attributes
# to generated-members.
zope=no
# List of members which are set dynamically and missed by pylint inference
# system, and so shouldn't trigger E0201 when accessed.
generated-members=objects,DoesNotExist,id,pk,_meta,base_fields,context
# List of method names used to declare (i.e. assign) instance attributes
defining-attr-methods=__init__,__new__,setUp
[VARIABLES]
init-import=no
dummy-variables-rgx=_|dummy|i|j|k
[SIMILARITIES]
min-similarity-lines=6
ignore-comments=yes
ignore-docstrings=yes
[MISCELLANEOUS]
notes=FIXME,XXX,TODO
[FORMAT]
max-line-length=160
max-module-lines=500
indent-string=' '
[DESIGN]
max-args=10
max-locals=15
max-returns=6
max-branchs=12
max-statements=50
max-parents=7
max-attributes=7
min-public-methods=0
max-public-methods=50
---
# ~/.reek.yml
detectors:
TooManyStatements:
max_statements: 20
directories:
"app/controllers":
IrresponsibleModule:
enabled: false
NestedIterators:
max_allowed_nesting: 2
UnusedPrivateMethod:
enabled: false
InstanceVariableAssumption:
enabled: false
"app/helpers":
IrresponsibleModule:
enabled: false
UtilityFunction:
enabled: false
"app/mailers":
InstanceVariableAssumption:
enabled: false
"db/migrate":
FeatureEnvy:
enabled: false
IrresponsibleModule:
enabled: false
UncommunicativeVariableName:
enabled: false
---
# ~/.rubocop.yml
require: rubocop-rspec
AllCops:
Exclude:
- 'bin/**/*'
- 'db/schema.rb'
TargetRubyVersion: 2.6
Documentation:
Enabled: false
Metrics/LineLength:
Max: 150
Metrics/MethodLength:
Max: 20
Metrics/AbcSize:
Max: 30
Style/ClassAndModuleChildren:
Enabled: false
Layout/IndentArray:
EnforcedStyle: consistent
Style/NumericLiterals:
MinDigits: 7
Style/RaiseArgs:
EnforcedStyle: compact
# ~/.ssh/config
Host trustedhost.com
ForwardAgent yes
Host anotherident.com
IdentityFile ~/.ssh/different_key
Host *
AddKeysToAgent yes
ControlMaster auto
ControlPath "/tmp/ssh-%r@%h:%p"
ControlPersist 5m
SendEnv LANG LC_*
ServerAliveInterval 120
---
# ~/.stylelintrc.yml
# npm install stylelint stylelint-config-standard -g
extends: /usr/local/lib/node_modules/stylelint-config-standard
# ~/.tigrc
set show-changes = true
set ignore-case = true
set git-colors = no
# Solarized Dark color scheme influenced by altercation/vim-colors-solarized and tpope/vim-fugitive
color "---" default default
color "diff --" yellow default
color "--- " yellow default
color "+++ " yellow default
color "@@" blue default
color "+" green default
color " +" green default
color "-" red default
color " -" red default
color "index " red default
color "old file mode " yellow default
color "new file mode " yellow default
color "deleted file mode " yellow default
color "copy from " yellow default
color "copy to " yellow default
color "rename from " yellow default
color "rename to " yellow default
color "similarity " yellow default
color "dissimilarity " yellow default
color "diff-tree " yellow default
color "Author: " blue default
color "Commit: " blue default
color "Tagger: " blue default
color "Merge: " blue default
color "Date: " blue default
color "AuthorDate: " blue default
color "CommitDate: " blue default
color "TaggerDate: " blue default
color "Refs: " blue default
color "Reflog: " blue default
color "Reflog message: " blue default
color "stash@{" blue default
color "commit " green default
color "parent " green default
color "tree " green default
color "author " green default
color "committer " green default
color " Signed-off-by" green default
color " Acked-by" green default
color " Tested-by" green default
color " Reviewed-by" green default
color default 14 8 normal
color cursor default default reverse
color status 10 0
color delimiter default default
color date cyan default
color mode cyan default
color id blue default
color overflow 10 0
color header yellow default
color section yellow default
color directory yellow default
color file yellow default
color grep.file yellow default
color file-size default default
color line-number 10 0
color title-blur 0 11
color title-focus white 3 bold
color main-commit default default
color main-tag 11 default
color main-local-tag 11 default
color main-remote yellow default
color main-replace yellow default
color main-tracked yellow default bold
color main-ref yellow default
color main-head yellow default bold
color stat-none default default
color stat-staged 10 default bold
color stat-unstaged red default bold
color stat-untracked 7 default bold
color help-group blue default
color help-action yellow default
color diff-stat default default
color palette-0 default default
color palette-1 7 default
color palette-2 white default
color palette-3 cyan default
color palette-4 blue default
color palette-5 yellow default
color palette-6 green default
color palette-7 default default bold
color palette-8 7 default bold
color palette-9 white default bold
color palette-10 cyan default bold
color palette-11 blue default bold
color palette-12 yellow default bold
color palette-13 green default bold
color graph-commit default default
color search-result 8 yellow
# Reconstructed via infocmp from file: /usr/local/Cellar/ncurses/6.1/share/terminfo/74/tmux-256color
# Changes are:
# * it#2 instead of it#8
# * pairs#32767 because it seems larger values are not supported
# * use=alacritty-direct to inherit anything that's not overridden
#
# Install with `sudo tic -xe tmux-256color tmux-256color.terminfo`
#
# Don't forget to also install alacritty's terminfo
# (it's in the extra directory of their git repo)
tmux-256color|tmux with 256 colors,
am, hs, km, mir, msgr, xenl,
colors#0x100, cols#80, it#2, lines#24, pairs#32767,
acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
clear=\E[H\E[J, cnorm=\E[34h\E[?25h, cr=\r,
csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C,
cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\EM,
cvvis=\E[34l, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m,
dl=\E[%p1%dM, dl1=\E[M, dsl=\E]0;\007, ed=\E[J, el=\E[K,
el1=\E[1K, enacs=\E(B\E)0, flash=\Eg, fsl=^G, home=\E[H,
hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@,
il=\E[%p1%dL, il1=\E[L, ind=\n, indn=\E[%p1%dS,
invis=\E[8m, is2=\E)0, kDC=\E[3;2~, kEND=\E[1;2F,
kHOM=\E[1;2H, kIC=\E[2;2~, kLFT=\E[1;2D, kNXT=\E[6;2~,
kPRV=\E[5;2~, kRIT=\E[1;2C, kbs=^H, kcbt=\E[Z, kcub1=\EOD,
kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kdch1=\E[3~,
kend=\E[4~, kf1=\EOP, kf10=\E[21~, kf11=\E[23~,
kf12=\E[24~, kf13=\E[1;2P, kf14=\E[1;2Q, kf15=\E[1;2R,
kf16=\E[1;2S, kf17=\E[15;2~, kf18=\E[17;2~,
kf19=\E[18;2~, kf2=\EOQ, kf20=\E[19;2~, kf21=\E[20;2~,
kf22=\E[21;2~, kf23=\E[23;2~, kf24=\E[24;2~,
kf25=\E[1;5P, kf26=\E[1;5Q, kf27=\E[1;5R, kf28=\E[1;5S,
kf29=\E[15;5~, kf3=\EOR, kf30=\E[17;5~, kf31=\E[18;5~,
kf32=\E[19;5~, kf33=\E[20;5~, kf34=\E[21;5~,
kf35=\E[23;5~, kf36=\E[24;5~, kf37=\E[1;6P, kf38=\E[1;6Q,
kf39=\E[1;6R, kf4=\EOS, kf40=\E[1;6S, kf41=\E[15;6~,
kf42=\E[17;6~, kf43=\E[18;6~, kf44=\E[19;6~,
kf45=\E[20;6~, kf46=\E[21;6~, kf47=\E[23;6~,
kf48=\E[24;6~, kf49=\E[1;3P, kf5=\E[15~, kf50=\E[1;3Q,
kf51=\E[1;3R, kf52=\E[1;3S, kf53=\E[15;3~, kf54=\E[17;3~,
kf55=\E[18;3~, kf56=\E[19;3~, kf57=\E[20;3~,
kf58=\E[21;3~, kf59=\E[23;3~, kf6=\E[17~, kf60=\E[24;3~,
kf61=\E[1;4P, kf62=\E[1;4Q, kf63=\E[1;4R, kf7=\E[18~,
kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kich1=\E[2~,
kind=\E[1;2B, kmous=\E[M, knp=\E[6~, kpp=\E[5~,
kri=\E[1;2A, nel=\EE, op=\E[39;49m, rc=\E8, rev=\E[7m,
ri=\EM, ritm=\E[23m, rmacs=^O, rmcup=\E[?1049l, rmir=\E[4l,
rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m,
rs2=\Ec\E[?1000l\E[?25h, sc=\E7,
setab=\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m,
setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m,
sgr=\E[0%?%p6%t;1%;%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t; 5%;%?%p5%t;2%;m%?%p9%t\016%e\017%;,
sgr0=\E[m\017, sitm=\E[3m, smacs=^N, smcup=\E[?1049h,
smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m,
tbc=\E[3g, tsl=\E]0;, vpa=\E[%i%p1%dd,
use=alacritty-direct,
# ~/.tmux.conf
# use vi keys for different modes
set -g status-keys vi
setw -g mode-keys vi
# set base index to 1 for windows so it's easier to change quickly
set -g base-index 1
set -g renumber-windows on
# monitor windows for activity
setw -g monitor-activity on
# no delay after hitting escape
set -sg escape-time 0
# misc
set -g history-limit 10000
set -g default-terminal "tmux-256color"
set -g repeat-time 200
# status line settings
set -g display-time 1000
set -g status-left ""
set -g status-left-length 0
set -g status-right ""
set -g status-right-length 0
set -g status-style "bg=colour53,fg=colour15,bold"
# styles - run :XtermColorTable in vim for color options
set -g message-style "bg=colour51,fg=colour16,bold"
set -g message-command-style "bg=colour234,fg=colour51"
set -g pane-active-border-style "fg=colour6"
set -g pane-border-style "fg=colour235"
set -g mode-style "bg=colour208,fg=colour16,bold"
set -g window-status-activity-style "bg=colour91"
set -g window-status-bell-style "bg=colour52"
# copy buffer <-> clipboard
bind C-c run "tmux save-buffer - | pbcopy"
bind C-v run "pbpaste | tmux load-buffer - ';' paste-buffer -d"
# move windows
bind C-S-Left swap-window -t -1
bind C-S-Right swap-window -t +1
# toggle synchronize-panes
bind ` setw synchronize-panes
# clear screen
bind C-l send-keys \; clear-history
# ~/.yarnrc
# Add the following to the bottom of the file
save-prefix "~"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.