Skip to main content

Vimcasts

Drew Neil

In each episode, Drew Neil demonstrates one of Vim's features, showing how to incorporate it into your workflow.



rss RSS

76
RESULTS


Show sorted alphabetically

Show sorted alphabetically

SHOW DETAILS
up-solid down-solid
eye
Title
Date Published
Creator
Vimcasts
Feb 2, 2018 Drew Neil
movies

eye 6

favorite 0

comment 0

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.
Vimcasts
Dec 12, 2017 Drew Neil
movies

eye 4

favorite 0

comment 0

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.
Vimcasts
Nov 28, 2017 Drew Neil
movies

eye 8

favorite 0

comment 0

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.
Vimcasts
Nov 14, 2017 Drew Neil
movies

eye 4

favorite 0

comment 0

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.
Vimcasts
Oct 31, 2017 Drew Neil
movies

eye 7

favorite 0

comment 0

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.
Vimcasts
Oct 24, 2017 Drew Neil
movies

eye 8

favorite 0

comment 0

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.
Vimcasts
Oct 12, 2017 Drew Neil
movies

eye 8

favorite 0

comment 0

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.
Vimcasts
Oct 4, 2017 Drew Neil
movies

eye 6

favorite 0

comment 0

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.
Vimcasts
Jul 23, 2014 Drew Neil
movies

eye 20

favorite 0

comment 0

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.
Vimcasts
May 29, 2014 Drew Neil
movies

eye 12

favorite 0

comment 0

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.
Vimcasts
May 21, 2014 Drew Neil
movies

eye 9

favorite 0

comment 0

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.
Vimcasts
Feb 24, 2014 Drew Neil
movies

eye 9

favorite 0

comment 0

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.
Vimcasts
Feb 18, 2014 Drew Neil
movies

eye 8

favorite 0

comment 0

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.
Vimcasts
Feb 11, 2014 Drew Neil
movies

eye 10

favorite 0

comment 0

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.
Vimcasts
Feb 6, 2014 Drew Neil
movies

eye 4

favorite 0

comment 0

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.
Vimcasts
Jan 21, 2014 Drew Neil
movies

eye 6

favorite 0

comment 0

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.
Vimcasts
Jan 15, 2014 Drew Neil
movies

eye 8

favorite 0

comment 0

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
Nov 15, 2013 Drew Neil
movies

eye 5

favorite 0

comment 0

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.
Vimcasts
Nov 11, 2013 Drew Neil
movies

eye 5

favorite 0

comment 0

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.
Vimcasts
Oct 21, 2013 Drew Neil
movies

eye 4

favorite 0

comment 0

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.
Vimcasts
Oct 16, 2013 Drew Neil
movies

eye 5

favorite 0

comment 0

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.
Vimcasts
Oct 11, 2013 Drew Neil
movies

eye 4

favorite 0

comment 0

We don’t have to be in Normal mode to paste the contents of a register. The {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.
Vimcasts
Oct 7, 2013 Drew Neil
movies

eye 7

favorite 0

comment 0

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.
Vimcasts
Oct 4, 2013 Drew Neil
movies

eye 5

favorite 0

comment 0

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.
Vimcasts
Sep 30, 2013 Drew Neil
movies

eye 11

favorite 0

comment 0

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.
Vimcasts
Sep 27, 2013 Drew Neil
movies

eye 3

favorite 0

comment 0

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.
Vimcasts
Jun 17, 2013 Drew Neil
movies

eye 4

favorite 0

comment 0

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.
Vimcasts
Apr 29, 2013 Drew Neil
movies

eye 4

favorite 0

comment 0

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.
Vimcasts
Apr 22, 2013 Drew Neil
movies

eye 2

favorite 0

comment 0

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.
Vimcasts
Apr 12, 2013 Drew Neil
movies

eye 6

favorite 0

comment 0

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.
Vimcasts
Mar 25, 2013 Drew Neil
movies

eye 5

favorite 0

comment 0

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.
Vimcasts
Mar 19, 2013 Drew Neil
movies

eye 4

favorite 0

comment 0

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.
Vimcasts
Mar 1, 2013 Drew Neil
movies

eye 8

favorite 0

comment 0

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.
Vimcasts
Feb 25, 2013 Drew Neil
movies

eye 10

favorite 0

comment 0

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.
Vimcasts
Feb 22, 2013 Drew Neil
movies

eye 3

favorite 0

comment 0

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.
Vimcasts
Feb 19, 2013 Drew Neil
movies

eye 5

favorite 0

comment 0

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.
Vimcasts
Jan 9, 2013 Drew Neil
movies

eye 3

favorite 0

comment 0

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.
Vimcasts
Dec 3, 2012 Drew Neil
movies

eye 7

favorite 0

comment 0

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.
Vimcasts
Nov 26, 2012 Drew Neil
movies

eye 6

favorite 0

comment 0

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.
Vimcasts
Nov 19, 2012 Drew Neil
movies

eye 7

favorite 0

comment 0

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.
Vimcasts
Aug 10, 2012 Drew Neil
movies

eye 5

favorite 0

comment 0

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!
Vimcasts
May 18, 2011 Drew Neil
movies

eye 12

favorite 0

comment 0

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.
Vimcasts
May 13, 2011 Drew Neil
movies

eye 5

favorite 0

comment 0

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.
Vimcasts
May 6, 2011 Drew Neil
movies

eye 13

favorite 0

comment 0

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.
Vimcasts
Apr 29, 2011 Drew Neil
movies

eye 6

favorite 0

comment 0

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...
Vimcasts
Apr 22, 2011 Drew Neil
movies

eye 8

favorite 0

comment 0

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.
Vimcasts
Feb 23, 2011 Drew Neil
movies

eye 5

favorite 0

comment 0

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.
Vimcasts
Jan 17, 2011 Drew Neil
movies

eye 4

favorite 0

comment 0

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.
Vimcasts
Nov 21, 2010 Drew Neil
movies

eye 5

favorite 0

comment 0

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.
Vimcasts
Oct 12, 2010 Drew Neil
movies

eye 4

favorite 0

comment 0

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.
Vimcasts
Oct 5, 2010 Drew Neil
movies

eye 5

favorite 0

comment 0

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.
Vimcasts
Sep 28, 2010 Drew Neil
movies

eye 4

favorite 0

comment 0

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.
Vimcasts
Jul 18, 2010 Drew Neil
movies

eye 8

favorite 0

comment 0

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.
Vimcasts
Jul 8, 2010 Drew Neil
movies

eye 6

favorite 0

comment 0

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.
Vimcasts
Jun 20, 2010 Drew Neil
movies

eye 4

favorite 0

comment 0

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.
Vimcasts
Jun 2, 2010 Drew Neil
movies

eye 9

favorite 0

comment 0

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.
Vimcasts
May 16, 2010 Drew Neil
movies

eye 4

favorite 0

comment 0

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.
Vimcasts
May 10, 2010 Drew Neil
movies

eye 8

favorite 0

comment 0

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.
Vimcasts
May 3, 2010 Drew Neil
movies

eye 5

favorite 0

comment 0

‘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.
Vimcasts
Apr 26, 2010 Drew Neil
movies

eye 5

favorite 0

comment 0

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.
Vimcasts
Apr 20, 2010 Drew Neil
movies

eye 4

favorite 0

comment 0

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.
Vimcasts
Apr 12, 2010 Drew Neil
movies

eye 5

favorite 0

comment 0

This episode demonstrates how Vim’s native file browser can be used to explore and manipulate the file system.
Vimcasts
Apr 5, 2010 Drew Neil
movies

eye 9

favorite 0

comment 0

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.
Vimcasts
Apr 1, 2010 Drew Neil
movies

eye 15

favorite 0

comment 0

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
Mar 28, 2010 Drew Neil
movies

eye 4

favorite 0

comment 0

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.
Vimcasts
Mar 23, 2010 Drew Neil
movies

eye 2

favorite 0

comment 0

This episode introduces the changelist and jumplist, demonstrating a couple of situations where they are useful.
Vimcasts
Mar 14, 2010 Drew Neil
movies

eye 3

favorite 0

comment 0

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.
Vimcasts
Mar 8, 2010 Drew Neil
movies

eye 7

favorite 0

comment 0

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.
Vimcasts
Feb 28, 2010 Drew Neil
movies

eye 7

favorite 0

comment 0

This episode covers the essential commands for working with Vim’s tab pages: opening and closing, switching, and moving them.
Vimcasts
Feb 21, 2010 Drew Neil
movies

eye 2

favorite 0

comment 0

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.
Vimcasts
Feb 14, 2010 Drew Neil
movies

eye 27

favorite 0

comment 0

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.
Vimcasts
Feb 8, 2010 Drew Neil
movies

eye 3

favorite 0

comment 0

This episode covers the commands for shifting text left and right (), and also goes over the auto indent command (=).
Vimcasts
Jan 24, 2010 Drew Neil
movies

eye 3

favorite 0

comment 0

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.
Vimcasts
Jan 17, 2010 Drew Neil
movies

eye 4

favorite 0

comment 0

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.
Vimcasts
Jan 5, 2010 Drew Neil
movies

eye 6

favorite 0

comment 0

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.