This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
import os | |
def make_detailed_fname(basedir, dirpath, fname): | |
return dirpath[len(basedir):].replace('!', '').replace(' ', '_')\ | |
.replace('/', '_') + '_' + fname | |
if __name__ == '__main__': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script for installing tmux on systems where you don't have root access. | |
# tmux will be installed in $HOME/local/bin. | |
# It's assumed that wget and a C/C++ compiler are installed. | |
# exit on error | |
set -e | |
TMUX_VERSION=1.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let g:ctrlp_buffer_func = { 'enter': 'CtrlPMappings' } | |
function! CtrlPMappings() | |
nnoremap <buffer> <silent> <C-@> :call <sid>DeleteBuffer()<cr> | |
endfunction | |
function! s:DeleteBuffer() | |
let path = fnamemodify(getline('.')[2:], ':p') | |
let bufn = matchstr(path, '\v\d+\ze\*No Name') | |
exec "bd" bufn ==# "" ? path : bufn |