Skip to content

Instantly share code, notes, and snippets.

@zemoxian
zemoxian / tmux.md
Last active August 29, 2015 14:17 — forked from andreyvit/tmux.md

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@zemoxian
zemoxian / get_long_name.rb
Created November 16, 2011 02:11
Get a long path from a short path on Windows
# idea from :http://web.archive.org/web/20020617214130/http://vb-world.net/files/tip511.html
require 'win32ole'
def get_long_filename(shortpath, fso = WIN32OLE.new("Scripting.FileSystemObject"))
path = case
when fso.FolderExists(shortpath)
fso.GetFolder(fso.GetAbsolutePathName(shortpath))
when fso.FileExists(shortpath)
fso.GetFile(fso.GetAbsolutePathName(shortpath))