Initial commit

This commit is contained in:
Andrew R. M 2016-10-01 08:23:58 -04:00
commit 0d9a54719a
23 changed files with 460 additions and 0 deletions

42
.gitmodules vendored Normal file
View File

@ -0,0 +1,42 @@
[submodule "vim/bundle/pathogen"]
path = vim/bundle/pathogen
url = git@github.com:tpope/vim-pathogen.git
[submodule "vim/bundle/fugitive"]
path = vim/bundle/fugitive
url = git@github.com:tpope/vim-fugitive.git
[submodule "vim/bundle/commentary"]
path = vim/bundle/commentary
url = git@github.com:tpope/vim-commentary.git
[submodule "vim/bundle/eunuch"]
path = vim/bundle/eunuch
url = git@github.com:tpope/vim-eunuch.git
[submodule "vim/bundle/vinegar"]
path = vim/bundle/vinegar
url = git@github.com:tpope/vim-vinegar.git
[submodule "vim/bundle/sleuth"]
path = vim/bundle/sleuth
url = git@github.com:tpope/vim-sleuth.git
[submodule "vim/bundle/endwise"]
path = vim/bundle/endwise
url = git@github.com:tpope/vim-endwise.git
[submodule "vim/bundle/tagbar"]
path = vim/bundle/tagbar
url = git@github.com:majutsushi/tagbar.git
[submodule "vim/bundle/pencil"]
path = vim/bundle/pencil
url = git@github.com:reedes/vim-pencil.git
[submodule "vim/bundle/dialect"]
path = vim/bundle/dialect
url = git@github.com:dbmrq/vim-dialect.git
[submodule "vim/bundle/snipmate"]
path = vim/bundle/snipmate
url = git@github.com:garbas/vim-snipmate.git
[submodule "vim/bundle/snipmate-tlib"]
path = vim/bundle/snipmate-tlib
url = git@github.com:tomtom/tlib_vim.git
[submodule "vim/bundle/snipmate-addon-mw-utils"]
path = vim/bundle/snipmate-addon-mw-utils
url = git@github.com:MarcWeber/vim-addon-mw-utils.git
[submodule "vim/bundle/filetype-nix"]
path = vim/bundle/filetype-nix
url = git@github.com:LnL7/vim-nix.git

56
aliases Normal file
View File

@ -0,0 +1,56 @@
#{- ~/.aliases -}#
#{- FILE OPERATIONS -}#
# Allow alias expansion for commands executed with sudo
alias sudo="sudo "
#{- GNU coreutils -}#
# Sort directories first and colorize output
alias ls="ls -h --color=auto --group-directories-first"
alias la="ls -A"
alias ll="ls -l"
# Ask before overwriting files
alias mv="mv -i"
alias cp="cp -i"
alias rm="rm -i --preserve-root --one-file-system"
# Create and remove empty subdirectories
alias mkdir="mkdir -p"
alias rmdir="rmdir -p"
# Don't recursively modify permissions on root directory
alias chmod="chmod --preserve-root"
alias chown="chown --preserve-root"
alias chgrp="chgrp --preserve-root"
# Colorize output
alias grep="grep --color"
alias egrep="grep -E --color"
alias fgrep='grep -F --color'
# Human readable file system inspection
alias df="df -h"
# Human readable file size inspection
alias du="du -sh"
#{- NETWORKING -}#
# Don't ping infinitely
alias ping="ping -c 4"
# Show progress while syncing
alias rsync="rsync --progress"
#{- SHELL INTROSPECTION -}#
# Print the value of the $PATH variable in a human readable format
alias path='printf "${PATH//:/\\n}\n"'
# Print current aliases in a human readable format
alias aliases='alias | sed -e "s/=/ -> /" -e "s/alias //"'

52
bash_profile Normal file
View File

@ -0,0 +1,52 @@
#{- ~/.bash_profile -}#
#{- PROMPT -}#
# Debugging prompt: (? ) in blue
export PS4='\[\033[1;34\]m?\[\033[0m\] '
# Selection prompt: (select: )
export PS3='select: '
#{- ENVIRONMENT VARIABLES -}#
# History preferences
export HISTSIZE=-1
export HISTFILESIZE=-1
export HISTFILE="$HOME/.history/bash"
export HISTCONTROL="erasedups:ignoreboth"
#{- SHELL OPTIONS -}#
# Append history to $HISTFILE when bash exits, instead of overwriting it
shopt -s histappend
# Attempt to preserve multi-line commands in history with embedded newlines
shopt -s cmdhist lithist
# When doing history substitution load the results into the buffer
shopt -s histverify
# When doing history substitution load a failed expression into the buffer
shopt -s histreedit
# Do a path search if a hashed command no longer exists
shopt -s checkhash
# Enable extended pattern matching for interactive use
shopt -s extglob
#{- SOURCING -}#
# Source ~/.profile if it exists and is readable
if [ -f "$HOME/.profile" ] && [ -r "$HOME/.profile" ]; then
. "$HOME/.profile"
fi
# Source ~/.bashrc if it exists and is readable
if [ -f "$HOME/.bashrc" ] && [ -r "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi

29
bashrc Normal file
View File

@ -0,0 +1,29 @@
#{- ~/.bashrc -}#
#{- SOURCING -}#
# Source aliases
if [ -f "$HOME/.aliases" ] && [ -r "$HOME/.aliases" ]; then
. "$HOME/.aliases"
fi
# Source private aliases
if [ -f "$HOME/.private_aliases" ] && [ -r "$HOME/.private_aliases" ]; then
. "$HOME/.private_aliases"
fi
# Source functions
if [ -f "$HOME/.functions" ] && [ -r "$HOME/.functions" ]; then
. "$HOME/.functions"
fi
# Source private functions
if [ -f "$HOME/.private_functions" ] && [ -r "$HOME/.private_functions" ]; then
. "$HOME/.private_functions"
fi
# Source completion
if [ -f "$HOME/.nix-profile/etc/profile.d/bash_completion.sh" ] && \
[ -r "$HOME/.nix-profile/etc/profile.d/bash_completion.sh" ]; then
. "$HOME/.nix-profile/etc/profile.d/bash_completion.sh"
fi

17
functions Normal file
View File

@ -0,0 +1,17 @@
#{- ~/.functions -}#
# Enables or disables kwm hotkeys
hotkeys()
{
case "$1" in
"on") kwmc config hotkeys on; echo "Hotkeys enabled." ;;
"off") kwmc config hotkeys off; echo "Hotkeys disabled." ;;
*) printf "hotkeys: usage: hotkeys {on|off}\n" ;;
esac
}
# Passes basic arithmetic to bc
maths()
{
bc -l <<< "scale=2; $*"
}

76
inputrc Normal file
View File

@ -0,0 +1,76 @@
#{- ~/.inputrc -}#
#{- EDITING MODE -}#
# Use vi mode
set editing-mode vi
#{- PROMPT -}#
set show-mode-in-prompt on
# Emacs mode prompt: (@) in red
set emacs-mode-string "\1\033[1;31m\2@\1\033[0m\2"
# Vim insert mode prompt: (+) in red
set vi-ins-mode-string "\1\033[1;31m\2+\1\033[0m\2"
# Vim command mode prompt: (:) in red
set vi-cmd-mode-string "\1\033[1;31m\2:\1\033[0m\2"
#{- CONTROL CHARACTERS -}#
# Ignore bell characters
set bell-style none
# Don't echo control characters
set echo-control-characters off
#{- COMPLETION -}#
# Mark file types with colors and symbols
set visible-stats on
set colored-stats on
# Mark directories in completion
set mark-directories on
# Use colors to highlight common prefix when displaying matches
set colored-completion-prefix on
# Matching is case insensitive
set completion-ignore-case on
# When matching, - and _ are equivalent
set completion-map-case on
# Don't match hidden files
set match-hidden-files off
# Display matches with a single tab
set show-all-if-ambiguous on
set show-all-if-unmodified on
# Allow completion in the middle of a word
set skip-completed-text on
# Don't use a pager to display matches
set page-completions off
#{- BINDINGS -}#
# Enable emacs bindings that don't conflict with vi defaults
set keymap vi-insert
Control-a: beginning-of-line
Control-b: backward-char
# Control-d: delete-char
Control-e: end-of-line
Control-f: forward-char
Control-g: abort
Control-k: kill-line
Control-l: clear-screen
# Control-n: next-history
Control-o: operate-and-get-next
# Control-p: previous-history
Control-q: quoted-insert
Control-@: set-mark
Control-_: undo

42
profile Normal file
View File

@ -0,0 +1,42 @@
#{- ~/.profile -}#
#{- PROMPT -}#
# Primary prompt: ($/# ) in magenta
export PS1='\[\033[1;35m\]\$\[\033[0m\] '
# Secondary prompt: (> ) in red
export PS2='\[\033[1;31\]m>\[\033[0m\] '
#{- PATH -}#
# Prepend ~/.local/bin to the path and append the current directory to the path
export PATH="$HOME/.local/bin:$PATH:."
#{- ENVIRONMENT VARIABLES -}#
# Export language and sorting preferences.
export LANG="en_US.UTF-8"
export LC_COLLATE="C"
# Export editor preferences.
export EDITOR="vim"
export VISUAL="vim"
# Export pager preferences.
export PAGER="less"
export LESSHISTFILE="-"
# Export python preferences.
export PYTHONSTARTUP="$HOME/.pythonrc"
# History preferences
export HISTFILE="$HOME/.history/posh"
export HISTSIZE=10000
#{- SOURCING -}#
# Source nix profile configuration
if [ -f "$HOME/.nix-profile/etc/profile.d/nix.sh" ] \
&& [ -r "$HOME/.nix-profile/etc/profile.d/nix.sh" ]; then
. "$HOME/.nix-profile/etc/profile.d/nix.sh"
fi

8
pythonrc Normal file
View File

@ -0,0 +1,8 @@
#!/usr/bin/env python
import sys
# Primary prompt: (>>> ) in magenta
sys.ps1 = '\033[1;35m>>>\033[0m '
# Secondary prompt: (... ) in red
sys.ps2 = '\033[1;31m...\033[0m '

1
vim/bundle/commentary Submodule

@ -0,0 +1 @@
Subproject commit 73e0d9a9d1f51b6cc9dc965f62669194ae851cb1

1
vim/bundle/dialect Submodule

@ -0,0 +1 @@
Subproject commit 1ab38b8838b60b7efd0cf705ae06b2527f930d23

1
vim/bundle/endwise Submodule

@ -0,0 +1 @@
Subproject commit 0067ceda37725d01b7bd5bf249d63b1b5d4e2ab4

1
vim/bundle/eunuch Submodule

@ -0,0 +1 @@
Subproject commit 7eeb681ff3caedc1c01e50966bc293951f7b3e21

@ -0,0 +1 @@
Subproject commit a61495a762feacc00f24cab4392b09cc3250decf

1
vim/bundle/fugitive Submodule

@ -0,0 +1 @@
Subproject commit aac85a268e89a6c8be79341e130ac90256fadbd6

1
vim/bundle/pathogen Submodule

@ -0,0 +1 @@
Subproject commit 8c91196cfd9c8fe619f35fac6f2ac81be10677f8

1
vim/bundle/pencil Submodule

@ -0,0 +1 @@
Subproject commit 3e8b6f34170d83eb5074608ef07b215477026852

1
vim/bundle/sleuth Submodule

@ -0,0 +1 @@
Subproject commit a17462708aa40a7fc0afd4effa559087d8a2c908

1
vim/bundle/snipmate Submodule

@ -0,0 +1 @@
Subproject commit 31986191ac9923afcd53bf6425c9b6c35fdbb214

@ -0,0 +1 @@
Subproject commit 0c5612fa31ee434ba055e21c76f456244b3b5109

@ -0,0 +1 @@
Subproject commit 8c74564396e368788a5cb901b0e8017a3166cee9

1
vim/bundle/tagbar Submodule

@ -0,0 +1 @@
Subproject commit 2955f71856536d503c79c15daab3de890a6d83e9

1
vim/bundle/vinegar Submodule

@ -0,0 +1 @@
Subproject commit bd7f7b7929260072864462c04dde3b9f4c5e0d23

124
vimrc Normal file
View File

@ -0,0 +1,124 @@
"{- ~/.vimrc -}"
" Use vim defaults "
set nocompatible
"{- PLUGINS -}"
" Load pathogen, the plugin manager, and all of the plugins "
runtime bundle/pathogen/autoload/pathogen.vim
execute pathogen#infect()
" Load the pencil plugin for markdown files "
augroup pencil
autocmd!
autocmd FileType markdown,mkd call pencil#init()
augroup END
"{- COMMANDS -}"
" Removes blank lines "
command RemoveBlankLines :g/^\s*$/d
" Removes trailing whitespace "
command RemoveTrailingWhitespace :%s/\s\+$//
" Toggles spellchecking "
command Spelling :setlocal spell! spell?
" Toggles invisible characters "
command ShowInvisible :setlocal list!
" Toggles cursor crosshair "
command Crosshair :setlocal cursorline! cursorcolumn! ruler
"{- INTERFACE -}"
" Colors and syntax highlighting "
colorscheme peachpuff
filetype plugin on
syntax on
" Use two spaces instead of tabs "
set softtabstop=2
set shiftwidth=2
set tabstop=2
" Don't redraw the screen unless necessary "
set lazyredraw
" Don't wrap lines "
set nowrap
" Don't show line numbers "
set numberwidth=1
set nonumber
" Show the ruler "
set ruler
" Enable Mouse Support "
set mouse=a
" Display partially completed commands "
set showcmd
" Display the current mode in the status bar "
set showmode
" Scroll the screen vertically at 8 rows "
set scrolloff=8
" Scroll the screen horizontally at 1 column "
set sidescrolloff=0
set sidescroll=1
" Make backspace acts as you would expect "
set backspace=indent,eol,start
"{- FUNCTIONALITY -}"
" Don't use swap files or backups "
set nowritebackup
set noswapfile
set nobackup
" Highlight search results "
set hlsearch
" Searching and completion are case insenstive "
set ignorecase
set smartcase
set infercase
" Automatically indent things and be smart about it :^) "
set smartindent
set autoindent
" Advanced command-line completion "
set wildmenu
set wildignore=*.o,*.obj,*~
set wildignore+=*.png,*.jpg,*.gif
" Use UTF-8 "
set encoding=utf-8
" Lines should be no longer than eighty characters "
set linebreak
set tw=80
" History should hold a thousand entires "
set history=1000
" Spellchecking uses American Enlish and ignores any asian characters "
set spelllang=en_us,cjk
" Store the viminfo file in the .vim directory "
set viminfo+=n$HOME/.vim/.viminfo
" Use the system clipboard when deleting, pasting, or yanking "
if has("clipboard")
set clipboard=unnamed
endif