![Vimcasts show](https://d3dthqtvwic6y7.cloudfront.net/podcast-covers/000/040/362/medium/vimcasts.png)
Vimcasts
Summary: In each episode, Drew Neil demonstrates one of Vim's features, showing how to incorporate it into your workflow.
- Visit Website
- RSS
- Artist: Drew Neil
- Copyright: Drew Neil
Podcasts:
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.
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.
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.
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.
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.
For the VimGolf challenge ["List the first 100 prime numbers"][primes], 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! [primes]: http://vimgolf.com/challenges/4d1c27940e3d7832db000010
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.*
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][gito], 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.* [gito]: http://book.git-scm.com/1_the_git_object_model.html
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][f], 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.* [f]: https://github.com/tpope/vim-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.
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][t] plugin. [t]: https://github.com/godlygeek/tabular