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.
Create a vertical split using
:vsp and horizontal with
By default, they duplicate the current buffer. This command also takes a filename:
You can specify the new split height by prefixing with a number:
Close the split like you would close vim:
We can use different key mappings for easy navigation between splits to save a
keystroke. So instead of
j, it’s just
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>
Open new split panes to right and bottom, which feels more natural than Vim’s default:
set splitbelow set splitright
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 =
"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
As with everything in Vim, for more information, check the well-written
helpfiles. In Vim,
Come talk splits at a Vim Enthusiast Meetup near you:
Photo credit: Andrew Ressa on Flickr
Written by Adarsh Pandit.
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:
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.
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.
Get your copy of Ruby Science today.
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.