Venturing into Vim – Week 2: Premium Video


Some say it’s a decade-old piece of junk; others widely consider it to be the best code editor available. I’m on a quest to find out for myself. So, for four weeks (and four screencasts to track my progress), I will use nothing but Vim.

Along the way, if you choose to join me, I’ll share what I’ve learned, what frustrated me, and everything that falls in between. If you’ve been hoping to venture into Vim territory, there’s no better time to do so! Let’s do it together. Gain access to this screencast series, as well as many others by becoming a Premium member.


Week 2

In this next episode, we learn about:

  • buffers
  • tabs and windows
  • mappings and abbreviations
  • the best plugins available, and how to use them
  • more keyboard shortcuts

Join Net Premium

NETTUTS+ Screencasts and Bonus Tutorials

For those unfamiliar, the family of Tuts+ sites runs a premium membership service. For $9 per month, you gain access to exclusive premium tutorials, screencasts, and freebies from Nettuts+, Psdtuts+, Aetuts+, Audiotuts+, Vectortuts+, and CgTuts+ For the price of a pizza, you’ll learn from some of the best minds in the business. Become a Premium member to read this tutorial, as well as hundreds of other advanced tutorials and screencasts.

Quick Tip: Dissecting jQuery – Grep


In this latest episode of “Dissecting jQuery,” we’ll peal back the cover of $.grep, and learn exactly what’s happening behind the scenes.

jQuery Source for grep

// jQuery source for the grep method
grep: function( elems, callback, inv ) {
		var ret = [];

		// Go through the array, only saving the items
		// that pass the validator function
		for ( var i = 0, length = elems.length; i < length; i++ ) {
			if ( !inv !== !callback( elems[ i ], i ) ) {
				ret.push( elems[ i ] );
			}
		}

		return ret;
	}

Hopefully, you now have a better understanding of what’s happening behind the scenes. Just remember: any time that you need to remove items from an array, $.grep will do the trick quite nicely!

25 Vim Tutorials, Screencasts, and Resources


As I continue my self-imposed thirty days of Vim, I’ve come across a plethora of excellent tutorials, resources…even screencasts. If you’re like me, and are just beginning to dig into this fantastic open source editor, hopefully the following will help to push you along.


Screencasts

1. Derek Wyatt’s Blog

Derek Wyatt Blog

Derek Wyatt quite possibly has the best selection of Vim related screencasts on the web. Even better, he covers the spectrum, by offering screencasts for beginners, all the way to advanced topics. I’ve watched all of them myself, and continue to come back! These are highly recommended.

2. Smashing into Vim

PeepCode

When I initially asked on Twitter where I could better learn about Vim, once of the most recommended resources was PeepCode’s Smashing into Vim two-part series. Though not free ($9), I still learned quite a bit, and recommend it!

3. Vimcasts.org

Vimcasts

Though this site is currently on hiatus, Vimcasts.org provides a new and helpful screencast each week. Focusing on the fundamentals of working with Vim, these videos come highly recommended!

4. Top Vim Plugins

When first getting started with Vim, even installing plugins is a difficult process — let alone which ones to get! This helpful YouTube video: Top Vim Plugins does the trick in roughly eight minutes.

5. An Introduction to Vim Macros

Another fantastic video series, Justin Lilly created seven or so video tutorials on working with Vim. Definitely watch the ones that interest you!

6. Venturing into Vim: Premium Video Series

Don’t forget about us! Sometimes it’s easier to learn a new platform, framework, or language from the student sitting next to you, rather than the teacher, ironically. As I continue my thirty days of Vim, I’m logging my progress each week. That way, you can work along. We’re only on week two (as of today), so now is a great time to become a Premium member if you’d like to participate.


Tutorials

1. Vim Introduction and Tutorial

This one is a helpful (and scrollable friendly) tutorial that should quickly get you up and running with the fundamentals.

2. Vim Cookbook

“This is the Vim cookbook page. It contains short recipes for doing many simple and not so simple things in Vim. You should already know the basics of Vim, however each command is explained in detail. “

3. Vim: An Amuse-Bouche

Perhaps less tutorial, and more thoughts, I took some time a couple days ago to discuss my first experiences with Vim, and why I’m quickly becoming an advocate.

4. Efficient Editing with Vim

“This tutorial assumes a basic knowledge of vim — insert mode, command mode, loading and saving files, etc. It is intended to help vi novices develop their skills so that they can use vi efficiently.”

