some updates

pull/2/head
Adam Veldhousen 6 years ago
parent f4a8ead915
commit ee70ba4cac
Signed by: adam
GPG Key ID: 6DB29003C6DD1E4B

@ -1,14 +1,24 @@
#!/bin/bash #!/bin/bash
# Bash behavior # Bash behavior
shopt -s checkwinsize # Checks window size to get proper line wrapping shopt -s checkwinsize # Checks window size to get proper line wrapping
shopt -s cdspell # Corrects minor spelling errors when cd-ing shopt -s cdspell # Corrects minor spelling errors when cd-ing
set -o vi # Set prompt to vi mode shopt -s checkjobs # Stops bash from exiting if there are jobs running. A second attempt at exiting will ignore.
set -o notify # Report status of terminated background jobs immediately set -o vi # Set prompt to vi mode
set -o notify # Report status of terminated background jobs immediately
set -b # report job status immediately
bind '"\C-l"':redraw-current-line # <Ctrl>-l
bind '"\e\C-l"':clear-screen # <Escape>-<Ctrl>-l
set show-mode-in-prompt on # Shows vi mode status: + for vi insert mode, : for vi command mode
set print-completions-horizontally on # Prints tab completions horizontally in alphabetical order
set colored-stats on # completions are printed colored based on their file type
set visible-stats on # completions are printed colored based on their file type
# History # History
HISTCONTROL=ignoreboth:erasedups # No duplicate commands in history export HISTCONTRO=Lignoreboth:erasedups # No duplicate commands in history
HISTSIZE=50000 # For a huge history export HISTSIZE=-1
export HISTIGNORE="[ ]*:&:bg:fg:exit:clear" # Don't save these commands in the history export HISTIGNORE="[ ]*:&:bg:fg:exit:clear" # Don't save these commands in the history
shopt -s histappend # Append to the history file, not overwrite shopt -s histappend # Append to the history file, not overwrite
@ -18,6 +28,7 @@ export PAGER=less # Used to display text / man files
export LANG="en_US.UTF-8" export LANG="en_US.UTF-8"
export POWERLINE_CONFIG_COMMAND=~/Tools/modules/powerline/scripts/powerline-config export POWERLINE_CONFIG_COMMAND=~/Tools/modules/powerline/scripts/powerline-config
export WINDOWS=false export WINDOWS=false
if [ -d "${HOME}/.bin" ] ; then if [ -d "${HOME}/.bin" ] ; then
@ -35,10 +46,12 @@ if [ -d "/c/Windows" ]; then
if [ -f ~/.windows ]; then if [ -f ~/.windows ]; then
. ~/.windows . ~/.windows
fi fi
else
export GOPATH=~/projects/go
fi fi
export EDITOR=$GIT_EDITOR export EDITOR=$GIT_EDITOR
export VISUAL=$EDITOR export VISUAL=$EDITOR
if [ -d "${HOME}/tools/vim" ] ; then if [ -d "${HOME}/tools/vim" ] ; then
PATH=${HOME}/tools/vim:${PATH} PATH=${HOME}/tools/vim:${PATH}

@ -167,4 +167,4 @@
# for OSX # for OSX
#helper = osxkeychain #helper = osxkeychain
# for Linux # for Linux
helper =/usr/lib/git-core/git-credential/git-credential-gnome-keyring helper = store --file ~/.git-credentials

@ -1,5 +1,11 @@
#!/bin/bash #!/bin/bash
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# source environment settings # source environment settings
if [ -f ~/.environment ]; then if [ -f ~/.environment ]; then
. ~/.environment . ~/.environment
@ -24,7 +30,9 @@ fi
# Sources a folder with shell extensions # Sources a folder with shell extensions
if [ -d ~/.extensions ]; then if [ -d ~/.extensions ]; then
for plugin in ~/.extensions/*; do for plugin in ~/.extensions/*; do
source $plugin if [ -f $plugin ]; then
source $plugin
fi
done done
fi fi

@ -1,29 +1,27 @@
" change runtime path " change runtime path
set runtimepath=$VIMRUNTIME,~/tools/vim set runtimepath=~/tools/vim
execute pathogen#infect() execute pathogen#infect()
execute pathogen#helptags() execute pathogen#helptags()
"we don't want vi compatibility AKA Make Vim more useful "we don't want vi compatibility AKA Make Vim more useful
set nocompatible set nocompatible
"color schemes "color schemes
colorscheme jellybeans colorscheme desert
"colorscheme jellybeans
"colorscheme molokai "colorscheme molokai
"colorscheme hickop
"colorscheme moria "colorscheme moria
"colorscheme CandyPaper "colorscheme CandyPaper
"colorscheme sunburst "colorscheme sunburst
"colorscheme hickop
"colorscheme pablo "colorscheme pablo
"colorscheme torte "colorscheme torte
"colorscheme slate "colorscheme slate
"colorscheme evening "colorscheme evening
"colorscheme darkblue "colorscheme darkblue
"colorscheme desert
"colorscheme base16-flat "colorscheme base16-flat
"colorscheme inkpot "colorscheme inkpot
"colorscheme jellybeans
"colorscheme liquidcarbon "colorscheme liquidcarbon
"colorscheme pinksea "colorscheme pinksea
"colorscheme sonofobsidian "colorscheme sonofobsidian
@ -46,7 +44,7 @@ set autoread
set selection=exclusive set selection=exclusive
set ttimeoutlen=50 set ttimeoutlen=50
" Use the OS clipboard by default (on versions compiled with `+clipboard`) " Use the OS clipboard by default (on versions compiled with `+clipboard`)
set clipboard=unnamed set clipboard=unnamedplus
" Enhance command-line completion " Enhance command-line completion
set wildmenu set wildmenu
" Allow cursor keys in insert mode " Allow cursor keys in insert mode
@ -62,16 +60,20 @@ set encoding=utf-8 "nobomb
" Change mapleader " Change mapleader
let mapleader = "," let mapleader = ","
map <leader><Space> :HardTimeToggle<CR>
map <Space> :noh<CR> map <Space> :noh<CR>
"replace with regular newlines
map <leader>nf :%s/ //g<CR>
"list buffers "list buffers
map <leader>w :buffers<CR> map <leader>w :buffers<CR>
map <leader>q :buffer#<CR>
" open erros " open erros
map <leader>e :lw 5<CR> map <leader>e :lw 5<CR>
" mini buffer explorer toggle " mini buffer explorer toggle
map <Leader>b :MBEToggle<cr> map <Leader>b :MBEToggle<cr>
" easymotion mappings " easymotion mappings
@ -111,6 +113,9 @@ noremap <C-l> <C-w>l
map <leader>x :%s/\s\+$//<CR>:noh<Cr> map <leader>x :%s/\s\+$//<CR>:noh<Cr>
"reload vim config
noremap <leader>rr :so ~/.vimrc<CR>
"open vimrc in a new tab "open vimrc in a new tab
map <leader>v :tabedit ~/.vimrc<CR> map <leader>v :tabedit ~/.vimrc<CR>
map <F1> <Nop> map <F1> <Nop>
@ -160,8 +165,8 @@ set number
syntax on syntax on
" Highlight current line " Highlight current line
set cursorline set cursorline
" Make tabs as wide as two spaces " Make tabs as wide as four spaces
set tabstop=2 set tabstop=4
set expandtab set expandtab
set shiftwidth=2 set shiftwidth=2
" Show “invisible” characters " Show “invisible” characters
@ -250,10 +255,14 @@ let g:ctrlp_extensions = ['line']
"'r' - the nearest ancestor of the current file that contains one of these directories or files: .git .hg .svn .bzr _darcs "'r' - the nearest ancestor of the current file that contains one of these directories or files: .git .hg .svn .bzr _darcs
"'w' - modifier to "r": start search from the cwd instead of the current file's directory "'w' - modifier to "r": start search from the cwd instead of the current file's directory
"0 or '' (empty string) - disable this feature. "0 or '' (empty string) - disable this feature.
let g:ctrlp_working_path_mode = 'rc' let g:ctrlp_working_path_mode = 'ra'
let g:ctrlp_by_filename = 0 let g:ctrlp_by_filename = 0
let g:ctrlp_max_files = 5000 let g:ctrlp_max_files = 5000
let g:ctrlp_custom_ignore = {
\ 'dir': '\v[\/]\.(git|hg|svn)$',
\ 'file': '\v\.(exe|so|dll)$',
\ }
let g:go_disable_autoinstall = 0 let g:go_disable_autoinstall = 0
@ -269,7 +278,7 @@ let g:airline_detect_modified=1
let g:airline_detect_paste=1 let g:airline_detect_paste=1
" enable iminsert detection > " enable iminsert detection >
let g:airline_detect_iminsert=1 let g:airline_detect_iminsert=1
" determine whether inactive windows should have the left section collapsed to only the filename of that buffer. " determine whether inactive windows should have the left section collapsed to only the filename of that buffer.
let g:airline_inactive_collapse=1 let g:airline_inactive_collapse=1
" enable/disable csv integration for displaying the current column. " enable/disable csv integration for displaying the current column.
let g:airline#extensions#csv#enabled = 1 let g:airline#extensions#csv#enabled = 1
@ -277,7 +286,7 @@ let g:airline#extensions#csv#enabled = 1
let g:airline#extensions#whitespace#symbol = '.' let g:airline#extensions#whitespace#symbol = '.'
" themes are automatically selected based on the matching colorscheme. this can be overridden by defining a value. " themes are automatically selected based on the matching colorscheme. this can be overridden by defining a value.
"let g:airline_theme= "let g:airline_theme=
" if you want to patch the airline theme before it gets applied, you can supply the name of a function where you can modify the palette. " if you want to patch the airline theme before it gets applied, you can supply the name of a function where you can modify the palette.
let g:airline_theme_patch_func = 'AirlineThemePatch' let g:airline_theme_patch_func = 'AirlineThemePatch'
function! AirlineThemePatch(palette) function! AirlineThemePatch(palette)
if g:airline_theme == 'badwolf' if g:airline_theme == 'badwolf'
@ -286,9 +295,9 @@ function! AirlineThemePatch(palette)
endfor endfor
endif endif
endfunction endfunction
" enable/disable automatic population of the `g:airline_symbols` dictionary with powerline symbols. " enable/disable automatic population of the `g:airline_symbols` dictionary with powerline symbols.
let g:airline_powerline_fonts=1 let g:airline_powerline_fonts=1
" define the set of text to display for each mode. " define the set of text to display for each mode.
let g:airline_mode_map = { let g:airline_mode_map = {
\ '__' : '-', \ '__' : '-',
\ 'n' : 'N', \ 'n' : 'N',
@ -327,6 +336,11 @@ let g:ycm_key_list_select_completion = ['<TAB>', '<Down>']
" Enable file type detection " Enable file type detection
filetype plugin indent on filetype plugin indent on
augroup myvimrc
au!
au BufWritePost .vimrc so $MYVIMRC
augroup END
" Automatic commands " Automatic commands
if has("autocmd") if has("autocmd")
" Treat .json files as .js " Treat .json files as .js
@ -347,6 +361,4 @@ au GUIEnter * set vb t_vb=
if has('gui_running') if has('gui_running')
set go =mt set go =mt
set guifont=Literation\ Mono\ for\ Powerline:h12,Literation_Mono_for_Powerline:h12,Inconsolata\ for\ Powerline:h10,Ubuntu\ Mono:h26,Consolas:h12,Courier:h12 set guifont=Literation\ Mono\ for\ Powerline:h12,Literation_Mono_for_Powerline:h12,Inconsolata\ for\ Powerline:h10,Ubuntu\ Mono:h26,Consolas:h12,Courier:h12
endif endif
let g:ruby_path = ':C:\ruby193\bin'

@ -7,7 +7,7 @@ dest="$(pwd)"
bkup="$dest/.home_bkup" bkup="$dest/.home_bkup"
if [[ -d ${bkup} ]]; then if [ -d ${bkup} ]; then
echo "A backup folder already exists, it must be moved/deleted before bootstrap can apply the new dotfiles." echo "A backup folder already exists, it must be moved/deleted before bootstrap can apply the new dotfiles."
exit -1; exit -1;
fi fi
@ -17,7 +17,7 @@ echo "Making a backup of old dotfiles into ${bkup}..."
mkdir -p "${bkup}" mkdir -p "${bkup}"
IFS=$'\n' IFS=$'\n'
if [[ -f ${dest}/.ssh/config ]]; then if [ -f ${dest}/.ssh/config ]; then
mkdir -p "${bkup}/.ssh" mkdir -p "${bkup}/.ssh"
cp "${dest}/.ssh/config" "${bkup}/.ssh/config" cp "${dest}/.ssh/config" "${bkup}/.ssh/config"
fi fi
@ -36,7 +36,7 @@ popd
echo "" echo ""
echo "copying \"./tools\" directories..." echo "copying \"./tools\" directories..."
if [[ -z "${dest}/Tools" ]]; then if [ -z "${dest}/Tools" ]; then
mkdir -p ${dest}/tools mkdir -p ${dest}/tools
fi fi
@ -48,17 +48,18 @@ echo ""
echo "linking dotfiles from ${source} into ${dest}" echo "linking dotfiles from ${source} into ${dest}"
# ln on windows pretty much only works with hardlinks it seems # ln on windows pretty much only works with hardlinks it seems
ls -lA "${source}" | grep "^-" | awk '{print $9}' | xargs -I file ln -fs "${source}/file" "${dest}/file" ls -lA "${source}" | grep "^-" | awk '{print $9}' | xargs -I file ln -fs "${source}/file" "${dest}/file"
if [[ -z "${dest}/.ssh" ]]; then if [ -z "${dest}/.ssh" ]; then
mkdir -p "${dest}/.ssh" mkdir -p "${dest}/.ssh"
fi fi
echo "" echo ""
echo "setting up ssh default"
# a check to see if they're using a config file and if it has a host setup # a check to see if they're using a config file and if it has a host setup
if [[ -f "${dest}/.ssh/config" && -z $(cat "${dest}/.ssh/config" | grep "[hH]ost \*") ]]; then if [ -f "${dest}/.ssh/config" && -z $(cat "${dest}/.ssh/config" | grep "[hH]ost \*") ]; then
echo "Appending ssh config" echo "Appending ssh config"
# we append it so we don't destroy any custom settings they may have # we append it so we don't destroy any custom settings they may have
cat "${source}/.ssh/config" >> "${dest}/.ssh/config" cat "${source}/.ssh/config" >> "${dest}/.ssh/config"
elif [[ -f "${dest}/.ssh/config" ]]; then elif [ -f "${dest}/.ssh/config" ]; then
echo "Your SSHfu is strong, skipping config copy..." echo "Your SSHfu is strong, skipping config copy..."
else else
echo "Copying new ssh config" echo "Copying new ssh config"
@ -66,7 +67,10 @@ else
cp -n "${source}/.ssh/config" "${dest}/.ssh/" cp -n "${source}/.ssh/config" "${dest}/.ssh/"
fi fi
if [[ $(uname -s) == "Darwin" ]]; then
echo ""
echo "installing platform stuff"
if [ $(uname -s) == "Darwin" ]; then
echo "installing fonts" echo "installing fonts"
find ${source}/tools/modules/powerline-fonts | grep "\.[to]tf" | xargs -I {} cp {} /Users/$(whoami)/Library/Fonts/ find ${source}/tools/modules/powerline-fonts | grep "\.[to]tf" | xargs -I {} cp {} /Users/$(whoami)/Library/Fonts/
@ -75,7 +79,11 @@ if [[ $(uname -s) == "Darwin" ]]; then
#rake #rake
#~/tools/vim/bundle/YouCompleteMe/install.py --all #~/tools/vim/bundle/YouCompleteMe/install.py --all
elif [[ $(uname -o) == "Msys" ]]; then
elif [ $(uname -s) == "Linux" ]; then
echo "installing linux stuff"
sudo ./install/debian.sh
elif [ $(uname -o) == "Msys" ]; then
echo "If you would like to install vim plugins, ensure you have ruby 1.9.3 + rake installed and do the following:" echo "If you would like to install vim plugins, ensure you have ruby 1.9.3 + rake installed and do the following:"
echo "rake;" echo "rake;"
@ -101,7 +109,7 @@ All script files in this folder get loaded by the .profile, so this is a nice pl
or enhancements to the dotfile setup or enhancements to the dotfile setup
EOF EOF
if [[ -f "~/.bashrc" ]]; then if [ -f "~/.bashrc" ]; then
echo "sourcing .profile in .bashrc" echo "sourcing .profile in .bashrc"
echo "source ./.profile" >> ~/.bashrc echo "source ./.profile" >> ~/.bashrc
fi fi
@ -120,7 +128,7 @@ README.md"
for f in ${cleanup} for f in ${cleanup}
do do
filetorm=${dest}/${f}; filetorm=${dest}/${f};
if [[ -f ${filetorm} ]]; then if [ -f ${filetorm} ]; then
rm -rf $filetorm rm -rf $filetorm
fi fi
done done

@ -1 +1,31 @@
#!/bin/bash #!/bin/bash
if [ -d "${dest}/.config" ]; then
echo ".config exists"
else
mkdir -p "${dest}/.config"
fi
cp -r ${source}/config/ ${dest}/.config/
sudo apt-get update && sudo apt-get install \
build-essential \
cmake \
curl \
nvm \
python \
rbenv \
tmux \
wget \
git;
rbenv install 1.9.3-p125;
rbenv global 1.9.3-p125;
rm -rf ~/tools/modules/iTerm2-Color-Schemes
rm -rf ~/tools/modules/tmux-MacOSX-pasteboard
rake
echo "You must install YouCompleteMe by going to ~/tools/vim/bundle/YouCompleteMe/ and following the instructions in the README.md"

@ -2,12 +2,13 @@ require 'rake/clean'
require 'fileutils' require 'fileutils'
vimFolder = "tools/vim" vimFolder = "tools/vim"
bundles_dir = File.join(File.dirname(__FILE__), "#{vimFolder}/bundle/") bundles_dir = File.join("#{vimFolder}/bundle/")
pluginsFile = File.join(File.dirname(__FILE__), "#{vimFolder}/plugins.txt") pluginsFile = File.join("#{vimFolder}/plugins.txt")
CLOBBER.include "#{bundles_dir}" CLOBBER.include "#{bundles_dir}"
CLEAN.include "#{bundles_dir}"
task :default => ['clobber', 'vim:reinstall'] task :default => ['vim:reinstall']
namespace :vim do namespace :vim do
@ -58,4 +59,3 @@ def gitName(gitRepo)
return gitRepo.split('/').last.sub(/\.git$/, '') return gitRepo.split('/').last.sub(/\.git$/, '')
end end

Loading…
Cancel
Save