git and vim cleanup
* remove banned pre-commit check as it's more annoying than anything * update iife snippet * change to jellybeans colorscheme * vim add Gread shortcut * NOP Q in vim
This commit is contained in:
@@ -1,26 +0,0 @@
|
|||||||
#!/bin/zsh
|
|
||||||
# Banned Words
|
|
||||||
# If the file(s) being commited contain any of the below banned words
|
|
||||||
# then fail the commit
|
|
||||||
|
|
||||||
COLOR_RED="\x1B[31m"
|
|
||||||
COLOR_GREEN="\x1B[32m"
|
|
||||||
COLOR_NONE="\x1B[0m"
|
|
||||||
|
|
||||||
LIST="debugger\|console\|TODO\|FIXME\|BANNED"
|
|
||||||
|
|
||||||
if `git rev-parse --verify HEAD >/dev/null 2>&1`; then
|
|
||||||
against=HEAD
|
|
||||||
else
|
|
||||||
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
|
|
||||||
fi
|
|
||||||
|
|
||||||
for FILE in `git diff-index --name-status --cached $against -- | cut -c3-` ; do
|
|
||||||
# check if the fil contains one fo the words in the list
|
|
||||||
if grep -w $LIST $FILE; then
|
|
||||||
echo ""
|
|
||||||
echo "${COLOR_RED}✘ ${FILE} contains a banned word.${COLOR_NONE}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
echo "${COLOR_GREEN}✔ No banned words detected${COLOR_NONE}"
|
|
||||||
@@ -25,6 +25,7 @@ snippet fun
|
|||||||
}
|
}
|
||||||
snippet iife
|
snippet iife
|
||||||
(function () {
|
(function () {
|
||||||
|
${1}
|
||||||
})();
|
})();
|
||||||
# log snippets
|
# log snippets
|
||||||
snippet log
|
snippet log
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ call matchadd('ColorColumn', '\%81v', 100)
|
|||||||
set encoding=utf8
|
set encoding=utf8
|
||||||
set t_Co=256 " Explicitly tell vim that the terminal supports 256 colors"
|
set t_Co=256 " Explicitly tell vim that the terminal supports 256 colors"
|
||||||
set background=dark
|
set background=dark
|
||||||
colorscheme smyck
|
colorscheme jellybeans
|
||||||
|
|
||||||
" set number " show line numbers
|
" set number " show line numbers
|
||||||
set relativenumber " show relative line numbers
|
set relativenumber " show relative line numbers
|
||||||
@@ -194,6 +194,9 @@ nmap <leader><space> :%s/\s\+$<cr>
|
|||||||
" shortcut to save
|
" shortcut to save
|
||||||
nmap <leader>, :w<cr>
|
nmap <leader>, :w<cr>
|
||||||
|
|
||||||
|
" disable Visual mode
|
||||||
|
noremap Q <NOP>
|
||||||
|
|
||||||
" set paste toggle
|
" set paste toggle
|
||||||
set pastetoggle=<F6>
|
set pastetoggle=<F6>
|
||||||
|
|
||||||
@@ -292,6 +295,7 @@ let g:ctrlp_working_path_mode = 'ra'
|
|||||||
" Fugitive Shortcuts
|
" Fugitive Shortcuts
|
||||||
nmap <silent> <leader>gs :Gstatus<cr>
|
nmap <silent> <leader>gs :Gstatus<cr>
|
||||||
nmap <leader>ge :Gedit<cr>
|
nmap <leader>ge :Gedit<cr>
|
||||||
|
nmap <silent><leader>gr :Gread<cr>
|
||||||
|
|
||||||
" toggle syntastic
|
" toggle syntastic
|
||||||
nmap <leader>s :SyntasticToggleMode<cr>
|
nmap <leader>s :SyntasticToggleMode<cr>
|
||||||
|
|||||||
Reference in New Issue
Block a user