Using Vim's named registers
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.
View ArticleBook a private Vim class for your team
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)...
View ArticlePasting from Visual mode
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...
View ArticlePasting from Insert mode
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...
View ArticleSimple calculations with Vim's expression register
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.
View ArticleEvaluating scripts with Vim's expression register
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,...
View ArticleUpcoming online workshop: December 5th
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.
View ArticleStockholm Vim Meetup & Core Vim Class
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...
View ArticleAccessing the system clipboard from Vim
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...
View ArticleGetting Vim with `+clipboard` support
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....
View ArticleUsing Vim's paste mode with the system paste command
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...
View ArticleThe copy/paste series - a retrospective
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...
View ArticleRegisters: the Good, the Bad, and the Ugly Parts
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...
View ArticleUpcoming online workshop: January 27th
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.
View ArticleHelp shape the redesign of Vimcasts.org
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...
View ArticleComparing buffers with vimdiff
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...
View ArticleUpcoming Core Vim Class: London, February '14
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...
View Article20% group discount for Core Vim Class, January edition
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...
View ArticleCreating repeatable mappings with repeat.vim
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...
View ArticleUpcoming online workshop: March 5th
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.
View ArticleFollow my leader
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...
View ArticleCreating mappings that accept a count
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....
View ArticleOperating on search matches using gn
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...
View ArticleVimcasts redesign: a work in progress
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...
View ArticleUsing external filter commands to reformat HTML
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...
View ArticleSwapping two regions of text with exchange.vim
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...
View ArticleSupport Neovim!
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...
View ArticleLook! A new Vimcasts site
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...
View ArticleCore Vim Class live in Paris
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.
View ArticleMeet UltiSnips
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...
View ArticleStudy Core Vim at your own pace
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...
View ArticleUsing Python interpolation in UltiSnips snippets
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...
View ArticleAnnouncing Peer to Peer
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...
View ArticleUsing selected text in UltiSnips snippets
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...
View ArticleDoing more with each change
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...
View ArticleGet your free upgrade to Practical Vim, 2nd Edition
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...
View ArticleWhat's new in Practical Vim, 2nd edition
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...
View ArticlePractical Vim, revised for Vim 8
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.
View ArticleI'm writing a new book: Modern Vim
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.
View ArticleDive into Neovim, with thoughtbot Upcase
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...
View ArticleInstalling plugins using packages
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.
View ArticleMeet minpac
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.
View ArticleMeet Neovim
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.
View ArticleCheckHealth in Neovim
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...
View ArticleModern Vim now available as a beta book
I’m pleased to announce that you can now purchase Modern Vim as a beta book.
View ArticleLive substitution and yank highlighting
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...
View ArticleNeovim's terminal emulator
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.
View ArticleCreating mappings for :terminal
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,...
View ArticlePasting into a terminal buffer
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...
View ArticleModern Vim Paperback now Shipping
I’m happy to announce that Modern Vim is now available as a paperback. You can purchase it directly from The Pragmatic Bookshelf.
View Article
More Pages to Explore .....