giant robots smashing into other giant robots

Written by thoughtbot

adarshp

Vim Splits - Move Faster and More Naturally

Most of us are Vim users and have tweaked our favorite editor for speed and convenience. See thoughtbot’s dotfiles.

One of my favorite tools is the window split. Here is a quick splits overview and configurations to use them more effectively.

7_10_split

The basics

Create a vertical split using :vsp and horizontal with :sp.

By default, they duplicate the current buffer. This command also takes a filename:

:vsp ~/.vimrc

You can specify the new split height by prefixing with a number:

:10sp ~/.zshrc

Close the split like you would close vim:

:q

Easier split navigations

We can use different key mappings for easy navigation between splits to save a keystroke. So instead of ctrl-w then j, it’s just ctrl-j:

nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>

More natural split opening

Open new split panes to right and bottom, which feels more natural than Vim’s default:

set splitbelow
set splitright

Resizing splits

Vim’s defaults are useful for changing split shapes:

"Max out the height of the current split
ctrl + w _

"Max out the width of the current split
ctrl + w |

"Normalize all split sizes, which is very handy when resizing terminal
ctrl + w =

More split manipulation

"Swap top/bottom or left/right split
Ctrl+W R

"Break out current window into a new tabview
Ctrl+W T

"Close every window in the current tabview but the current one
Ctrl+W o

:help!

As with everything in Vim, for more information, check the well-written helpfiles. In Vim, :help splits.

Vim Meetups

Come talk splits at a Vim Enthusiast Meetup near you:

Photo credit: Andrew Ressa on Flickr

Written by Adarsh Pandit.

dancroak

Online presentation with thoughtbot and Heroku

Adarsh, Alex, and I are giving a free online presentation with Abe from Heroku about how their platform fits into our process. Over 1,400 people have registered so far! The details:

  • Tomorrow, April 17
  • Once at 7:00am PST (2:00pm GMT / 7:30pm IST)
  • A second time at 10:00am PST (5:00pm GMT / 10:30pm IST)

Heroku event

RSVP here.

We will be live coding(!), making a single change to a live web application hosted on Heroku within the context of a common process for us:

We will also show a few other goodies:

We will share an open source web application and a read-only Trello board during the presentation. There will be a question-and-answer session at the end.

Hope to see you online! RSVP here.

UPDATE: Heroku has posted a recording to YouTube.

Episode 44: I feel the opposite of burnt out

In this week’s podcast, Ben Orenstein is joined by Chad Fowler, author, speaker, and CTO of 6wunderkinder. Ben and Chad discuss Chad’s recent move to Berlin and 6wunderkinder, what a CTO does, getting back to coding, the early Ruby community, who Chad wants to hire, predicting success of new hires, and what makes a truly good developer, favorite interview questions, how Chad’s interviewing process has changed over time, how age and experience can change your perspective, how Chad built a great team, and what he might write about in the future. They also discuss Chad’s new tattoo, his regrets, meditation, therapy, gaining control over your mind, and much, much more.

jferris

Ruby Science Redesigned

We just pushed a new design for Ruby Science. Previous purchasers and Prime subscribers can grab the update on Learn.

The new design includes a new layout, which is much more appropriate for a book. We updated the typeface and font size to improve the experience when reading the book on a screen as opposed to a printed page. The margin size is also greatly reduced, making it easier to zoom in on a laptop screen and bring the text right to the edges.

Before and After

Get your copy of Ruby Science today.

Now Available For Free With Learn Prime

We recently announced the launch of our subscription service: Learn Prime.

For just $99/month, you get ongoing access to everything we teach, including books like Ruby Science. You’ll even get access to all our in-person and online workshops. Get access to exclusive subscriber content, as well as access to our private Campfire room, where you can get live help from thoughtbot designers and developers.

Subscribe now.

Episode 43: A good person by default

thoughtbot’s Ben Orenstein is joined by Scott Orn, venture capitalist at Lighthouse Capital Partners by day, and co-founder of Ben’s Friends by night. Ben and Scott discuss building a community, the future of Ben’s Friends, and how running the site helps him be a better VC, teaching people, and getting value out of giving back. They also talk about his work as a venture capitalist at Lighthouse, how the money flows, the freemium software model, why it’s good and how it works, picking the winners, and how the market can affect success, and the companies Scott thinks are great investments, and where he thinks the market is going.