From 9c1317e757c2b973aa90d869086d34f2f643f70b Mon Sep 17 00:00:00 2001 From: Tyrel Souza Date: Thu, 22 Jun 2017 09:55:58 -0400 Subject: [PATCH] emacs stuff, better mysql stuff, git aliases, and vim toggle filenos --- bin/emax | 2 ++ bin/mysql_in_ram.sh | 3 --- gitconfig | 3 ++- vimrc | 5 +++-- 4 files changed, 7 insertions(+), 6 deletions(-) create mode 100755 bin/emax diff --git a/bin/emax b/bin/emax new file mode 100755 index 0000000..3c6f214 --- /dev/null +++ b/bin/emax @@ -0,0 +1,2 @@ +#!/bin/bash +$(/Applications/Emacs.app/Contents/MacOS/Emacs "$@") & diff --git a/bin/mysql_in_ram.sh b/bin/mysql_in_ram.sh index 31bd535..e1e9a0d 100755 --- a/bin/mysql_in_ram.sh +++ b/bin/mysql_in_ram.sh @@ -6,9 +6,6 @@ mysql.server stop killall mysqld killall mysqld killall mysqld -killall mysqld -killall mysqld -killall mysqld diskutil erasevolume HFS+ "ramdisk" `hdiutil attach -nomount ram://2048000` cp -r /usr/local/var/mysql /Volumes/ramdisk mysql.server start diff --git a/gitconfig b/gitconfig index 0e983dd..4f82ff7 100644 --- a/gitconfig +++ b/gitconfig @@ -25,7 +25,8 @@ ll = log --stat --abbrev-commit # Way more information on git log lb = log --stat --no-merges origin/master.. logtree= "log --graph --oneline --decorate --all" # show a tree with branches merging - ob = "!vim $(git diff --name-only origin/master | grep -v .tsv | grep -v .sql | grep -v static)" + ob = "!$EDITOR $(git diff --name-only origin/master | grep -v .tsv | grep -v .sql | grep -v static)" + od = "!$EDITOR $(git diff --name-only HEAD | grep -v .tsv | grep -v .sql | grep -v static)" p = push pr = !"pr() { git fetch origin pull/$1/head:pr-$1; git checkout pr-$1; }; pr" recent = "!git for-each-ref --format=\"%(committerdate:relative) | %(refname)\" --sort=-committerdate refs/heads | sed '/master/d' | head -n 15" # get the most 10 recent branches worked on diff --git a/vimrc b/vimrc index 4dc5816..55d130b 100644 --- a/vimrc +++ b/vimrc @@ -139,14 +139,15 @@ nnoremap Q " Toggle line numbers with F1 - no more stupid help! -nmap :set invnumber +"nmap :set invnumber +nmap :exec &nu==&rnu? "se nu!" : "se rnu!" autocmd StdinReadPre * let s:std_in=1 hi Normal ctermbg=none " Local config let g:go_fmt_command = "goimports" nnoremap :buffers:buffer set background=dark -let vim_markdown_preview_hotkey='' +let vim_markdown_preview_hotkey='' let vim_markdown_preview_github=1 let vim_markdown_preview_browser='Google Chrome'