Saturday, November 24, 2012

A Tmux Crash Course

SkyHi @ Saturday, November 24, 2012

I’ve been using Tmux for about six months now and it has become just as essential to my workflow as vim. Pane and window management, copy-mode for navigating output, and session management make it a no-brainer for those who live in the terminal (and especially vim). I’ve compiled a list of tmux commands I use daily to help me work more efficiently.
Tmux Panes
If a tmux command I mention is bound to a keyboard shortcut by default, I’ll note that in parenthesis.

SESSION MANAGEMENT

Sessions are useful for completely separating work environments. I have a ‘Work’ session and a ‘Play’ session; in ‘Work’, I keep everything open that I need during my day-to-day development, while in ‘Play’, I keep open current open-source gems or other work I hack on at home.
tmux new -s session_name
creates a new tmux session named session_name
tmux attach -t session_name
attaches to an existing tmux session named session_name
tmux switch -t session_name
switches to an existing session named session_name
tmux list-sessions
lists existing tmux sessions
tmux detach (prefix + d)
detach the currently attached session

WINDOWS

Tmux has a tabbed interface, but it calls its tabs “Windows”. To stay organized, I rename all the windows I use; if I’m hacking on a gem, I’ll name the window that gem’s name. The same thing goes for client applications. That way, I can recognize windows by context and not what application it’s running.
tmux new-window (prefix + c)
create a new window
tmux select-window -t :0-9 (prefix + 0-9)
move to the window based on index
tmux rename-window (prefix + ,)
rename the current window

PANES

Panes take my development time from bland to awesome. They’re the reason I was able to uninstall MacVim and develop solely in iTerm2. I don’t have to switch applications to switch contexts (editing, reading logs, IRB, etc.) - everything I do, I do in a terminal now. People argue that OS X’s Cmd+Tab is just as fast, but I don’t think so.
tmux split-window (prefix + ")
splits the window into two vertical panes
tmux split-window -h (prefix + %)
splits the window into two horizontal panes
tmux swap-pane -[UDLR] (prefix + { or })
swaps pane with another in the specified direction
tmux select-pane -[UDLR]
selects the next pane in the specified direction
tmux select-pane -t :.+
selects the next pane in numerical order

HELPFUL TMUX COMMANDS

tmux list-keys
lists out every bound key and the tmux command it runs
tmux list-commands
lists out every tmux command and its arguments
tmux info
lists out every session, window, pane, its pid, etc.
tmux source-file ~/.tmux.conf
reloads the current tmux configuration (based on a default tmux config)

MUST-HAVES

These are some of my must-haves in my tmux config:
# remap prefix to Control + a
set -g prefix C-a
unbind C-b
bind C-a send-prefix

# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf

# quick pane cycling
unbind ^A
bind ^A select-pane -t :.+

WORKFLOW

During the day, I’ll work on one or two Rails apps, work on my dotfiles, run irssi, and maybe run vim in another window to take notes for myself. As I mentioned, I run all of this inside one tmux session (named work) and switch between the different windows throughout the day.
When I’m working on any Ruby work specifically, I’ll have a 75%/25% vertical split for vim and a terminal so I can run tests, interact with git, and code. If I run tests or ‘git diff’ and want to see more output than the 25% allots me, I’ll use tmux to swap the panes and then move into copy mode to see whatever I need to see.
Finally, I run iTerm2 in full-screen mode. Switching between OS X apps for an editor and a terminal is for chumps!



REFERENCES
http://robots.thoughtbot.com/post/2641409235/a-tmux-crash-course

Friday, November 23, 2012

How to Locate Windows Live Mail Store Folder

SkyHi @ Friday, November 23, 2012

All emails of Windows Live Mail are saved in Windows Live Mail Store Folder location. Windows Live Mail uses thestandard EML format and creates folders for each user where all EML files are stored.
This Guide will help you know answers to your question like – “Where does Windows Live Mail store messages?”, “Where does Windows Live Mail store contacts?”, “Where does Windows Live Mail store its files?” & “Where does Windows Live Mail Store my emails?”.

Identify & Locate Your Windows Live Mail Store Folder

To identify the folder where Windows Live Mail stores all EML files follow the below steps:
  1. Open Windows Live Mail, Select Tools | Options from Windows Live Mail toolbar. This will display following Options box:

    Locate Windows Live Mail Store Folder
  2. From the Options box go to the Advanced Tab then click the Maintenance button as shown below:

    How to Locate Windows Live Mail Store Folder?

  3. From the Maintenance box, Click the Store Folder button as shown below:

    Identify Windows Live Mail Store Folder
  4. Now this will display the following box having store folder location as shown below:

    Windows Live Mail Store Folder Location
In Windows Live Mail Store location, you can find respective folders for all the users configured in Windows Live Mail. In each users folder all EML Files are stored.
Knowing the location of where does windows live mail store messages & contacts, you can easily review & archive Windows Live Mail emails (.EML files) & you can easily import EML filesconvert Windows Live Mail to Outlookconvert EML to PST .

REFERENCE