Jon Aquino's Mental Garden

Engineering beautiful software jon aquino labs | personal blog

Monday, February 24, 2014

Sublime Text Window-Splitting Bliss

I'm trying out Sublime Text again, and I'm really missing how easy it is to split windows in jEdit. In jEdit, you just do:

  • Command+2 to split the window horizontally.
  • Command+3 to split the window vertically.
  • Command+0 to unsplit the window.

Well, it turns out you can do this in Sublime Text! First, install the Origami plugin. Then add the following keybindings:

    { "keys": ["super+0"], "command": "destroy_pane", "args": {"direction": "self"} },
    { "keys": ["super+2"], "command": "create_pane_with_cloned_file", "args": {"direction": "right"} },
    { "keys": ["super+3"], "command": "create_pane_with_cloned_file", "args": {"direction": "down"} }

Now you can split your windows super-easily. Origami's default keybindings are pretty hard to remember and use, but the above is all you need.

Tuesday, February 18, 2014

How I am writing commit messages now

I am trying a new way of writing commit messages based on Thoughtbot's 5 Useful Tips For A Better Commit Message. Basically my commit messages now look like this:

[Ticket number]: Summary: 1-line description: what and why

Problem: ...

Solution: ...

Side-effects: ...

Example:

[BDZL-4222] Summary: Digest's link "To control which emails you receive" is incorrect

Problem: The digest core has a link to /profiles/profile/emailSettings. However, this link is the old Bazel URL; in Bedazzle, the URL has changed to /main/profilesettings/email.

Solution: Make /profiles/profile/emailSettings redirect to /main/profilesettings/email.

Side effects: /profiles/profile/emailSettings responds with a 302 to /main/profilesettings/email, instead of a 404.

We'll see how long I can keep this up. The quality of these commit messages is great though - they give the why and the how of your commit.