The vi drinking game

Best played with coffee and C/C++, Java, LISP, Fortran, Perl, PHP, or Python. Doesn’t work well with COBOL or FORTH. Could work well with Bourne shell scripting, depending on personal coding practices.

Turn on autoindent (:set autoindent). Every comment you write, take a sip. Take one sip for every begin-comment delimiter. Example: For Bash, PHP, or Perl, every # counts as a sip. In C++, every // counts as a sip. In C and Java, every /* counts as a sip. Multiline comments that use a single opening delimiter (i.e. /*) count as a single sip.

Every time you hit the tab key to indent, take a drink. Python programmers will be very buzzed because of this. đŸ™‚

Advertisements
  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: