Skip to content

Commit

Permalink
Updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
TomLingham authored and Tom Lingham committed Feb 20, 2020
1 parent 6bcc0d4 commit e0a9a60
Show file tree
Hide file tree
Showing 10 changed files with 60 additions and 56 deletions.
2 changes: 1 addition & 1 deletion config/nvim/extras/extras
7 changes: 7 additions & 0 deletions config/nvim/init.vim
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ set undolevels=1000
set undodir=~/.vim/undo//
set backupdir=~/.vim/backup//
set directory=~/.vim/swap//
set spellfile=~/.vim/spell/en.utf-8.add


" Allow backspace over line breaks, the start of insert and indents
set backspace=indent,eol,start
Expand Down Expand Up @@ -114,6 +116,8 @@ autocmd BufNewFile,BufRead *.vue set filetype=html
"============================================================

let @i = 'Iciwimportf=xifromf df(i f)xI'
let @o = '/## TODO/---/€kb?^[0-9]\+\. oi'
let @u = 'Go## <title>o---kkl'

"============================================================
" Leader Key Setup <Space>
Expand All @@ -136,6 +140,9 @@ nmap <leader>d :JsDoc<CR>
nmap <leader>q :TernDef<CR>
nmap <leader>n :e <cfile><cr>
nmap <leader>t @o;
nmap <leader>l @u;

"============================================================
" Commands
Expand Down
38 changes: 31 additions & 7 deletions dots/.aliases
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ alias ..='cd ..'
alias cd..='cd ..'
alias be='bundle exec'
alias c='clear'
alias code='cd ~/Code'
alias code='cd ~/Work/Code'
alias d='docker'
alias dbuild='docker-compose build'
alias dcomp='docker-compose'
Expand All @@ -18,7 +18,6 @@ alias fuck='sudo $(fc -ln -1)'
alias ll='lm -a'
alias lm='ls -GlhF --color --group-directories-first'
alias ls='gls'
alias notes='cd ~/Notes'
alias ovim='/usr/local/bin/vim'
alias rust-musl-builder='docker run --rm -it -v "$(pwd)":/home/rust/src ekidd/rust-musl-builder'
alias serve='python ~/.dotfiles/scripts/python-server.py'
Expand Down Expand Up @@ -127,12 +126,37 @@ archive() {
mv $1 ~/.CODE_ARCHIVE/$FILENAME
}

