Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@peterhellberg
Created February 23, 2012 11:29
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 peterhellberg/1892471 to your computer and use it in GitHub Desktop.
Save peterhellberg/1892471 to your computer and use it in GitHub Desktop.
Small .bash_profile and .vimrc for a brand new server
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
RED=$(tput setaf 1)
YELLOW=$(tput bold ; tput setaf 3)
GREEN=$(tput setaf 2)
BLUE=$(tput setaf 4)
LIGHT_GRAY=$(tput setaf 7)
WHITE=$(tput bold ; tput setaf 7)
RESET_COLOR=$(tput sgr0)
shopt -s checkwinsize
PS1='\[$WHITE\]\w \[$YELLOW\]NEW\[$GREEN\]\n\[$GREEN\]\$\[$RESET_COLOR\] '
export SUDO_PS1="\[$WHITE\]\w \[$YELLOW\]NEW\[\e[0;31m\]\n#\[$RESET_COLOR\] "
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
set nocompatible
let mapleader=","
" Enable status line always
set laststatus=2
set timeoutlen=100
" now set it up to change the status line based on mode
au VimEnter * hi StatusLine term=reverse ctermfg=8 ctermbg=0
au InsertEnter * hi StatusLine term=reverse ctermfg=0 ctermbg=10
au InsertLeave * hi StatusLine term=reverse ctermfg=8 ctermbg=0
au InsertEnter * set cursorline
au InsertLeave * set nocursorline
set nowrap
set nohlsearch
set incsearch
set ignorecase
set autoread "auto read when file is changed from outside
set ruler "show current position
set showmatch "show maching braces
set shiftwidth=2
set tabstop=2
set expandtab
set background=dark
color jellybeans
set t_Co=256
" Tab to next split
noremap <tab> <c-w><c-w>
" Switch between last two buffers
nnoremap <leader><leader> <C-^>
@tw1nk
Copy link

tw1nk commented Feb 23, 2012

I only have one issue with this:

Error detected while processing /Users/callegustafsson/.vimrc:
line 31:
E185: Cannot find color scheme jellybeans

@peterhellberg
Copy link
Author

jellybeans.vim : Colorful, dark color scheme

http://www.vim.org/scripts/script.php?script_id=2555

Jellybeans preview

@peterhellberg
Copy link
Author

Custom PS1 and SUDO_PS1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment