Example .screenrc - A Simple Workflow

GNU screen is a terminal application that lets you run multiple terminals within a single terminal instance. This tool, which has been around for ages, can greatly improve your organization and workflow.

An Example .screenrc

The screenrc file is a file that allows for customization of GNU Screen, similar to how .vimrc helps you customize your VIM experience. The example .screenrc source below offers the following features:
  • Visual tabs for all screen instances
  • VIM-like movement through split screens
  • No more annoying startup message!
  • Default tabs that aid a rails/WSGI driven workflow
# skip the startup message
startup_message off

# Display a caption string below, appearing like tabs and
# displaying the window number and application name (by default).
caption always
caption string "%{kw}%-w%{wr}%n %t%{-}%+w"
#
# j to move down a window, k to move up. Like teh VIM!
bind j focus down
bind k focus up
#
# Default screens
screen -t VIM
screen -t Git
screen -t Console
screen -t Server
#
# Select first screen
select 0

A screenshot of the implementation: Screenshot of my GNU Screen Environment

Workflow

Feel free to change the names of the default tabs. I personally find this tab scheme extremely helpful in keeping myself organized. For those interested in adopting this scheme, or those who just like to examine other developer's workflows, I'll explain my interaction with each tab.

VIM

The VIM tab is where I do all my text editing. All text editing should be done here! Opening a text editor in another tab can lead to overwritten files if you are careless and/or under-caffeinated.

Git

All version control related commands should occur in the Git tab. (Feel free to rename to SVN if you're THAT type of person ;) )

Console

The console tab is the one I'm most flexible with. In a Rails/Flask environment, this would be where I run rails console/python respectively. A lot of individual function testing is done in this tab. Additionally, I use this tab for general UNIX commands such as mv, touch, and cp.

Server

This tab is where I execute my local server commands, such as rails s. August 20, 2011
About the Author:

Joseph is the lead developer of Vert Studios Follow Joseph on Twitter: @Joe_Query
Subscribe to the blog: RSS
Visit Joseph's site: joequery.me