note() {
TITLE=$1
if [ ! -z "$TITLE" ]; then
TITLE="$TITLE-"
yesterday() {
DATE=$(date -v -1d +%F)
NOTESDIR="$HOME/Notes/$DATE"
FILENAME="$NOTESDIR/notes.md"

vim $FILENAME
}

notes() {
DATE=$(date +%F)
NOTESDIR="$HOME/Notes/$DATE"

# If there is an argument supplied, then we open a file with that name.
if [ ! -z "$1" ]; then
FILENAME="$NOTESDIR/$1.md"
[ ! -f $FILENAME ] && echo "# $1\n\n" > $FILENAME
vim $FILENAME
return 0
fi
command code ~/Notes/$TITLE$(date +%Y-%m-%dT%H:%M:%S).md

# Create the directory for todays notes if it isn't already.
[ ! -d $NOTESDIR ] && mkdir -p $NOTESDIR;

# If we don't provide an argument, open the default notepad.
FILENAME="$NOTESDIR/notes.md"
if [ ! -f $FILENAME ]; then
NICEDATE=$(date "+%A %B %d, %Y")
echo "# Notes for $NICEDATE\n\n---\n\n\n---\n\n## TODO\n\n1. \n\n---" > $FILENAME;
fi

vim $FILENAME
}

#============================================
Expand Down
17 changes: 3 additions & 14 deletions dots/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ export RUST_SRC_PATH=$HOME/.multirust/toolchains/nightly-x86_64-apple-darwin/lib
export HISTFILE=$HOME/.zsh_history
export HISTSIZE=500
export SAVEHIST=$HISTSIZE

export http_proxy=localhost:3128
export https_proxy=localhost:3128

#============================================
# Vi in CLI Mode
Expand Down Expand Up @@ -78,8 +79,7 @@ fpath+=("$HOME/.zfunc")
#============================================
# Prompt
#============================================
autoload -U promptinit; promptinit
prompt pure
eval "$(starship init zsh)"


#============================================
Expand Down Expand Up @@ -110,14 +110,3 @@ export TMUX_COLOR_HIGHLIGHT_IDLE_FG='#555555'
source $HOME/.dotfiles/themes/dracula.sh
#source $HOME/.dotfiles/themes/solarized.sh
#source $HOME/.dotfiles/themes/molokai.sh
#

# tabtab source for serverless package
# uninstall by removing these lines or running `tabtab uninstall serverless`
[[ -f /Users/tom/Code/jobish/jobish-api/node_modules/tabtab/.completions/serverless.zsh ]] && . /Users/tom/Code/jobish/jobish-api/node_modules/tabtab/.completions/serverless.zsh
# tabtab source for sls package
# uninstall by removing these lines or running `tabtab uninstall sls`
[[ -f /Users/tom/Code/jobish/jobish-api/node_modules/tabtab/.completions/sls.zsh ]] && . /Users/tom/Code/jobish/jobish-api/node_modules/tabtab/.completions/sls.zsh
# tabtab source for slss package
# uninstall by removing these lines or running `tabtab uninstall slss`
[[ -f /Users/tom/Code/jobish/jobish-api/node_modules/tabtab/.completions/slss.zsh ]] && . /Users/tom/Code/jobish/jobish-api/node_modules/tabtab/.completions/slss.zsh
6 changes: 0 additions & 6 deletions git/hooks/prepare-commit-msg

This file was deleted.

22 changes: 12 additions & 10 deletions setup.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,31 @@
# Dotfiles
#=============================================
GLOBIGNORE=".:.." && for f in dots/*; do
[ ! -h "$f" ] && ln -s "$(pwd)/$f" "$HOME/$i"
[ ! -h "$f" ] && ln -s "$(pwd)/$f" "$HOME$i"
done

touch $HOME/.custom
source $HOME/.aliases


#=============================================
# Neovim Configuration
# Neovim Configuration Files
#=============================================
[ ! -d "$HOME/.config/nvim" ] && mkdir -p $HOME/.config/nvim
[ ! -h "$HOME/.config/nvim/init.vim" ] && ln -s $HOME/.dotfiles/config/nvim/init.vim $HOME/.config/nvim/init.vim
[ ! -h "$HOME/.config/nvim/extras" ] && ln -s $HOME/.dotfiles/config/nvim/extras $HOME/.config/nvim/extras
nvimconfs=(
init.vim
extras
)

mkdir -p $HOME/.config/nvim

for i in "${nvimconfs[@]}"; do
ln -sF "$HOME/.dotfiles/config/nvim/${i}" "$HOME/.config/nvim/${i}"
done


#=============================================
# Directories
#=============================================

# Source code
mkdir -p $HOME/Source

# ZSH functions
mkdir -p $HOME/.zfunc

Expand All @@ -40,7 +43,6 @@ sh ./setup/brew.sh
sh ./setup/npm.sh
sh ./setup/pip.sh
sh ./setup/rust.sh
sh ./setup/source.sh


#=============================================
Expand Down
8 changes: 2 additions & 6 deletions setup/brew.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,13 @@ packages=(
kubernetes-cli
mas
neovim
python
python3
rbenv
ripgrep
starship
tmux
tree
vim
yarn --ignore-dependencies
zplug
zsh
)
Expand All @@ -31,13 +30,10 @@ packages=(
casks=(
docker
firefox
google-chrome
iterm2
marshallofsound-google-play-music-player
postman
slack
visual-studio-code
keeweb
visual-studio-code
)

if ! program_exists brew; then
Expand Down
4 changes: 1 addition & 3 deletions setup/npm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
source $HOME/.aliases

# Global Packages
packages=(
serverless
)
packages=()

for package in "${packages[@]}"; do
if npm list -g $package > /dev/null; then
Expand Down
8 changes: 0 additions & 8 deletions setup/source.sh

This file was deleted.

4 changes: 3 additions & 1 deletion vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"http.proxyStrctSSL": false,
"editor.fontFamily": "Menlo, Monaco, 'Courier New', monospace",
"editor.fontSize": 13,
"editor.tabSize": 2,
Expand Down Expand Up @@ -133,5 +134,6 @@
"utilising"
],
"terminal.integrated.scrollback": 6000,
"cSpell.language": "en-GB"
"cSpell.language": "en-GB",
"vsicons.dontShowNewVersionMessage": true
}

0 comments on commit e0a9a60

Please sign in to comment.