Skip to content

Instantly share code, notes, and snippets.

@edr3x
Last active February 15, 2024 06:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edr3x/62c70d753f727c172f1012131f4a20bf to your computer and use it in GitHub Desktop.
Save edr3x/62c70d753f727c172f1012131f4a20bf to your computer and use it in GitHub Desktop.
Personal minimal config for new servers

Minimal setup on new servers for vim, bashrc and tmux.

curl -fsSL "https://gist.github.com/edr3x/62c70d753f727c172f1012131f4a20bf/raw/install.sh" | bash -e
alias x="exit"
alias c="clear"
# docker
alias dps="docker ps"
alias dcd="docker-compose down"
alias dcu="docker-compose up -d"
alias dcls="docker container ls | wc -l"
# TMUX
alias tls="tmux ls"
alias ta="tmux a"
alias tnew="tmux new -s"
alias tkl="tmux kill-server"
alias tk1="tmux kill-session -t"
export EDITOR=vim
PS1='\[\033[31m\]\w\[\033[0m\] \[\033[32m\]❯\[\033[0m\] '
curl -fsSL \
"https://gist.github.com/edr3x/62c70d753f727c172f1012131f4a20bf/raw/vimrc" -o ~/.vimrc \
"https://gist.github.com/edr3x/62c70d753f727c172f1012131f4a20bf/raw/tmux.conf" -o ~/.tmux.conf
curl -fsSL "https://gist.github.com/edr3x/62c70d753f727c172f1012131f4a20bf/raw/bashrc" >> ~/.bashrc
set-option -g prefix M-a
unbind-key M-a
bind-key M-a send-prefix
set -s escape-time 50
set -g base-index 1
set -g mouse on
set -g default-terminal "screen-256color"
set -g status-left-length 15
bind -n M-n next-window
bind -n M-p previous-window
# Optional
# decoration
bg=default
fg="#d3d3d3"
orange="#e78a4e"
highlight="#89DDFF"
wg_time="#[nobold]#[bg=${bg},fg=${orange}] %I:%M"
wg_date="#[bold]#[bg=${bg},fg=${highlight}] %d-%b"
set-option -g status-justify left
set-option -g renumber-windows on
set-option -g status-left-length 100
set-option -g status-right-length 150
set -g status-style "bg=${bg} fg=${fg}"
setw -g window-status-current-style fg=${orange},bg=${bg}
set -g window-status-separator ""
set -g window-status-format "#[nobold]#[bg=${bg},fg=${fg}] #W "
set -g window-status-current-format "#[nobold]#[bg=${bg},fg=${orange}] #W "
set -g status-left "#[bold]#[bg=${bg},fg=${highlight}] #S "
set -g status-right " ${wg_time} ${wg_date} "
set -g pane-border-style fg=${fg}
set -g pane-active-border-style fg=${fg}
set-window-option -g mode-style "bg=${orange} fg=#121212"
set -g message-style fg=${orange},bg=${bg}
set -g message-command-style fg=${orange},bg=${bg}
set nocompatible
syntax enable
set encoding=utf-8
set hidden
set nonumber
set noswapfile
set history=200
set synmaxcol=800
set notimeout
set ttimeout
set ttimeoutlen=100
set nowrap
set tabstop=2 shiftwidth=2
set expandtab
set backspace=indent,eol,start
set showcmd
set hlsearch
set incsearch
set ignorecase
set smartcase
set gdefault
set noswapfile
set backupskip=/tmp/*,/private/tmp/*"
if has("statusline") && !&cp
set laststatus=2
set statusline=%f\ %m\ %r
endif
nnoremap - :E<CR>
nnoremap <S-h> ^
nnoremap <S-l> $
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment