mirror of
https://github.com/casjaysdevdocker/vim
synced 2025-09-18 21:57:47 -04:00
🦈🏠🐜❗ Initial Commit ❗🐜🦈🏠
This commit is contained in:
50
config/bashrc
Normal file
50
config/bashrc
Normal file
@@ -0,0 +1,50 @@
|
||||
#!/usr/bin/env bash
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
##@Version : 202207052258-git
|
||||
# @Author : Jason Hempstead
|
||||
# @Contact : jason@casjaysdev.com
|
||||
# @License : LICENSE.md
|
||||
# @ReadME : bashrc --help
|
||||
# @Copyright : Copyright: (c) 2022 Jason Hempstead, Casjays Developments
|
||||
# @Created : Tuesday, Jul 05, 2022 22:58 EDT
|
||||
# @File : bashrc
|
||||
# @Description :
|
||||
# @TODO :
|
||||
# @Other :
|
||||
# @Resource :
|
||||
# @sudo/root : no
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
export HISTCONTROL='ignoreboth'
|
||||
export HISTFILE="$HOME/.bash_history"
|
||||
export HISTSIZE=1000
|
||||
export HISTTIMEFORMAT='[%F (%X)]: '
|
||||
export TIMEFORMAT='%3R'
|
||||
export LS_COLORS='fi=37:di=1;97:ln=90:mh=90:ex=3;2;37:no=1;97:mi=90:ow=91'
|
||||
export GREP_COLOR='1;91'
|
||||
export SUDO_EDITOR='/usr/bin/vim'
|
||||
export TERM='xterm-256color'
|
||||
|
||||
# Pretty-print man(1) pages.
|
||||
export LESS_TERMCAP_mb=$'\e[1;91m'
|
||||
export LESS_TERMCAP_md=$'\e[1;91m'
|
||||
export LESS_TERMCAP_me=$'\e[0m'
|
||||
export LESS_TERMCAP_ue=$'\e[0m'
|
||||
export LESS_TERMCAP_so=$'\e[1;93m'
|
||||
export LESS_TERMCAP_se=$'\e[0m'
|
||||
export LESS_TERMCAP_us=$'\e[1;92m'
|
||||
|
||||
# aliases
|
||||
alias :q='exit'
|
||||
alias q='exit'
|
||||
alias t='tmux '
|
||||
alias v='vim '
|
||||
alias sv='sudo vim '
|
||||
|
||||
# completions
|
||||
UsrBashComp='/usr/share/bash-completion/bash_completion'
|
||||
[[ -f $UsrBashComp && -r $UsrBashComp ]] && . "$UsrBashComp"
|
||||
|
||||
BCFuncs="$HOME/.bash_functions"
|
||||
[[ -f $BCFuncs && -r $BCFuncs ]] && . "$BCFuncs"
|
||||
|
||||
unset BCAliases BCFuncs UsrBashComp
|
20
config/resurrect
Normal file
20
config/resurrect
Normal file
@@ -0,0 +1,20 @@
|
||||
pane 0 1 1 :* 1 :~ 1 bash :
|
||||
pane 0 2 0 :- 1 :~ 1 bash :
|
||||
pane 0 3 0 : 1 :~ 1 bash :
|
||||
pane 0 4 0 : 1 :~ 1 bash :
|
||||
pane 0 5 0 : 1 :~ 1 bash :
|
||||
pane 0 6 0 : 1 :~ 1 bash :
|
||||
pane 0 7 0 : 1 :~ 1 bash :
|
||||
pane 0 8 0 : 1 :~ 1 bash :
|
||||
pane 0 9 0 : 1 :~ 0 bash :
|
||||
pane 0 9 0 : 2 :~ 1 bash :
|
||||
window 0 1 :main 1 :* ac3e,170x40,0,0,1 off
|
||||
window 0 2 :dev 0 :- ac3f,170x40,0,0,2 off
|
||||
window 0 3 :dev 0 : ac40,170x40,0,0,3 off
|
||||
window 0 4 :test 0 : ac41,170x40,0,0,4 off
|
||||
window 0 5 :www 0 : ac42,170x40,0,0,5 off
|
||||
window 0 6 :ssh 0 : ac43,170x40,0,0,6 off
|
||||
window 0 7 :ssh 0 : ac44,170x40,0,0,7 off
|
||||
window 0 8 :media 0 : ac45,170x40,0,0,8 off
|
||||
window 0 9 :other 0 : 070d,170x40,0,0[170x20,0,0,9,170x19,0,21,10] off
|
||||
state 0
|
240
config/tmux.conf
Normal file
240
config/tmux.conf
Normal file
@@ -0,0 +1,240 @@
|
||||
# Override LC and LANG
|
||||
set-environment -g LANG 'en_US.UTF-8'
|
||||
set-environment -g LC_ALL 'en_US.UTF-8'
|
||||
set-environment -g LC_CTYPE 'en_US.UTF-8'
|
||||
# plugins
|
||||
set-environment -g TMUX_PLUGIN_MANAGER_PATH '~/.local/share/tmux/plugins'
|
||||
set -g @plugin 'tmux-plugins/tpm'
|
||||
set -g @plugin 'jabirali/tmux-tilish'
|
||||
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
|
||||
set -g @plugin 'tmux-plugins/tmux-online-status'
|
||||
set -g @plugin 'tmux-plugins/tmux-sidebar'
|
||||
set -g @plugin 'tmux-plugins/tmux-open'
|
||||
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||||
set -g @plugin 'tmux-plugins/tmux-continuum'
|
||||
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
|
||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||
set -g @plugin 'tmux-plugins/tmux-pain-control'
|
||||
set -g @plugin 'christoomey/tmux-navigator'
|
||||
set -g @plugin 'kristijanhusak/tmux-simple-git-status'
|
||||
set -g @plugin 'chriszarate/tmux-tasks'
|
||||
|
||||
# Set the prefix to Ctrl+a
|
||||
unbind C-b
|
||||
set-option -g prefix C-a
|
||||
bind-key C-a send-prefix
|
||||
|
||||
# nested tmux, obey me
|
||||
bind-key a send-prefix
|
||||
|
||||
# set default shell
|
||||
set -g default-command bash
|
||||
|
||||
# set theme
|
||||
color_orange="colour166" # 208, 166
|
||||
color_purple="colour134" # 135, 134
|
||||
color_green="colour076" # 070
|
||||
color_blue="colour39"
|
||||
color_yellow="colour220"
|
||||
color_red="colour160"
|
||||
color_black="colour232"
|
||||
color_white="white" # 015
|
||||
|
||||
# Change values, but not remove/rename variables itself
|
||||
color_dark="$color_black"
|
||||
color_light="$color_white"
|
||||
color_session_text="$color_blue"
|
||||
color_status_text="colour245"
|
||||
color_main="$color_orange"
|
||||
color_secondary="$color_purple"
|
||||
color_level_ok="$color_green"
|
||||
color_level_warn="$color_yellow"
|
||||
color_level_stress="$color_red"
|
||||
color_window_off_indicator="colour088"
|
||||
color_window_off_status_bg="colour238"
|
||||
color_window_off_status_current_bg="colour254"
|
||||
set-option -g mode-style "fg=default,bg=$color_main"
|
||||
set-option -g message-style "fg=$color_main,bg=$color_dark"
|
||||
|
||||
# All kind of nice options
|
||||
set-option -g default-terminal "screen-256color"
|
||||
set-option -g history-limit 100000
|
||||
set-option -g repeat-time 500
|
||||
set-option -g terminal-overrides 'xterm*:smcup@:rmcup@'
|
||||
set-option -ga terminal-overrides ',xterm*:smcup@:rmcup@'
|
||||
set-option -g base-index 1
|
||||
set-option -g update-environment -r
|
||||
|
||||
# titles
|
||||
set-option -g set-titles on
|
||||
set-option -g set-titles-string "#T"
|
||||
|
||||
# Window options
|
||||
set-option -g allow-rename on
|
||||
set-option -g base-index 1
|
||||
set-window-option -g pane-base-index 1
|
||||
set-window-option -g renumber-windows on
|
||||
set-window-option -g monitor-activity on
|
||||
set-window-option -g xterm-keys on
|
||||
set-window-option -g automatic-rename on
|
||||
set-window-option -g aggressive-resize off
|
||||
set-window-option -g pane-base-index 1
|
||||
|
||||
# Remap keys to my settings
|
||||
unbind-key d ; bind-key d detach-client
|
||||
unbind-key Tab ; bind-key Tab choose-window
|
||||
unbind-key t ; bind-key t new-window
|
||||
unbind-key ` ; bind-key ` last-window
|
||||
unbind-key n ; bind-key n next-window
|
||||
unbind-key p ; bind-key p previous-window
|
||||
#unbind-key , ; bind-key , rename-window
|
||||
|
||||
# Window selection
|
||||
unbind-key 1 ; bind-key 1 select-window -t 1
|
||||
unbind-key 2 ; bind-key 2 select-window -t 2
|
||||
unbind-key 3 ; bind-key 3 select-window -t 3
|
||||
unbind-key 4 ; bind-key 4 select-window -t 4
|
||||
unbind-key 5 ; bind-key 5 select-window -t 5
|
||||
unbind-key 6 ; bind-key 6 select-window -t 6
|
||||
unbind-key 7 ; bind-key 7 select-window -t 7
|
||||
unbind-key 8 ; bind-key 8 select-window -t 8
|
||||
unbind-key 9 ; bind-key 9 select-window -t 9
|
||||
|
||||
# Window splitting
|
||||
unbind-key \ ; bind-key \ split-window -c "#{pane_current_path}" -h
|
||||
unbind-key / ; bind-key / split-window -c "#{pane_current_path}" -v
|
||||
|
||||
# Pane selection and resizing
|
||||
unbind-key left ; bind-key left select-pane -L
|
||||
unbind-key up ; bind-key up select-pane -U
|
||||
unbind-key down ; bind-key down select-pane -D
|
||||
unbind-key right ; bind-key right select-pane -R
|
||||
unbind-key C-h ; bind-key C-h select-pane -L
|
||||
unbind-key C-k ; bind-key C-k select-pane -U
|
||||
unbind-key C-j ; bind-key C-j select-pane -D
|
||||
unbind-key C-l ; bind-key C-l select-pane -R
|
||||
unbind-key j ; bind-key -r j resize-pane -D 5
|
||||
unbind-key k ; bind-key -r k resize-pane -U 5
|
||||
unbind-key h ; bind-key -r h resize-pane -L 5
|
||||
unbind-key l ; bind-key -r l resize-pane -R 5
|
||||
unbind-key C-left ; bind-key -r C-left resize-pane -L 1
|
||||
unbind-key C-right ; bind-key -r C-right resize-pane -R 1
|
||||
unbind-key C-up ; bind-key -r C-up resize-pane -U 1
|
||||
unbind-key C-down ; bind-key -r C-down resize-pane -D 1
|
||||
unbind-key @ ; bind-key @ confirm-before kill-window
|
||||
unbind-key ? ; bind-key ? list-keys
|
||||
|
||||
# Set that stupid Esc-Wait off, so VI works again
|
||||
set-option -sg escape-time 0
|
||||
|
||||
# set mode either vi or emacs
|
||||
set-window-option -g mode-keys emacs
|
||||
|
||||
# Source setup file
|
||||
bind-key r source-file ~/.tmux.conf \; display-message 'source ~/.tmux.conf'
|
||||
bind-key C-r source-file ~/.tmux.conf \; display-message 'source ~/.tmux.conf'
|
||||
|
||||
# Shift arrow to switch windows
|
||||
bind -n S-Left previous-window
|
||||
bind -n S-Right next-window
|
||||
|
||||
# system clipboard
|
||||
#bind C-c run "tmux save-buffer - | xclip -i -sel clipboard"
|
||||
#bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
|
||||
|
||||
# copy/paste
|
||||
set-option -g @copy_use_osc52_fallback on
|
||||
|
||||
# mouse support
|
||||
set-window-option -g mouse on
|
||||
unbind-key m ; bind-key m run "mouse-toggle"
|
||||
|
||||
# Select layout
|
||||
bind-key w command-prompt -p "tiled/even-horizontal/even-vertical/main-horizontal/main-vertical?" "select-layout '%%'"
|
||||
|
||||
# Zoom tmux pane with '+' key
|
||||
bind + resize-pane -Z
|
||||
|
||||
# Message display time (ms)
|
||||
set-option -g display-time 2000
|
||||
|
||||
# Notification
|
||||
set-window-option -g monitor-activity on
|
||||
set-option -g visual-activity on
|
||||
set-option -g bell-action any
|
||||
set-option -g visual-bell on
|
||||
|
||||
# Plugin properties
|
||||
set -g @tilish-navigate 'on'
|
||||
set -g @sidebar-tree 't'
|
||||
set -g @sidebar-tree-focus 'T'
|
||||
set -g @sidebar-tree-command 'tree -C'
|
||||
set -g @sidebar-tree-position 'right'
|
||||
|
||||
## tmux prefix highlight
|
||||
set -g @prefix_highlight_show_copy_mode 'on'
|
||||
set -g @prefix_highlight_prefix_prompt 'PRE'
|
||||
set -g @prefix_highlight_copy_prompt 'COPY'
|
||||
set -g @prefix_highlight_sync_prompt 'SYNC'
|
||||
set -g @prefix_highlight_empty_prompt 'TMUX'
|
||||
|
||||
# tmux continuum
|
||||
set -g @continuum-restore 'on'
|
||||
set -g @continuum-save-interval '5'
|
||||
|
||||
# tmux resurrect
|
||||
set -g @resurrect-dir '~/.cache/resurrect'
|
||||
set -g @resurrect-save 'S'
|
||||
set -g @resurrect-restore 'R'
|
||||
set -g @resurrect-hook-post-save-all 'eval $(xdotool getwindowgeometry --shell $WINDOWID); echo 0,$X,$Y,$WIDTH,$HEIGHT > ~/.cache/resurrect/geometry'
|
||||
set -g @resurrect-hook-pre-restore-all 'wmctrl -i -r $WINDOWID -e $(cat ~/.cache/resurrect/geometry)'
|
||||
|
||||
# Task manager
|
||||
set -g @tasks_manager 'taskwarrior'
|
||||
set -g @tasks_format_begin '#[fg=orange,bg=#f8f8f2]'
|
||||
set -g @tasks_format_end '#[fg=white,bg=#44475a]'
|
||||
set -g @tasks_icon_urgent '🔥'
|
||||
set -g @tasks_icon_outstanding '+'
|
||||
|
||||
# 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'
|
||||
tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")'
|
||||
if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \
|
||||
"bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\' 'select-pane -l'"
|
||||
if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \
|
||||
"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
|
||||
|
||||
# general status bar settings
|
||||
set-option -g status on
|
||||
set-option -g status-interval 2
|
||||
set-option -g status-position "bottom"
|
||||
set-option -g status-justify "centre"
|
||||
set-option -g status-left-length 120
|
||||
set-option -g status-right-length 120
|
||||
set -g status-style "fg=$color_status_text,bg=$color_dark"
|
||||
set -g window-status-separator ''
|
||||
set -g status-left ' #{prefix_highlight} | Sess:#S | #(whoami)@#H | #{tasks_status} |#{simple_git_status}'
|
||||
set -g status-right '#(echo -n "$(weather)" | Continuum: #{continuum_status} | %a %m/%d %H:%M '
|
||||
set -g window-status-format ' #I:#W '
|
||||
set -g window-status-current-format ' #W '
|
||||
setw -g window-status-activity-style "fg=$color_main"
|
||||
setw -g window-status-current-style "fg=$color_light,bold,bg=$color_main"
|
||||
|
||||
# import user config
|
||||
if '[ -f ~/.tmux.local ]' 'source ~/.tmux.local'
|
||||
|
||||
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
||||
if "test ! -d ~/.local/share/tmux/tpm/.git" "run '/usr/local/bin/tmux-plugins'"
|
||||
if "test -f ~/.local/share/tmux/tpm/tpm" "run '~/usr/local/bin/tmux-plugins'"
|
50
config/vimrc
Normal file
50
config/vimrc
Normal file
@@ -0,0 +1,50 @@
|
||||
" enable syntax highlighting
|
||||
syntax enable
|
||||
|
||||
" show line numbers
|
||||
set number
|
||||
|
||||
" set tabs to have 4 spaces
|
||||
set ts=4
|
||||
|
||||
" indent when moving to the next line while writing code
|
||||
set autoindent
|
||||
|
||||
" expand tabs into spaces
|
||||
set expandtab
|
||||
|
||||
" when using the >> or << commands, shift lines by 4 spaces
|
||||
set shiftwidth=4
|
||||
|
||||
" show a visual line under the cursor's current line
|
||||
set cursorline
|
||||
|
||||
" show the matching part of the pair for [] {} and ()
|
||||
set showmatch
|
||||
|
||||
" enable higligting search results
|
||||
set hlsearch
|
||||
|
||||
" enable incremental search
|
||||
set incsearch
|
||||
|
||||
"
|
||||
set colorcolumn=120
|
||||
|
||||
if empty(glob('~/.vim/autoload/plug.vim'))
|
||||
silent !curl -q -LSsf -o ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
||||
endif
|
||||
|
||||
call plug#begin('~/.vim/plugged')
|
||||
Plug 'editorconfig/editorconfig-vim'
|
||||
Plug 'vim-airline/vim-airline'
|
||||
|
||||
" fuzzy finder
|
||||
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
|
||||
Plug 'junegunn/fzf.vim'
|
||||
|
||||
call plug#end()
|
||||
|
||||
let g:airline_powerline_fonts = 0
|
||||
colorscheme elflord
|
Reference in New Issue
Block a user