5. 10 Terminal Commands that will Boost your Productivity

Though not specifically Vim related, a solid understanding of the Terminal is required. This round-up of tips should help you to get started!

6. Everyone Who Tried to Convince Me to use Vim was Wrong

Yehuda Katz, who is a core team member of Ruby on Rails, discusses his troubles with switching from TextMate over to Vim. He notes that what worked for him was adopting the platform incrementally with MacVim. This allows for the use of the common commands that we’re all used to. It’s a good read if you’re still on the fence.

7. vimtutor

Let’s not forget perhaps the best resource available on Vim, which is 100% free. Simply switch to normal mode, and type: :! vimtutor. Vim provides a thirty minute hands-on training course that you should really try to work through, if you’re just getting started.


Resources

1. 100 Color Themes

100 Color Schemes

When searching for additional color schemes for Vim, I came across a massive bundle of 100 unique skins, which can be downloaded all at once. I’m currently using the dusk theme.

2. ZenCoding

If you’re not familiar with Zen Coding yet, learn it…and use it! In fact, I have a tutorial on it. One of my initial gripes with Vim was that it seemed as if I would have to give Zen Coding up — which I’ve grown to rely on. Luckily, this isn’t so, thanks to the excellent zencoding.vim plugin.

3. SnipMate

Again, one of the fantastic features of TextMate is its bundle feature. This allows you to, for instance, type <div> + tab, and have a full div element expanded. It’s tremendously helpful. Thankfully, this has been adapted, via a plugin, for Vim: snipmate.vim.

4. Surround

The surround plugins kicks major butt. As you might have guessed, it allows you to wrap portions of text with parens, tags, braces, etc. As an example, with the plugin installed, if I wanted to select a line of text and automatically wrap it within <p> tags, I could, in normal mode, type:

VS<p>
Surround plugin

If you later decide to change the wrapping tag from a p to an h1, that’s easy too! Simply type:

// Change Surround Tags with an H1.
cst<h1>

5. TComment

Plugins can be as intricate or as simple as necessary. TComment’s primary purpose is to allow you to easily and quickly comment certain lines of your code. It will automatically determine the file type, and create the comment syntax to match. If I’m working within a JavaScript file and want to comment out a particular line, I can quickly do so by typing in normal mode:

<c-_><c-_> // Control _ Control _

6. NERDTree

NERDTree

File browsing in Vim can be a bit more difficult than necessary. However, there are a full crop of plugins that hugely simplify the process. My favorite (so far) is called NERDTree.

“The NERD tree allows you to explore your filesystem and to open files and directories. It presents the filesystem to you in the form of a tree which you manipulate with the keyboard and/or mouse. It also allows you to perform simple filesystem operations.”

7. Graphical Cheat Sheet

For the visual learners out there, this cheat sheet, though a bit old, still is perfectly relevant. Print it out, and put it on your wall!

8. The Vim Book (Links to PDF)

What better way to learn Vim than to read the manual for free! Here’s a direct link to the pdf.

9. MacVim Editor

MacVim

MacVim is the perfect medium between working hardcore within Terminal, and using an editor that you’re more familiar with. This way, you still have access to the common commands, like Command S (to save) that we’re all familiar with.

10. Tim Pope’s Plugins

Tim Pope is a widely respected member of the community, and has developed at least a dozen excellent plugins, particularly for Git and Rails users.

11. Still Undecided: Hear from your Peers

If you’re still undecided about making the switch to Vim, sometimes it’s helpful to hear the thoughts of your peers. This StackOverflow forum thread is definitely worth a read in those cases.

12. Ultimate Vim Config

Really, the first thing you need to do, when setting up Vim, is to configure your .vimrc file. This is essential. Steve’s “Ultimate .vimrc File” should provide a great base for your own.


Conclusion

From personal experience, Vim is ridiculously daunting, until, one day, it’s not. It all comes down to memorizing a few dozen keyboard commands. Once you’ve done so, you’re in for a real treat!

Postbox 2.0 available now!

We’ve covered Postbox in the past, and I’ve been using it regularly since the beta. Version 2.0 was just officially released, and there’s a lot to love in the latest incarnation of this Mail.app replacement.

Postbox already had some great organization capabilities, including “Conversation” views for email threads, and “Topics” for tagging messages and quickly sorting them. With version 2.0, organization is faster and even easier, thanks to features like Quick Move and some new keyboard shortcuts. There’s even a Quick Reply feature which lets you respond to a message from within the message or thread by hitting Shift-R (a lot like GMail). There are also keyboard shortcuts for navigating mailboxes and accounts without touching your mouse.

The new Universal Inbox and Account Groups views make it easy to manage multiple accounts and multiple inboxes from one screen. Combined with the tab features of Postbox, you can effectively handle quite a few accounts with very little effort. There are also new “Focus” panes, where you can view To-Dos and filter by Has Attachment, Unread, Topics, Favorite Contacts and Dates. For a full list of new features, check out the Feature List at the Postbox website.

Postbox is free to try, and $39.95US for a license. There’s also a free version, Postbox Express, if you don’t need all of the extra bells and whistles. There’s even a Windows version available! Check it out (especially if you’re a keyboard lover or running Mail.app with Mail Act-On or similar).

TUAWPostbox 2.0 available now! originally appeared on The Unofficial Apple Weblog (TUAW) on Wed, 29 Sep 2010 18:00:00 EST. Please see our terms for use of feeds.

Read | Permalink | Email this | Comments

YouTube options, iPad multitasking animation, Game Center flagging coming in iOS 4.2

9to5Mac has been digging through the brand new iOS 4.2 beta, and they’ve found a few new features hidden in the mix. First up, the build offers some new YouTube uploading options — you can now choose to make your uploaded YouTube videos public, unlisted, or private right on upload. Honestly, I’ve had hit-or-miss luck with uploading to YouTube straight from my iPhone, but it’s nice to know the process is being worked on. Maybe we’ll have some optimization come along with the new options.

Second, as you can see above, the iPad has gotten itself a brand new multitasking animation. Instead of just pulling up whatever app you’re switching to, it’ll actually spin the windows around (this functionality is already up and running on the iPhone, but now it’ll be available on the iPad as well). And finally, last but definitely not least, it looks like iTunes will be getting some Game Center indicators — you’ll be able to see directly from the App Store listing when an app is compatible with Apple’s official Game Center features.

That last one is a big one, given that Game Center integration seems to be selling games lately. It’s unfortunate that we probably won’t have any other icons like that — it would be cool to browse the App Store and instantly see whether a game is compatible with OpenFeint or Plus+, or whether it has local or online multiplayer or just leaderboard functionality. But Apple’s probably not interested in that other stuff — it’s just selling Game Center integration for now. You can look forward to all of these features in iOS 4.2, which is scheduled to come to the public in November.

TUAWYouTube options, iPad multitasking animation, Game Center flagging coming in iOS 4.2 originally appeared on The Unofficial Apple Weblog (TUAW) on Wed, 29 Sep 2010 17:30:00 EST. Please see our terms for use of feeds.

Read | Permalink | Email this | Comments

TUAW TV Live: The Steve and Sam show

As mentioned earlier today, my guest for today’s episode of TUAW TV Live is Sam Levin, the brains and voice behind AppMinute.com and the AppMinute podcast (iTunes link). I always enjoy having guests on the show, and today’s episode ought to be a lot of fun for viewers as well. We tried to do this show last week, but due to technical issues with our streaming provider, we were unable to.

To join in from your Mac or PC, just go to the next page by clicking the read more link at the bottom of this post, and you’ll find a livestream viewer and a chat tool. The chat tool allows you to join in on the fun by asking questions or making comments.

If you’re driving somewhere and would like to watch TUAW TV Live while you’re stuck in traffic, please don’t — keep your eyes on the road! However, if someone else is doing the driving, you can watch the show on your iPhone by downloading the free Ustream Viewing Application.

iPad users haven’t been forgotten, either, as you can tune in to TUAW TV Live on your iPad! That link will send you to a non-Flash page, although you won’t have access to our chat tool. And one final note — if the show has started and you’re seeing a previously recorded show instead of the livestream, you can always pop on over to ustream.tv/tuaw to join the show in progress.

TUAWTUAW TV Live: The Steve and Sam show originally appeared on The Unofficial Apple Weblog (TUAW) on Wed, 29 Sep 2010 16:55:00 EST. Please see our terms for use of feeds.

Read | Permalink | Email this | Comments

Sonos delivers free iPad remote for its wireless music systems

It must be ‘iPad Remote Week’ because hot on the heels of Apple releasing iTunes remote control for the iPad, Sonos has delivered a very nice, free iPad remote that is feature complete, and elegant in execution.

Previously, Sonos owners had to make do with the iPhone version of the app, which only ran in portrait mode and had to upscale to fill the iPad screen. That’s all fixed now, with the delivery of the Sonos Controller for iPad. I gave it a run through last night, and it is a pleasure to use. The larger iPad screen means most functions are right on the front page, so there’s no hunting around for hidden functions. You get album art, zone control, and music source selection at the tap of a finger.

Installing the app requires a software update to all your home controllers and Zone Players to version 3.3. That can be accomplished right from the new iPad remote, and the software will notify you if you need to update.

The 3.3 update adds support for AAC streaming radio stations, and for European countries adds the popular Spotify service. The iPhone version of the Sonos app has not been updated since May, and Sonos says an update to that app is pending approval from Apple.

The Sonos system is not inexpensive, but it is a bargain compared to wired whole-house systems. For your investment you get a very easy to set up entertainment center that you can add to as your desires dictate. The audio is very high quality, and the company commitment to the Mac platform is very strong.

Check the gallery for some screen shots.

TUAWSonos delivers free iPad remote for its wireless music systems originally appeared on The Unofficial Apple Weblog (TUAW) on Wed, 29 Sep 2010 16:00:00 EST. Please see our terms for use of feeds.

Read | Permalink | Email this | Comments

iFixit: Apple TV has 8GB of onboard flash storage

One of the big questions concerning whether or not the new Apple TV will be able to run apps of some sort is “how much onboard RAM does it have?”

That question has been answered by the guys at iFixit, who as usual have been the first to tear apart and document the internal workings of the Apple TV. The answer? 8 GB of NAND flash RAM made by Samsung. The iFixit team speculates that the RAM is most likely going to be used to cache incoming video streams, but it might also be used to temporarily hold apps that could run under iOS on the device.

More interesting news about the Apple TV is bound to come out in the next couple of days; stay tuned to TUAW for all of your Apple TV coverage.

Correction to original post: that’s 8GB of onboard flash storage, 256MB of actual RAM. We apologize for the error.

TUAWiFixit: Apple TV has 8GB of onboard flash storage originally appeared on The Unofficial Apple Weblog (TUAW) on Wed, 29 Sep 2010 15:55:00 EST. Please see our terms for use of feeds.

Read | Permalink | Email this | Comments

Apple TV deliveries begin — we have unboxing photos and video

Several TUAW readers have let us know that their Apple TVs have arrived, and reader Clint even sent us a link to his MobileMe gallery of his official unboxing of the new device.

As you can see from the photos, the thing is tiny. The Apple TV comes packaged with a power cord, a remote, a small user manual, and of course the ubiquitous Apple stickers. There’s no HDMI cable included, so if you don’t have one available, be sure to run to your nearest electronics store to pick one up so you can start playing with the Apple TV as soon as possible.

My personal Apple TV order was supposed to arrive tomorrow; it ended up getting delivered just after I finished writing the first draft of this post. By TUAW tradition, I am supposed to film and post an unboxing video immediately. You can view this instant classic on the next page — just click the Read More link below.

TUAWApple TV deliveries begin — we have unboxing photos and video originally appeared on The Unofficial Apple Weblog (TUAW) on Wed, 29 Sep 2010 15:30:00 EST. Please see our terms for use of feeds.

Read | Permalink | Email this | Comments

Queuing and downloading in the App Store

Here’s a great idea from Ryan Cash to put iOS apps unavailable for immediate download into a queue that will automatically resume when they can.

Ryan notes that he often buys iOS apps when he’s out-and-about, whether it be on the recommendation of a friend, riding in a car, etc. The problem is many of the target apps are over the 20MB 3G limit. I’ve experienced this myself, as well as the inevitable conclusion: I forget to try again once I’m within a Wi-Fi network and the app’s author has lost that sale.

Ryan suggests an “add to queue” option to accompany or follow the notification at right, which would put that download into a holding pattern until the iPhone found a Wi-Fi network. That way, the download would resume, we’d get that cool app we were motivated to buy earlier and the author will get the sale.

Additionally, Ryan suggests that a queue could keep the user from being pushed out of the store to initiate a download, so that they could tap and get several apps going at once.

They’re both interesting ideas, though I wonder if battery life would be affected if the a queued app were continually polling for a Wi-Fi network (say you’re out for 9 hours). What do you all think?

TUAWQueuing and downloading in the App Store originally appeared on The Unofficial Apple Weblog (TUAW) on Wed, 29 Sep 2010 15:00:00 EST. Please see our terms for use of feeds.

Read | Permalink | Email this | Comments

Apple to create new HTML5 content for website

Apple has published new job posting for a Creative Technology Manager, tasked in part with creating new HTML5 content at Apple.com, with support for iOS devices.

The listing seeks an individual who “…will be responsible for driving web-standard (HTML5) innovation that enhances and redefines the marketing of Apple’s products and services to millions of consumers. Work will also include exploring opportunities with apple.com, email and mobile/multi-touch experiences on the iPhone and iPad.”

Of course, HTML5-powered content has already begun to appear on Apple’s website. Recently, a movie showtimes page has appeared that lets users find location-based movie showings, view theatre locations on a map, and view trailers. I’ve added it to my iPhone’s home screen as it’s so useful.

Also, Apple added a “Compare Macs” page to its site in August, which lets customers view potential purchases side-by-side. For more on Apple and HTML5, look here.

[Via AppleInsider]

TUAWApple to create new HTML5 content for website originally appeared on The Unofficial Apple Weblog (TUAW) on Wed, 29 Sep 2010 14:00:00 EST. Please see our terms for use of feeds.

Read | Permalink | Email this | Comments

TUAW TV Live: If at first you don’t succeed, try again at 5 PM EDT

Due to technical issues last Wednesday, my planned TUAW TV Live episode with podcaster Sam Levin of AppMinute never got off the ground. Well, we’re not going to let a little DNS issue stop our fun!

Join Sam and me at 5 PM EDT today as we chat about iOS apps, whether or not Android poses a threat in the tablet computing world, and maybe even do a few giveaways.

Just drop by TUAW.com a little before the start of the show to get logged into the chat and get the Ustream ads out of the way before we begin. I’ll have full instructions on how to watch and participate in this live weekly event. And please, think good thoughts so we won’t have a repeat of last week’s technical problems…

TUAWTUAW TV Live: If at first you don’t succeed, try again at 5 PM EDT originally appeared on The Unofficial Apple Weblog (TUAW) on Wed, 29 Sep 2010 13:30:00 EST. Please see our terms for use of feeds.

Read | Permalink | Email this | Comments

Finnish broadband provider Elisa to sell unlocked iPhone 4 starting tomorrow

People who are anxious to get an iPhone 4 without a carrier lock-in in the land of Nokia will now have an opportunity to get an unlocked device.

Finnish broadcaster YLE is reporting that broadband provider Elisa will start selling unlocked iPhone 4s on Thursday, September 30th. The iPhone 4 is currently being sold in Finland with a contract by mobile carrier TeliaSonera.

The pricing for the unlocked phones is €589 for the 16GB model and €689 for the 32GB version. And in case you’re wondering what those words below the iPhone 4 banner in the picture above mean? “Coming soon.”

TUAWFinnish broadband provider Elisa to sell unlocked iPhone 4 starting tomorrow originally appeared on The Unofficial Apple Weblog (TUAW) on Wed, 29 Sep 2010 13:00:00 EST. Please see our terms for use of feeds.

Read | Permalink | Email this | Comments

China Unicom sells 100,000 iPhone 4s in four days

After 4 days of availability, China Unicom (CU) has sold 100,000 iPhone 4s in China (here are some photos from launch day). Pre-orders began on September 16th, and CU reported earlier this week that 200,000 orders were taken. Today, all online reservations have come to a halt. Customers must be physically at a retail store to buy one. For now, the iPhone 4 is outselling the iPhone 3GS many times over.

Phones bought through China Unicom require a two year service contract; however, the phone is also available contract-free at Apple stores.

Liu Liang, an analyst with consulting group iResearch, commented on the iPhone’s popularity.”The level of smartphone usage is hitting a new level in China,” he said. “A lot of users no longer want to use these older phones with few features and instead want to buy the latest models like the iPhone.”

The iPad was also met with enthusiasm in China, though sales figures are not yet available.

TUAWChina Unicom sells 100,000 iPhone 4s in four days originally appeared on The Unofficial Apple Weblog (TUAW) on Wed, 29 Sep 2010 10:00:00 EST. Please see our terms for use of feeds.

Read | Permalink | Email this | Comments