Skip to content

Instantly share code, notes, and snippets.

@roccogalluzzo
Forked from mislav/bashrc
Last active August 29, 2015 14:27
Show Gist options
  • Save roccogalluzzo/3e05ed78dcdd1d759f0a to your computer and use it in GitHub Desktop.
Save roccogalluzzo/3e05ed78dcdd1d759f0a to your computer and use it in GitHub Desktop.
Basic vimrc and tmux config for servers

My minimal setup for a new server: tmux, Vim and RubyGems config.

curl -fsSL "https://gist.github.com/byterussian/3e05ed78dcdd1d759f0a/raw/d51ee23fcc9d4cdb24a8e6a335a0e45411b28822/install.sh" | bash -e
export PS1="\[\033[38;5;9m\]\h\[$(tput sgr0)\]\[\033[38;5;7m\]@\[$(tput sgr0)\]\[\033[38;5;11m\]\u\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]\[\033[38;5;14m\]\w\[$(tput sgr0)\]\[\033[38;5;15m\]\n\\$ >\[$(tput sgr0)\]"
export EDITOR=vim
alias st='git status -sb'
curl -fsSL "https://gist.githubusercontent.com/byterussian/3e05ed78dcdd1d759f0a/raw/12b670e9ea8e00de26107f2772da398816942e15/vimrc" -o ~/.vimrc
curl -fsSL "https://gist.githubusercontent.com/byterussian/3e05ed78dcdd1d759f0a/raw/40b36d6609a89bbcb2f834c390d010b33ed21ccd/bashrc" >> ~/.bashrc
set nocompatible " choose no compatibility with legacy vi
syntax enable
set encoding=utf-8
filetype plugin indent on " load file type plugins + indentation
"" Tweaks
set hidden " allow backgrounding buffers without writing them
set nonumber " line numbers aren't needed
set scrolloff=3 " have some context around the current line always on screen
set history=200 " remember more Ex commands
set synmaxcol=800 " don't try to highlight long lines
" Time out on key codes but not mappings. Makes terminal Vim work sanely
set notimeout
set ttimeout
set ttimeoutlen=100
"" Whitespace
set nowrap " don't wrap lines
set tabstop=2 shiftwidth=2 " a tab is two spaces (or set this to 4)
set expandtab " use spaces, not tabs (optional)
set backspace=indent,eol,start " backspace through everything in insert mode
"" Searching
set hlsearch " highlight matches
set incsearch " incremental searching
set ignorecase " searches are case insensitive...
set smartcase " ... unless they contain at least one capital letter
set gdefault " replace all matches per line (instead of just first)
"" Have Vim able to edit crontab files again
set backupskip=/tmp/*,/private/tmp/*"
"" Status line
set showcmd " display incomplete commands
if has("statusline") && !&cp
set laststatus=2 " always show the status bar
set statusline=%f\ %m\ %r " filename, modified, readonly
set statusline+=\ %l/%L[%p%%] " current line/total lines
set statusline+=\ %v[0x%B] " current column [hex char]
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment