Last active
September 3, 2021 02:36
-
-
Save sgoedecke/ab6a740dd6bf0cdb7abfbd02f9b2b399 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- stack | |
zsh, nvim, tmux | |
--- .vimrc | |
source ~/.vim/autoload/pathogen.vim | |
execute pathogen#infect() | |
call pathogen#helptags() | |
filetype indent plugin on | |
syntax on | |
set ignorecase | |
set smartcase | |
set number | |
set shiftwidth=2 | |
set expandtab | |
set tabstop=4 | |
set mouse=a | |
set autoread | |
set noshowmode | |
set showcmd | |
set background=dark | |
colorscheme gruvbox | |
set clipboard^=unnamed | |
let g:airline#extensions#tabline#enabled = 1 | |
let g:airline_powerline_fonts = 0 | |
let g:airline_theme='zenburn' | |
let mapleader = " " | |
map <Leader>l :Ag<CR> | |
map <Leader>p :FZF<CR> | |
map <Leader>f :%s/ | |
nnoremap <silent> <BS> :TmuxNavigateLeft<cr> | |
--- .tmux.conf (updated for 2.9) | |
# remap prefix from 'C-b' to 'C-d' | |
unbind C-b | |
set-option -g prefix C-d | |
bind-key C-d send-prefix | |
# split panes using | and - | |
bind \\ split-window -h | |
bind - split-window -v | |
unbind '"' | |
unbind % | |
set -sg escape-time 0 | |
# Enable mouse mode (tmux 2.1 and above) | |
set -g mouse on | |
# pane resizing with vim bindings | |
bind j resize-pane -D 10 | |
bind k resize-pane -U 10 | |
bind l resize-pane -R 10 | |
bind h resize-pane -L 10 | |
# stop asking before killing windows/panes | |
bind-key & kill-window | |
bind-key x kill-pane | |
# open current pane scrollback in nvim | |
bind-key O command-prompt -p "Open scrollback in nvim?" 'capture-pane -S -32768 ; save-buffer /tmp/tmux.history ; delete-buffer ; split-window "nvim /tmp/tmux.history"' | |
# reload config file (change file location to your the tmux.conf you want to use) | |
bind r source-file ~/.tmux.conf | |
set-option -g default-shell /bin/zsh | |
set -g default-terminal "screen-256color" | |
set -g focus-events on | |
set -g status-right "" | |
set -g status-left "" | |
set -g status-style bg=colour237,fg=colour137,dim | |
set -g status-justify centre | |
setw -g window-status-current-style fg=colour1,bg=colour13,bold | |
setw -g window-status-current-format ' #I#[fg=colour249]:#[fg=colour255]#W#[fg=colour249]#F ' | |
setw -g window-status-style fg=colour9,bg=colour8,none | |
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F ' | |
set -g pane-active-border-style fg=colour13 | |
set -g pane-border-style fg=colour8 | |
# 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 | |
--- apt-vim | |
sgoedecke:zendesk_app_market/ (master) $ apt-vim list [14:24:57] | |
Installed packages: | |
ag.vim | |
fzf | |
nerdtree | |
pathogen | |
tagbar | |
vim-airline | |
vim-airline-themes | |
vim-colorschemes | |
vim-crystal | |
vim-javascript | |
vim-jsx | |
vim-signify | |
vim-tmux-navigator | |
$ sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
then ZSH_THEME=pygmalion
brew install the_silver_searcher
apt-vim install -y https://github.com/rking/ag.vim.git https://github.com/junegunn/fzf.vim.git https://github.com/preservim/nerdtree.git https://github.com/christoomey/vim-tmux-navigator.git https://github.com/mhinz/vim-signify.git https://github.com/vim-airline/vim-airline.git https://github.com/flazz/vim-colorschemes
symlink .vimrc to ~/.config/nvim/init.vim
ln -s ~/.vim/bundle/ ~/.config/nvim # symlink the bundle folder to nvim's path
Install tmux-yank manually for tmux copying behaviour: https://github.com/tmux-plugins/tmux-yank#manual-installation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
scm-breeze: https://github.com/scmbreeze/scm_breeze#installation