Skip to content

Instantly share code, notes, and snippets.

@lepht
lepht / vim-scp
Last active December 27, 2015 19:29
vim-scp Uses scp to copy a local version of the remote file over scp, edit it with vim, and with each save connect via scp and save it to the remote location. Original source: [Fast remote editing with Vim - Erik Zaadi](http://www.erikzaadi.com/2013/03/07/fast-remote-editing-with-vim/)
#!/bin/sh
# The vim binary you would like to use
# eg `mvim -f` will run macvim
VIM_BIN="mvim -f"
echo "vim-scp FTW"
if [ $# -ne 2 ]; then
echo "usage : `basename $0` user@host /path"
exit 1
# original from @ttscoff http://brettterpstra.com/2014/05/11/making-my-tmux-life-easier/
# print a banner for the current window name within tmux
tm-win-banner() {
local winname sessionname
if [[ -n $TMUX ]]; then
sessionname=`tmux list-panes -F "#S"`
winname=`tmux display-message -p '#{window_name}'`
figlet -w `tput cols` -f graffiti "$sessionname:$winname"
fi
@lepht
lepht / .vimrc.indent
Created May 13, 2014 15:45
vim indent settings
filetype on
filetype plugin indent on
set autoindent
set copyindent
@lepht
lepht / GistList!.md
Created September 19, 2014 21:31
Try GistList for iOS! http://gistlist.io/

##alt text GistList: TODO for coders alt text

Keybase proof

I hereby claim:

  • I am lepht on github.
  • I am petec (https://keybase.io/petec) on keybase.
  • I have a public key whose fingerprint is C7B7 846B E6D4 E0E6 C606 801D D27F 4A79 7675 81EB

To claim this, I am signing this object: