Skip to content

Instantly share code, notes, and snippets.

" ~/.vim/ftplugin/clojure.vim
let g:slime_target = "tmux"
map <LocalLeader>co :call VimuxStartLeinREPL()<CR>
map <LocalLeader>cd :call VimuxDefinePreviousEval()<CR>
map <LocalLeader>cl :call VimuxReloadNS(":reload")<CR>
map <LocalLeader>cL :call VimuxReloadNS(":reload-all")<CR>
map <LocalLeader>ct :call VimuxRunTests()<CR>
function! VimuxStartLeinREPL()
SSH_ID=$1
if [ -z "$SSH_ID" ]; then
echo "Error: No ssh config passed."
else
rsync ~/.tmux.conf $SSH_ID:~/.tmux.conf
rsync ~/.vimrc $SSH_ID:~/.vimrc
rsync -avr ~/.vim/ $SSH_ID:~/.vim/
rsync -avr ~/.tmux/ $SSH_ID:~/.tmux/
fi
" ~/.vim/ftplugin/python.vim
" syntastic (recommended settings)
let g:syntastic_python_checkers = ['pylint']
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
" let g:syntastic_python_pylint_post_args="--max-line-length=79"
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
" ~/.vim/ftplugin/tex.vim
"" vim-latex
" IMPORTANT: grep will sometimes skip displaying the file name if you
" search in a singe file. This will confuse Latex-Suite. Set your grep
" program to always generate a file-name.
set grepprg=grep\ -nH\ $*
" OPTIONAL: Starting with Vim 7, the filetype of empty .tex files defaults to
" 'plaintex' instead of 'tex', which results in vim-latex not being loaded.
@eltonlaw
eltonlaw / mkd.vim
Last active December 20, 2017 18:31
" ~/.vim/ftplugin/mkd.vim
setlocal colorcolumn=0
setlocal linebreak
setlocal nonumber
setlocal shiftwidth=4
setlocal spell
setlocal tabstop=4
setlocal wrap
setlocal colorcolumn=0
" ~/.vim/ftdetect/mkd.vim
au! BufRead,BufNewFile *.markdown set filetype=mkd
au! BufRead,BufNewFile *.md set filetype=mkd
@eltonlaw
eltonlaw / html.vim
Last active December 20, 2017 18:00
" ~/.vim/ftplugin/html.vim
set omnifunc=htmlcomplete#CompleteTags
@eltonlaw
eltonlaw / setup.sh
Last active March 30, 2019 18:13
Setup configuration for MacOS
mkdir ~/.vim-tmp # custom vim .swp trash can
# Install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Setup dev environment
brew install wget
# Download config files
wget -P ~/ https://gist.githubusercontent.com/eltonlaw/13259a65f4ea0a85a74cfc2d03fad29c/raw/.bash_profile
[MASTER]
# Specify a configuration file.
#rcfile=
# Python code to execute, usually for sys.path manipulation such as
# pygtk.require().
#init-hook=
# Add files or directories to the blacklist. They should be base names, not
@eltonlaw
eltonlaw / bash-cheatsheet.sh
Created July 17, 2017 21:09 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04