Skip to content

Instantly share code, notes, and snippets.

@SViccari
Last active July 26, 2021 19:58
Show Gist options
  • Save SViccari/d20fddd065c302e8927163af428c148a to your computer and use it in GitHub Desktop.
Save SViccari/d20fddd065c302e8927163af428c148a to your computer and use it in GitHub Desktop.
Machine Customizations
# This is Git's per-user configuration file.
[user]
name = Stephanie Viccari
email = stephviccari@gmail.com
[core]
editor = /usr/bin/vim
[push]
default = current
[url "https://"]
insteadOf = git://
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[commit]
template = ~/.gitmessage
[alias]
history = log --pretty=format:'%C(yellow)%h%C(reset) - %an [%C(green)%ar%C(reset)] %s'
sl = log --oneline --decorate -20
sla = log --oneline --decorate --graph --all -20
slap = log --oneline --decorate --graph --all
bind-key C-j choose-session
# Split window vertical or horizontal
bind-key - split-window -v -c '#{pane_current_path}'
bind-key \\ split-window -h -c '#{pane_current_path}'
# Dismiss current pane to background window
bind-key b break-pane -d
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind-key -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
bind-key -T copy-mode-vi C-h select-pane -L
bind-key -T copy-mode-vi C-j select-pane -D
bind-key -T copy-mode-vi C-k select-pane -U
bind-key -T copy-mode-vi C-l select-pane -R
bind-key -T copy-mode-vi C-\ select-pane -l
# Remap the readline key binding for clearing the screen
bind C-l send-keys 'C-l'
# Apply tmux copied text to Mac OS clipboard
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Setup 'v' to begin selection as in Vim
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-pipe "reattach-to-user-namespace pbcopy"
# Update default binding of `Enter` to also use copy-pipe
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe "reattach-to-user-namespace pbcopy"
Plug 'christoomey/vim-tmux-navigator'
Plug 'tpope/vim-vinegar'
" Maps ctrl+p to open fuzzy search via FZF
nnoremap <c-p> :Files<cr>
" show hidden files and hide gitignored files
let $FZF_DEFAULT_COMMAND = 'ag -g "" --hidden'
" jumps to the compiler/lint error
nmap <silent> [r <Plug>(ale_previous_wrap)
nmap <silent> ]r <Plug>(ale_next_wrap)
UnPlug 'ctrlp.vim'
" Protip, to source vimrc, run :source $MYVIMRC
" Keeps `ruby` enabled as a linter for syntax violations, but disables rubocop
" in ale. Note that this disables rubocop for all vim sessions.
let g:ale_linters = {
\ 'ruby': ['ruby'],
\}
" highlight all search matches
set hlsearch
export PATH="$(brew --prefix qt@5.5)/bin:$PATH"
. $HOME/.asdf/asdf.sh
export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"
export KERL_CONFIGURE_OPTIONS="--with-ssl=$(brew --prefix openssl)"
# Starship Cross-Shell Prompts: https://starship.rs
eval "$(starship init zsh)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment