Skip to content

Instantly share code, notes, and snippets.

@paulc
Created August 6, 2016 15:15
Show Gist options
  • Save paulc/12cfb7f16d5da5cd3c27fd1931045120 to your computer and use it in GitHub Desktop.
Save paulc/12cfb7f16d5da5cd3c27fd1931045120 to your computer and use it in GitHub Desktop.
Config Files
# pw usermod -n root -s /bin/sh
# export ENV=${HOME}/.shrc
export EDITOR=vi
set -o emacs
alias ls="ls -F"
PS1="[${USER}@\H] \w \$ "
set nocompatible
set nomodeline
set hidden
set bs=2
set ai
set tabstop=4
set shiftwidth=4
set expandtab
set smarttab
set winminheight=0
set backup
set history=200
set ruler
set title
set laststatus=2
set ignorecase
set smartcase
set wildmenu
set wildmode=list:longest
set scrolloff=5
set backspace=indent,eol,start
set showbreak=...
set cryptmethod=blowfish2
set shell=/bin/sh
set ttyfast
set rtp+=$GOROOT/misc/vim
let mapleader = ","
runtime macros/matchit.vim
let g:netrw_liststyle=3
map <tab><tab> :tabn
map <s-tab><s-tab> :tabp
if &t_Co > 2
set background=dark
colorscheme darkblue
syntax on
endif
hi TabLine ctermbg=blue ctermfg=grey guibg=green guifg=grey
hi TabLineSel ctermbg=blue ctermfg=red guibg=green guifg=yellow
hi TabLineFill ctermfg=blue guifg=green
filetype on
filetype plugin on
filetype indent on
if has("autocmd")
autocmd BufRead,BufNewFile *.txt set tw=78
autocmd BufRead,BufNewFile *.sh set showbreak=""
autocmd BufRead,BufNewFile *.go set syntax=go
augroup make
au!
autocmd FileType make set noexpandtab
augroup END
augroup cprog
au!
autocmd FileType c,cpp set formatoptions=croql cindent comments=sr:/*,mb:*,el:*/,://
augroup END
augroup html
au!
autocmd FileType html set tabstop=2
autocmd FileType html set shiftwidth=2
augroup END
endif
if exists("g:did_load_filetypes")
filetype off
filetype plugin indent off
endif
PROMPT="%B[%m:%n] %24<..<%~ %#%b "
RPROMPT="%B%w %T%b"
SHORT_PROMPT="%B%16<..<%~ %#%b "
if [[ $(tput cols) -lt 80 ]]
then
PROMPT=${SHORT_PROMPT}
RPROMPT=
fi
alias sp="PROMPT=\"${SHORT_PROMPT}\";RPROMPT=;clear"
export EDITOR="vim"
export KEYTIMEOUT=1
bindkey -e
autoload edit-command-line
zle -N edit-command-line
bindkey '^Xe' edit-command-line
set -o EXTENDED_GLOB
set -o AUTO_MENU
set -o AUTO_LIST
set -o AUTO_PARAM_SLASH
set -o CORRECT
set -o LIST_TYPES
set -o NO_PROMPT_CR
alias vi=vim
alias ls="ls -F"
alias cd..="cd .."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment