I’m happy to announce that Modern Vim is now available as a paperback. You can purchase it directly from The Pragmatic Bookshelf.
Yanking and pasting works seemlessly between Neovim’s regular buffers and terminal buffers. In this video, we’ll look at how the Normal mode paste command works in a terminal buffer, and we’ll create a mapping to help with pasting text directly from Terminal mode.
Neovim lets us create mappings using the meta key. In this video, we’ll set up some mappings to make it easier to exit from Terminal mode. We’ll also set up mappings using the meta key with h, j, k, and l to switch between split windows.
Neovim lets you run a terminal emulator inside of a buffer. In this video, we’ll cover some of the basics of how terminal buffers work, and how you can use them alongside regular buffers in your workflow.
This video covers a couple of small but delightful Neovim features. You’ll see how to make Neovim show a live preview of how the substitute command will change our document. And you’ll find out how to make the yank operation highlight the range of text that it copied.
Neovim’s :checkhealth command can diagnose problems with your configuration.
In this video, we’ll run this command and follow its suggestions to enable features such as python integration and ruby integration.
In this video, we’ll see how to install and set up Neovim so that it reuses your existing Vim configuration files. Most plugins should work in Neovim just like they do in Vim.
Minpac is a minimal package manager for Vim 8. It makes it easy to add plugins, keep them up to date, and remove them. In this video, we’ll see how it works.
Packages are a new feature in version 8 of Vim.
In this video, we’ll see how we can use packages to easily install Vim plugins.
The process will be familiar if you’ve used pathogen.
I’ve produced 10 new screencasts for thoughtbot, on the topics of Vim 8 and Neovim. The videos are available now for Upcase subscribers as the course: Dive into Neovim (you can watch the first 3 videos for free).
I’m very happy to announce that I’m writing a new book. My working title is Modern Vim. It’s a sequel to Practical Vim, and will be published by the Pragmatic Bookshelf.
I’ve revised the second edition of Practical Vim, bringing it up to date with Vim 8. If you bought the ebook direct from Pragmatic Bookshelf, then you’ll receive the update for free.
The first edition of Practical Vim was published in 2012. Vim has continued to evolve in the three years since, making some of the material out of date. We’ve just published a 2nd edition of Practical Vim (Pragmatic Bookshelf, 2015) with updated material and some new tips.
I am pleased to announce that the Pragmatic Bookshelf have just published a second edition of Practical Vim. If you bought the first edition as an ebook direct from PragProg, then you will receive a free upgrade to the second edition.
I’ve noticed a pattern running through a few recent episodes of Vimcasts: I’ll demonstrate one way of doing something, and remark that to revert the change requires two or more undos. Then I’ll demonstrate another way of doing the same thing, perhaps using functionality from a plugin, and this time I can revert the change with a single undo. That seems to me to be a good criteria for deciding which method is better: it’s the one that can be reverted with the fewest number of undos.
Peer to Peer is a new project of mine. I’m producing a series of long form videos where you can watch how experts solve tech problems. The first video is now available: Counting Tree Nodes, featuring Tom Stuart.
When UltiSnips is triggered from Visual mode it captures the selection and makes it available to our snippets. We can then insert the selection unchanged with the $VISUAL placeholder, or we can use UltiSnips Python interpolation to transform the text before inserting it back into the document.
UltiSnips can execute Python code and interpolate the result into a snippet. This makes it possible to create snippets that react to the text entered in each field. We’ll look at an example that performs a simple calculation and inserts the result into our document.
I’ve taught my Core Vim Class to more than 600 people online and in person. Now, for the first time, I’m making available the core learning resources – the VimDojo and 10 videos – for purchase. The Core Vim Course allows you to study Vim at your own pace, in your own time.
Snippets allow you to quickly insert predefined chunks of text into your document. The feature as I know it was first introduced in TextMate, but it has since been emulated by many other editors. For Vim users who want this functionality, the UltiSnips plugin is a great choice. Let’s start by looking at the basics.
I’m running my Core Vim Class live in Paris on the afternoon of June 10th. The class, Vim, l'essentiel, will be taught in French and English. This is a collaboration with Emmanuel Gaillot from UT7.
Today I’m rolling out some major enhancements to the Vimcasts.org website. I’ve been working on this project with Hannah Adcock since January. If you’re reading this via RSS, why not click through to the new homepage and check it out?
I’ve sometimes wondered what could lure me to switch from Vim to another text editor.
On the whole I’m happy with Vim, but the one thing that bothers me is the cruft that has accumulated over the course of 20+ years.
Imagine Vim, but without the nocompatible option.
That is the promise of Neovim.
Swapping two regions of text is a common task, which normally requires that we make two separate changes to the document. Tom McDonald’s exchange plugin offers an elegant alternative, by providing an operator that swaps two regions of text in one go.
We can use pandoc as a filter to clean up WYSIWYG-generated HTML. Pandoc is a commandline program, but we can call it from inside Vim either using the bang Ex command, or by configuring the formatprg option to make the gq operator invoke pandoc.
In the not-too-distant future, you can expect to see a revised design for Vimcasts.org. The most significant enhancements will be the addition of tags, site search, and a responsive design for smaller screens. Hannah Adcock, from contentedstrategy.com, has been helping me out by analysing user feedback, as well as data from Google Analytics.
The gn command (introduced in Vim 7.4) makes it easy to operate on regions of text that match the current search pattern. It’s especially useful when used with a regex that matches text regions of variable length.
Lots of Vim’s built-in Normal mode commands can be executed multiple times by prefixing them with a count. User-defined Normal mode mappings don’t usually handle counts the way we might like them to. We’ll explore a couple of techniques for making our custom mappings respond predictably to a count.
Choosing a key-map for your custom Vim commands can be difficult. The common advice is to use <leader> for user-defined mappings, but that’s not the only option. There are dozens of two-key mappings that are not bound to any built-in functionality. These available mappings are easy to find if you follow a simple formula.
On Wednesday, March 5th 2014, I’m going to teach my Core Vim Class Online. Tickets cost $255, but you can save 10% if you buy a $230 Earlybird ticket by February 26th. You can buy tickets from tito.io.
The dot command is my all-time favorite Vim trick: it tells Vim to repeat the last change. But the dot command tends not to work well with user-defined mappings. In this episode, we’ll use repeat.vim to set up a simple mapping so that it can be repeated using the dot command.
I’ll be running a Core Vim Masterclass in London on the afternoon of February 19th, at Doggett’s Coat and Badge. This is a rare opportunity to attend my Core Vim Masterclass in person, instead of online.
You can purchase tickets for the London workshop from tito.io. The early bird price of £160 is available until midnight on Wednesday, February 12 th. After that, the price goes up to £180.
For the month of January only, I’m offering a 20% discount on orders of five or more tickets for my Core Vim Class. That’s £128 per head, a £32 saving on full price tickets at £160. If your team makes heavy use of Vim, then this is a great opportunity for everyone to level up their skills for 2014! Get in touch with drew@vimcasts.org for more details.
Vim’s diff mode allows us to easily compare the contents of two (or more) buffers. We can start Vim in diff mode using the vimdiff command, or if Vim is already running we can switch to diff mode using the :diffthis command. The beauty of the :diffthis command is that it works with unnamed buffers, whereas vimdiff can only work with files.
Vimcasts was launched four years ago, in January 2010. I anticipated making only a dozen screencasts, but there are now over 50, as well as a blog. I’m going to make some changes so you can find what you’re looking for more easily. I’d appreciate your help! Please fill out this survey and I’ll take your feedback on board.
On Monday, January 27th 2014, I’m going to teach my Core Vim Class Online. Tickets cost £160, but you can save 10% if you buy a £145 Earlybird ticket by January 24th. You can buy tickets from tito.io.
To the newcomer, Vim’s way of doing things may seem strange, but with familiarity it becomes natural. Many of Vim’s features seemed odd to me at first, but when I got used to them I recognised that they had their own particular elegance. However, there’s one feature of Vim that still feels awkward to me: using registers for copy and paste. The deeper my understanding of registers becomes, the more they frustrate me!
Episodes 51, 52, 53, 54, 55, 58, and 59 are all on the topic of copy and paste in Vim. I think that this is one area where Vim is especially confusing, partly because of Vim’s non-standard jargon for cut, copy and paste operations. It’s not the most intuitive copy/paste system, but it’s usable when you get the hang of certain concepts and techniques.
When Vim is compiled without the +clipboard feature, we can still insert text from the clipboard using the system paste command (ctrl-v or cmd-v). This can produce strange effects, but we can avoid them by toggling the paste option each time we use the system paste command.
Many systems ship with a version of Vim that was compiled with the -clipboard feature disabled, which is a damned nuisance! Being able to access the system clipboard from Vim is an essential feature. Let’s look at a few ways of getting the +clipboard feature on OS X and Ubuntu.
In some environments, Vim lets us access the system clipboard using the quoteplus register, "+. When this feature is enabled, we can use it with the delete, yank and put operations in much the same way that we use Vim’s other registers. Pasting from this register usually produces better results than using the system paste command in Insert mode.
I’ve got two upcoming appearances in Stockholm next month. I’ll be running a copy and paste clinic at the Stockholm Vim meetup, on 2nd December. Then on the afternoon of December 3rd, I’ll be running a Core Vim Class at The Park, Stockholm.
On Thursday, December 5th 2013, I’m going to teach my Core Vim Class Online. Tickets cost $255, but you can save 10% if you buy a $230 Earlybird ticket by November 29th. You can buy tickets from tito.io.
In the previous lesson we learned how use the expression register to evaluate simple calculations. We can also call built-in and user-defined Vimscript functions, and thanks to the system() function, we can also fetch output from external scripts.
The expression register lets us evaluate a snippet of Vimscript code. This is handy when you need to perform simple calculations and insert the result into the document.
We don’t have to be in Normal mode to paste the contents of a register. The <C-r>{reg} command lets us paste a register from Insert mode (and it works in commandline mode too!) Using this command allows us to make changes that can be repeated with the dot command.
Does your team make heavy use of Vim? Why not book me for a private Vim training session and give your team a productivity boost? I can deliver my class online for companies based (or distributed) anywhere in the world, or I can teach on-site anywhere except the US. Here are my prices and terms. Get in touch if you have any further enquiries.
When used in Visual mode the p command replaces the selection with the contents of a register. This makes for a smooth workflow when you want to overwrite a selection, or swap the order of two regions of text.
We’ve met Vim’s default register and the yank register. This time, we’re going to look at the named registers, which are handy if you want to cut or copy some text that you intend to paste multiple times.
Vim’s default register is not a safe place to keep yanked text that you want to paste later. It’s all too easy to clobber the default register with a d or x command. Luckily, the last yanked text is kept safe in Vim’s yank register.
Vim’s default register makes it easy to perform some of the most basic types of cut, copy, and paste operations. That’s partly thanks to the p command, which behaves differently depending on whether the default register contains a characterwise or linewise region of text.
On Monday, October 28th 2013, I’m going to teach my Core Vim Masterclass Online. It will run for 4 hours, from 17:00 BST. That’s 10:00 if you live in San Fransisco, or 13:00 if you live in New York. Tickets cost £160 (approximately US $257), but there’s an £145 earlybird offer (approx. US $233) running until October 23rd. You can buy tickets from tito.io.
I’m raising the price for my online Core Vim Class to £160. From now on, attendees will receive an exclusive hour-long screencast that summarizes the material from the class. The class itself covers similar material to before.
Gittip is a way to give weekly cash gifts to people whose work inspires you. If you’d like to support the people who help make Vim awesome, why not sign up and join the Vim community? (We need 13 more members to hit the 150 threshold.) I’ve set up a weekly gift for Tim Pope, whose Vim plugins I use every day.
I’ll be running a Core Vim Masterclass in London on the afternoon of October 23rd, at Forward. This is a rare opportunity to attend my Core Vim Masterclass in person, instead of online.
You can purchase tickets for the London workshop from tito.io. The early bird price of £160 is available until midnight on Wednesday, October 16th. After that, the price goes up to £180.
I’ve been collaborating with thoughtbot to produce three screencasts about Navigating Ruby Files with Vim. There’s 40 minutes of material in total, and it’s available from today. You can purchase these videos for $19, but they will also be available to thoughtbot Prime subscribers. Check out learn.thoughtbot.com for more details.
I’d like to thank everyone who responded to my recent survey about supporting Vimcasts via a subscription model. I’ve taken your feedback on board and have decided to keep producing free Vimcasts. I can cover this site’s running costs and support myself by teaching Vim classes and producing longer video tutorials to sell.
I’ll be running a Core Vim Masterclass in Berlin on the afternoon of August 21st, at LAUNCH/CO. This is a rare opportunity to attend my Core Vim Masterclass in person, instead of online.
You can purchase tickets for the Berlin workshop from tito.io. The early bird price of £85 is available until midnight on Wednesday, August 14th. After that, the price goes up to £100, so get in there fast!
I’ve just published episode 50 of Vimcasts. That feels like a significant milestone and a good time to consider the question: what’s next?
Vspec is a library that allows you to test-drive your Vimscript code. In this tutorial, we’ll cover the basics: how to inspect the contents of a buffer, how to simulate the actions of a user, and how to invoke user-defined mappings.
On Wednesday, July 10th, I’m going to teach my Core Vim Masterclass Online. It will run for 4 hours, from 18:00 BST. That’s 10:00 if you live in San Fransisco, or 13:00 if you live in New York. Tickets cost £95 (approximately US $146), but there’s an £80 earlybird offer (approx. US $122) running until June 28th.
I have a 15" MacBook Pro for sale. It’s a 2010 model, with upgraded RAM and SSD. Here are the tech specs:
UPDATE (8 July, 2013) - this MBP has sold already.
I sometimes get asked what software I use to reveal the Vim keystrokes in my video tutorials here on Vimcasts.org. The fact is that I add them by hand in post-production. It’s not fun!
At the April Vim London meetup, we managed for the first time to record and publish videos of the talks. Check out the VimLondon Vimeo page to see all talks from our April and May meetups.
I was pleased to be invited to chat with Thomas Ferris Nicolaisen on the GitMinutes podcast recently. It’s now live! Head over to Episode #8 of Git Minutes and have a listen.
Vim’s built-in abbreviation feature is handy if you want to auto-correct words that you frequently misspell, but it requires a lot of setup. The :Abolish command makes it easy to generate abbreviations that will correct multiple forms of the same word.
This is the final of a three-part series on Tim Pope’s abolish plugin.
On Monday, June 3rd, I’m going to teach my Core Vim Masterclass Online. It will run for 4 hours, from 18:00 GMT. That’s 10:00 if you live in San Fransisco, or 13:00 if you live in New York. Tickets cost £95 (approximately US $140), but there’s an £80 earlybird offer (approx. US $120) running until May 24th.
The abolish plugin provides a command called :Subvert, which is like a supercharged version of Vim’s built-in :substitute command. The :Subvert command is especially useful for changing singular and plural variants of a word, and for refactoring names that appear in snake_case and MixedCase.
This is part two of a three-part series on Tim Pope’s abolish plugin.
One year ago today, Practical Vim was released as a beta book. I’m thrilled with how the book has been received and I’d like to thank everybody who has purchased a copy. After a year of sales, I’m happy to report that Practical Vim is a best-seller!
The :Subvert command lets us create a particular style of regular expressions with ease. It’s great for matching irregular singular and plural words in plain English and also for variable names that come in snake_case and MixedCase forms.
This is part one of a three-part series on Tim Pope’s abolish plugin.
The * command searches for the word under the cursor. That makes sense in Normal mode, but from Visual mode it would be more useful if the star command searched for the current selection, rather than the current word. We can add this feature to Vim using the visual star search plugin.
In case you hadn’t noticed, Vimcasts.org is back from hibernation! I’m publishing new screencasts and blog posts regularly. If you can’t keep up with the RSS feeds, or via Twitter, then you might want to subscribe to the Vimcasts.org newsletter. I’ll send an email digest once a month containing links to all of the material published over the course of the previous month.
Vim doesn’t have a built-in command for project-wide find and replace operations, but we can perform this task by combining primitive Ex commands such as :substitute, :argdo, and :vimgrep. We’ll look at two possible strategies: first using the arglist, then the quickfix list.
On Tuesday, April 16th, I’m going to teach my Vim Masterclass Online. It will run for 4 hours, from 17:00 GMT. That’s 09:00 if you live in San Fransisco, or 12:00 if you live in New York. Tickets cost £95 (approximately US $140), but there’s an £80 earlybird offer (approx. US $120) running until April 5th.
I always announce my Online Vim Masterclasses here on the Vimcasts blog as well as on Twitter. Some of you have indicated that you’d prefer to get announcements in your email inbox, so I’ve set up a mailing list for announcements. Sign up for the newsletter and you’ll be the first to hear about upcoming Vim classes.
The vimgrep command uses Vim’s native regular expressions to search the contents of multiple files. There are several ways that we can specify the list of files to look inside, including * and ** wildcards. It would be handy if we could instruct vimgrep to look inside all of the files in the current project, excluding those listed in the .gitignore file. That’s where the git ls-files command comes in.
I love the way that ack let’s me specify the files to search inside. For starters, ack does the right thing by ignoring the contents of VCS directories, backup files, core dumps etc., which gives a good signal to noise ratio. On top of that, ack provides a convenient syntax for specifying filetypes to include or exclude from the set (see ack --help-types). I can target ruby files only with the --ruby option, or everything but ruby files with --noruby.
vimgrep is Vim’s built-in command for searching across multiple files. It’s not so fast as external tools like ack and git-grep, but it has its uses. vimgrep uses Vim’s built-in regex engine, so you can reuse the patterns that work with Vim’s standard search command.
The :argdo command allows us to execute an Ex command across all buffers in the arglist. To demonstrate, we’ll use the example of running the :substitute command across multiple files, then we’ll see how to revert or save the changes. We’ll also compare the :argdo and :bufdo commands, and consider when it’s appropriate to use each one.
For a limited time, the Pragmatic Bookshelf is offering a 30% discount on Practical Vim. To claim this deal, use the coupon: DrewNeilVimMarchMadness. The offer runs until midnight (PST) on March 8th. Please help me spread the word wide and far by Tweeting, Liking, +1-ing and so on.
The arglist wouldn’t be much use if we had to quit and relaunch Vim every time we wanted to change its contents. In this episode, we’ll learn how to set the contents of the arglist using the :args command, which can receive filepaths, globs, or even backtick expressions.
The arglist feature complements Vim’s buffer list. In this episode, we’ll learn a handful of commands for traversing the arglist. We’ll see that it’s useful to think of the arglist as a stable subset of the files in the buffer list.
Here’s a quick tip: if you can’t find what you’re looking for in Vim’s built-in documentation, use a search engine instead. All of Vim’s documentation is online at vimdoc.sourceforge.net, so it’s indexed by Google & Co. If you create a custom search engine for your browser, then you can easily limit your searches to only return results from vimdoc.sourceforge.net.
On Monday, March 4th, I’m going to teach my Vim Masterclass Online. It will run for 4 hours, from 17:00 GMT. That’s 09:00 if you live in San Fransisco, or 12:00 if you live in New York. Tickets cost £95 (approximately US $150), but there’s an £80 earlybird offer (approx. US $127) running until February 25th.
Moving your Vim cursor around using the arrow keys is a bad habit, and like many bad habits it’s a difficult one to break!
On Tuesday, 29th January, we held the 3rd meeting of Vim London. We had 5 short talks on the theme of Speak Vim - operators and motions. The talks weren’t recorded, so I’m posting a retrospective here.
On Tuesday 29th January, VimLondon is holding a meetup with a theme: Speak Vim - Operators and Motions.
When writing code, we can often save time by duplicating a line then changing one or two parts of that line to make it suit our purposes. In this episode, we’ll compare a few techniques for duplicating lines, and we’ll see that the :copy Ex command is well suited to this task.
Make it your New Year’s resolution to use Vim more effectively. The quickest way to level up is by attending my Vim Masterclass, which will be online next Monday at 9am PST. As a one-off New Year’s treat, you can use the coupon: 2013-resolution-vim to get your ticket for £75. That’s a £20 discount! The coupon is valid until midnight (PST) on Friday, 11 January.
Do you avoid using Vim’s split windows because they’re confusing? That might be a problem of your own devising. If you’ve bolted a project drawer onto Vim, then you’ve added unnecessary complexity to Vim’s otherwise minimal interface. Split windows and the project drawer go together like oil and vinegar. I don’t mean to say that you can combine them to create a delicious salad dressing. I mean that they don’t mix well!
On Monday, January 14th, I’m going to teach my Vim Masterclass Online. It will run for 3.5 hours, from 17:00 GMT. That’s 09:00 if you live in San Fransisco, or 12:00 if you live in New York. Tickets cost £95 (approximately US $150), but there’s an £80 earlybird offer (approx. US $127) running until January 4th.
Vim users are unforgiving of plugins that impair performance. Luckily, Vim provides built-in profiling tools that make it easy to diagnose performance issues. We’ll start by looking at how to profile the vimrc file, then move on to a real world scenario where profiling helped to identify and aleviate a performance bottleneck.
Yesterday was the world premiere of my Vimcasts Masterclass Online. It went great! Encouraged by it’s success, I’m planning to make this a regular occurrence. Watch out for more dates in the new year.
With a little bit of Vimscript, you can create a custom folding expression for any filetype. We’ll start by looking at the mechanics of folding with markers, then go on to create a folding expression for markdown documents.
Vim’s folding feature enables us to expand and collapse regions of a document. Not only does this allow us to organize our workspace, it also makes it easy to navigate around the document, and to rearrange entire sections as though they were single lines.
On Wednesday, November 28th, I’m going to teach my Vim Masterclass online. It will run for 3.5 hours, from 17:00 GMT. That’s 09:00 if you live in San Fransisco, or 12:00 if you live in New York. Tickets cost £95 (approximately US $150), but there’s an £80 earlybird offer (approx. US $127) running until November 21st.
This is a World Premiere! I’ve run my Vim masterclass over 20 times in meatspace, but never before in cyberspace. I hope that this will be the first of many.
Last week, I had the pleasure of speaking at Øredev, in Sweden. Video from my session, Vim - Precision editing at the speed of thought can be found on Vimeo. You can view the slides from my talk on speakerdeck.
UPDATE: Vim London is back!
Yesterday, without warning, Meetup.com deleted the Vim London group.
For a limited time, The Pragmatic Bookshelf is running a Command-Line Special deal. Use the coupon CommandLineFTW to get a 40% discount on Practical Vim. Other titles under offer include tmux by Brian Hogan, and Build Awesome Command-Line Applications by David Copeland.
This offer is valid until Wednesday, 24th October. You won’t find a better deal on Practical Vim, so don’t miss out!
Once again, I’m happy to announce that I’ll be running a Vim Masterclass in London on October 31st, at Forward. You can purchase tickets from EventBrite. The early bird price of £85 is available until 7pm on Wednesday, October 24th. After that, the price goes up to £100, so get in there fast!
This could become a regular thing, now that I’m living in London.
The first five-star reviews for Practical Vim have cropped up, and I’m blushing after reading them. It’s been described as the book Vim has always deserved, and a must-have for anybody who types.
I’m happy to announce that the paperback edition of Practical Vim is now available. If you’ve pre-ordered, then your copy should arrive soon. Also, that means Practical Vim is no longer in beta. It’s been tech-reviewed, indexed, edited, typeset, and laid out. If you’ve been holding out for the final cut, then your wait is over.
In the September issue of Linux Format magazine, Jonathan Roberts reviewed Practical Vim (the beta edition) and rated it 9/10.
I’ll be running a Vim Masterclass in Bristol on October 24th, at Beef.
Read about what to expect from a Vim Masterclass if you’d like to know more about the format of my workshops.
I’ll be running a Vim Masterclass in Boulder, Colorado on September 19th, as part of the Rocky Mountain Ruby Charity Workshop day. This is a rare USA appearance, so don’t miss out! Donations will go to local charities in Boulder. Please give generously.
Read about what to expect from a Vim Masterclass if you’d like to know more about the format of my workshops.
For the VimGolf challenge “List the first 100 prime numbers”, there’s a solution that uses a regular expression to detect prime numbers. At 43 keystokes, it’s not the winning solution, but I think it’s the most interesting one. It uses a few clever Vim tricks, including macros, control-a to increment, the very magic pattern switch, and the :global command. There’s a lot to learn from those 43 keystrokes, so let’s study it!
I’m sorry to say that I’m unable to take my workshops on tour around the US this summer. I’m not allowed to work there on a business/tourist visa, and I was too disorganized to obtain the visa that would permit me to work. It’s a shame, because I had set the months of August-September aside for this tour!
Vim users sit somewhere on a spectrum, based on how much they customize their editor. At one end of the spectrum, there are those who use Vim with no customizations whatsoever. At the other end are those who customize Vim to the point where it barely resembles the stock install.
I’m happy to announce that I’ll be taking my Vim masterclass workshops on tour around Europe in July. I’ll be running sessions in London on the 17th, Paris on the 20th, Amsterdam on the 23rd and 24th, and Barcelona on the 27th.
Read about what to expect from a Vim Masterclass if you’d like to know more about the format of my workshops.
I’ll be back in the UK for a couple of weeks in early July, so I’m running a few Vim masterclasses: Edinburgh on July 2nd, Glasgow on July 3rd, and Newcastle on July 9th.
Read about what to expect from a Vim Masterclass if you’d like to know more about the format of my workshops.
I’ll be running a Vim Masterclass in Berlin on the evening of June 18th, at co-up.
Read about what to expect from a Vim Masterclass if you’d like to know more about the format of my workshops.
I’ll be running a Vim Masterclass in Krakow on June 14th, at Applicake.
Read about what to expect from a Vim Masterclass if you’d like to know more about the format of my workshops.
I’m planning to take my Vim Masterclass workshop on tour around Europe and the USA this Summer. If you would like to bring a Vimcasts workshop to your town, sign up with your email address and location. If there’s enough interest, I’ll try and schedule something where you live.
I’m going to need help. Can you recommend a suitable venue in your town? Are there any local meetups or user groups that might be interested in a Vim workshop? If you can host an event, or help me connect with the right audience, then I would love to hear from you. Please get in touch with drew@vimcasts.org.
I’ll be running a Vim Masterclass in London on May 2nd, at Forward.
Read about what to expect from a Vim Masterclass if you’d like to know more about the format of my workshops.
I’m thrilled to announce that I’ll be running a Vim masterclass at Strange Loop, in September this year. The conference has a stellar lineup, so I’m looking forward to it eagerly. I hope to see you there.
Closer to home (for me anyway), I’ll also be running a Vim Masterclass in Berlin on April 20th, at LAUNCH/CO.
Read about what to expect from a Vim Masterclass if you’d like to know more about the format of my workshops.
You’ve already worked your way through the Vimtutor, right? I’ve prepared a series of lessons that follow a similar format: plain text files containing simple problems, with instructions on how to complete them. The tasks are carefully designed to demonstrate tips and tricks that will boost your productivity. We’ll work through them as a class, but you can take them at your own pace.
Thanks to the awesome folk behind wroc_love.rb, I’ll be running a couple of Vim workshops in Wroclaw, Poland. They will take place on the 9th of March; one in the morning, and one in the afternoon.
A 20% discount is available for anyone attending the wroc_love.rb conference.
I’m going to run a series of Vim workshops in 2012. If you would like to attend, please sign up to the Vimcasts workshops mailing list, and tell me where you live. If there is enough interest for your town, then I’ll try and schedule it into my tour.
What can you expect from a Vimcasts workshop? Dirty hands. We learn best by doing, so I won’t lecture you. Instead, we’ll work through excercises designed to reveal the best practices of working with Vim. The material will tie in with my upcoming book, Practical Vim.
Git provides tools for searching the contents of files, commit messages, and even whether text was added or removed by a commit. In this episode, we’ll see how fugitive’s Ggrep and Glog commands wrap this functionality up so that we can search the contents and history of a git repo from right inside of Vim.
This is the last of our five part series on fugitive.vim.
Fugitive.vim: a git wrapper so awesome, it should be illegal. That’s how Tim Pope describes his git plugin for Vim. I’ve had fugitive.vim installed since it was released, but until recently I never took the time to figure out what was so awesome that could make it illegal.
With the fugitive plugin, you’re not limited to just working with files in your working tree. The :Gedit command allows you to open files in other branches, and to browse any git object, including tags, commits and trees. Plus, if your repository is hosted on github, you can easily bring up the webpage for any git object using the :Gbrowse command.
This is the penultimate of a five part series on fugitive.vim.
When git branches are merged, there is always the chance of a conflict arising if a file was modified in both the target and merge branches. You can resolve merge conflicts using a combination of fugitive’s :Gdiff command, and Vim’s built in diffget and diffput. In this episode, we’ll find out how.
This is the third in a five part series on fugitive.vim.
The fugitive plugin provides an interactive status window, where you can easily stage and review your changes for the next commit. The :Gdiff command visualizes the changes made to a file, by comparing the working copy with the index. In this episode, we’ll learn how to stage hunks of changes to the index without using the git add --patch command.
This is the second of a five part series on fugitive.vim. In the next episode, we’ll learn how to resolve a git merge conflict by performing a 3-way vimdiff.
The fugitive plugin, by Tim Pope, is a git wrapper for Vim. It complements the command line interface to git, but doesn’t aim to replace it. In this episode, we’ll see how some of fugitive’s commands can streamline your workflow.
This is the first of a five part series on fugitive.
The undo command is almost universally available in software today. Being able to rollback unwanted changes can be a real timesaver. In most applications you can only go backwards and forwards linearly, but Vim keeps your changes in a tree structure, which means that you can retrieve edits from distant branches in your history. This episode will show you how.
Fans of the Plex media center will be happy to know that there is now a Vimcasts plugin, available from the Plex online app store. It was built by Ches Martin, who was inspired when he saw that there was a Vimcasts plugin for Boxee. So now you can get your fix of Vimcasts straight from your media center. Thanks Ches!
There are times when you can improve the readability of your code by lining up the elements on neighbouring lines. In this episode, I demonstrate how this can be achieved using the Tabular plugin.
Ever since learning about Vim’s text-objects I have wished that there was a way of selecting blocks in ruby code. Well, now there is. Today I am releasing a plugin that creates a custom text object for selecting ruby blocks. Merry Christmas!
When you need to build a complex command, or devise a non-trivial search pattern, Vim’s command-line mode can be rather limiting. In this episode, I will introduce the command-line window, which allows you to use the full power of Vim when editing search queries and commands.
Last week, I gave a presentation at ArrrrCamp called Vim - walking without crutches. You can now watch the video on their website.
I am very pleased to announce that the Pragmatic Bookshelf will be publishing my book on Vim. The working title is Practical Vim, and I hope to complete it by the spring of 2011.
If you use Vim on muliple machines, it can be difficult to keep your configuration files synchronized across them. One solution is to put your dotfiles under version control. In this episode, I demonstrate how to keep your vimrc and plugins synchronized using git submodules and the pathogen plugin.
TextMate has a few built in commands for moving selected text around a document. The end end result of using these commands can be achieved by cutting and pasting, but the visual feedback they provide is quite helpful. In this episode, I will show how to replicate these commands in Vim.
I am considering writing a book on Vim. By filling out this survey, you can help me to gauge interest and target the book at the right level.
Thanks, Drew
Choosing a colorscheme that you find pleasing to look at is essential if you want to be comfortable working with Vim. There are hundreds of colorschemes available, but what if you can’t find one that you like? In this episode, I’ll share a few tips that make it easy to create colorschemes for Vim.
I could never find a light colorscheme for Vim that I enjoyed using, so I finally took the time to port the “Mac Classic” theme from TextMate. The source code is on gitub, so feel free to fork it.
The vimrc file allows you to preserve your settings so that they are restored each time you launch Vim. But what if you want to update your vimrc file in the middle of an editing session? This episode demonstrates a couple of tricks that make it easy to customize Vim on the fly.
I’m going to be taking a short break from Vimcasts to travel around India and Indonesia. I’ll be back in September, and a new season of Vimcasts will follow. If you’re eager to see more episodes, please show your support by leaving a tip - you can donate with paypal, or flattr me.
A number of people have contacted me to say that they would love to leave a tip, but object to using PayPal - the only method I provided for making donations. I had never heard of Flattr until recently, but a few people have requested that I integrate it into Vimcasts.org. I’ve always liked the idea of micro payments, so I thought I would give it a shot.
HAML and ERB are two commonly used ruby templating languages. You may have a strong preference for one or the other, but it’s not always up to you which one you use. I was recently asked to convert several HAML files to ERB format. In this episode, I will demonstrate a couple of Vim macros that helped make short work of the task.
Boxee allows you to watch movies, TV shows and clips from the Internet on your TV. Ever since Vimcasts launched, people have been saying “get it added to boxee”. Thanks to Clayton Parker I am happy to announce that there is now a Vimcasts app for Boxee.
If you want to edit several adjacent lines with a similar format, you might save a lot of time by making a columnar selection. This episode will demonstrate how to achieve this using Vim’s visual block mode.
Recording your keystrokes as a macro can be a great timesaver, but you have to be careful that you use commands in such a way that they can be reused. In this episode, I construct a fairly complex macro to build a structural HTML document from markdown.
If you work with ruby you will know that the interactive ruby shell, or ‘IRB’ for short, is a useful sketchpad for coding. But the command line interface of IRB can feel quite limiting in comparison with the power of your text editor. In this episode, I’m going to demonstrate how you can get the best of both worlds, by loading Vim from inside IRB.
Using a spell checker is a good habit to get into. In this episode, I demonstrate how to use Vim’s built in spell checking feature.
‘Do one thing and do it well’ is the principle of the Unix toolkit. Editing text is a broad domain, and there are many related tasks with which it overlaps. Vim acknowledges this by enabling certain tasks to be outsourced to external programs which do that one thing, and do it well. This episode will demonstrate how the par program can be used for formatting text.
Here on Vimcasts.org, I use Alex Gorbatchev’s SyntaxHighlighter to colorize the code excerpts. I couldn’t find a syntax ‘brush’ for Vimscript, so I wrote my own. I also created a color theme based on the Blackboard scheme that I use in Vim (and TextMate).
It is sometimes preferable to format text with hard wrapped lines, for example when writing emails in plaintext. Vim can apply this style of formatting for you. This episode shows some of the options which allow you to customize Vim’s text formatting.
Long lines of text can be wrapped if they don’t fit inside the window. By default, Vim will happily split in the middle of a word. This episode demonstrates how to use the ‘linebreak’ option to make Vim break lines without breaking words.
This episode demonstrates how Vim’s native file browser can be used to explore and manipulate the file system.
This episode focuses on the :edit command. I demonstrate how to open files whose location is relative to the current working directory, then I show how to create a mapping which makes it easier to open files in the same directory as the one in the active window.
Do you have trouble cleaning up with your text editor? Does it cut through the toughest grease, grime and syntax errors? Are you burning your hands on too many hotkeys?
Try Vim - Extra whitening classic scourer. Vim gets the job done faster. Take short easy strokes for lemon fresh scripts. Fast, bold, Vim.
Vimcasts.org now has it’s own short form URLs. You can link to each episode by
number, using the form /e/10 to link to episode 10. You can also link to the
episodes archive with the trailing path /e/a.
Vim’s modal editing paradigm - the newbie killer - brings tremendous efficiency if only you can learn to work with it, rather than against it. This episode demonstrates how the undo and repeat commands can benefit from spending short bursts of time in insert mode.
This episode introduces the changelist and jumplist, demonstrating a couple of situations where they are useful.
Demonstrating miscellaneous tips and tricks gleaned whilst making an ASCII art version of the VimCasts.org logo. Learn how to duplicate lines, copy and paste with visual block mode, search and replace within a visual selection, and how to use macros.
Vim’s treatment of tabs is a little different than what you might be used to if you are coming from another editor. In this episode I demonstrate how Vim’s tabs can be used to group split windows together. I also show how to use Vim’s tabs like projects in TextMate, by setting a different working directory for each one.
This episode covers the essential commands for working with Vim’s tab pages: opening and closing, switching, and moving them.
In Vim, you can view several buffers at once by loading them into multiple windows. This episode demonstrates all the essentials of working with windows: opening, closing, resizing, moving between and rearranging them.
Introducing the buffer list, and commands for switching between buffers. This episode also covers the concept of ‘hidden’ buffers, and shows how to deal with them.
This episode covers the commands for shifting text left and right (< and >), and also goes over the auto indent command (=).
This episode demonstrates a few techniques for tidying up whitespace. First, it looks at how to convert between tabs and spaces. Then it shows how to strip trailing whitespace, and finally, how to remove blank lines from a file.
Different file types may require particular whitespace settings. For example, YAML files must be indented using spaces, whereas makefiles require indentation with tabs. These preferences can be specified by hooking into the FileType event with an autocommand.
Vim offers very granular control over whitespace. This episode explains the purpose of tabstop, softtabstop, shiftwidth and expandtab settings, and illustrates how Vim behaves using various combinations of these.
Vim’s list feature can be used to reveal hidden characters, such as tabstops and newlines. In this episode, I demonstrate how to customise the appearance of these characters by tweaking the listchars setting. I go on to show how to make these invisible characters blend in with your colortheme.