Back Button Tooling
Vim Mastery

Vim Mastery

There's a reason why, after decades, countless developers still prefer Vim as their code editor of choice. That many people can't be wrong, right? In this series, I'll teach you how to master the most flexible editor on the planet.

Advanced
22 episodes
2:37:27 hrs
22
Latest Episode in This Series

Added 4 years ago

PHP Documentor and Ultisnips

Are you manually writing out your doc-blocks in Vim? Annoying, right? Luckily, there's a much simpler way....

Watch
Vim Mastery

Vim Mastery

There's a reason why, after decades, countless developers still prefer Vim as their code editor of choice. That many people can't be wrong, right? In this series, I'll teach you how to master the most flexible editor on the planet.

Begin
22
Latest Episode in This Series

Added 4 years ago

PHP Documentor and Ultisnips

Are you manually writing out your doc-blocks in Vim? Annoying, right? Luckily, there's a much simpler way....
Watch

Your Teacher | Jeffrey Way

https://laracasts.s3.amazonaws.com/avatars/jeffrey-avatar.jpg's avatar
Hi, I'm Jeffrey. I'm the creator of Laracasts and spend most of my days building the site and thinking of new ways to teach confusing concepts. I live in Orlando, Florida with my wife and two kids.
    1. EPISODE 1

      Run Time 2:33

      Free

      Are you intrigued by all those fancy Vim tricks? Are you considering a switch, but are overwhelmed by the steep learning curve? If so, why don't you come along with me, and I'll show you everything I know about this incredible editor.

    2. EPISODE 2

      Run Time 12:20

      Free

      Let's begin by reviewing the absolute basics. With Vim, how do we save a file, or quit the editor, or edit a new file? How do we set configuration values?

    3. EPISODE 3

      Run Time 15:04

      Let's get back into it. In this lesson, we'll review addition configuration, custom mappings, and auto commands. Don't forget: you won't learn this properly, unless you work along!

      View the.vimrc for this episode.

    4. EPISODE 4

      Run Time 5:35

      Before we dig into the intricacies of Vim, let's take a moment to focus on visuals. Can we at least set up a better color scheme and font? Sure, we can. And what about those ugly scrollbars in MacVim?

    5. EPISODE 5

      Run Time 4:34

      A neat feature of Vim is its ability to create any arrangement of split windows. In this episode, you'll learn how this works, and will then move on to configuring their default keybindings, accordingly.

      View our .vimrc file, as of this episode's completion.

    6. EPISODE 6

      Run Time 10:07

      You'll frequently need to browse your project's file structure, so it's important that we build a good workflow. In this lesson, we'll first learn how to improve Vim's default netrw file browser with Tim Pope's excellent Vinegar.vim. Next, for a more traditional experience, we'll pull in NERDTree. As you'll find, when we use Vundle for dependency management, downloading and installing any plugin is a cinch!

    7. EPISODE 7

      Run Time 6:08

      We'll next pull in the popular CtrlP plugin, which allows you to rapidly switch from file to file.

      Here's our .vimrc file so far.

    8. EPISODE 8

      Run Time 7:17

      Before we move ahead to working with c-tags, let's first make a handful of configuration tweaks. First, we'll fix a conflict between NERDTree and netrw. Next, we'll enable fancy symbols for our Fira Code font. And finally, we'll finish up by improving MacVim's awkward tabs, and switching our Ctrl + P keyboard shortcut over to the more familiar Command + P.

    9. EPISODE 9

      Run Time 9:28

      Imagine that you need to find a particular method in your project. The traditional way is to hunt around the project tree in your sidebar, find the file, click on it, and scroll the page until you find the method. Ehh, we can do way better than that. In this lesson, you'll learn how to instantly browse to any symbol in your project. It's lightning fast!

      View our .vimrc file so far.

    10. EPISODE 10

      Run Time 5:01

      We have a theme we like, but what if we need to tweak a few visuals? Let me show you the basic process in this lesson.

    11. EPISODE 11

      Run Time 9:08

      An immediate pitfall for new Vim users is how to perform site-wide searches and replacements. In this lesson, I'll demonstrate my exact approach - using Ag.vim and Greplace.vim.

    12. EPISODE 12

      Run Time 5:04

      Let's switch back to how we browse files. It's crucial that you find a workflow you enjoy. Another option you have is a GUI app, called PeepOpen. If you enjoy the Sublime-Text form of "Command + p", you might find that you prefer this option.

    13. EPISODE 13

      Run Time 5:24

      As you write code in Vim, try to keep a mental record of all the tasks that take longer than you'd like. Even an extra two seconds adds up, trust me. In this lesson, I'll show you a handful of mappings that you might consider, when working in a Laravel app.

    14. EPISODE 14

      Run Time 6:33

      When you need to create code snippets in Vim, SnipMate will do the job quite nicely. I'll show you how it works.

      View the .vimrc file for this series so far on GitHub.

    15. EPISODE 15

      Run Time 3:19

      Tim Pope's excellent Surround plugin is a stable in every Vim user's tool belt. Need to quickly change single quotes to double quotes? Or do you want to instantly delete a surrounding HTML tag, or update it to a new one all together? With this plugin, it's all a cinch.

    16. EPISODE 16

      Run Time 6:54

      In this episode, we'll focus on three different PHP optimizations. We'll begin by updating our syntax file. Next, we'll add support for automatically adding use imports to any class. Finally, we'll add a mapping that allows us to instantly sort use statements by length.

    17. EPISODE 17

      Run Time 10:30

      We've yet to figure out how to handle auto-completion. As such, in this episode, we'll take a first step. The goal is to type a sequence of characters, hit "tab", and then see all relevant results from nearby buffers. As always though, throughout the video, we'll discuss a number of other helpful Vim tricks.

      View our .vimrc file, as of this episode.

    18. EPISODE 18

      Run Time 4:32

      Let's set up php-cs-fixer, so that we may type a simple keystroke and instantly format any PHP class, according to the PSR-2 convention.

    19. EPISODE 19

      Run Time 9:56

      Vim marks offer you a way to instantly return to any location in your project, simply by typing a keystroke. I think you'll like it!

    20. EPISODE 20

      Run Time 5:17

      Unfortunately, when it comes to managing tabs, indents, and spacing, well - Vim can get pretty confusing. That's okay; learn how to configure them once, and then feel free to expel all this junk from your brain.

    21. EPISODE 21

      Run Time 6:29

      A macro is nothing more than a recording that can be played back at any time. An excellent candidate for a macro is any piece of workflow that you find yourself repeating over and over. As an example, in this video, we'll record a macro to take a constructor argument, and then automatically initialize and assign it, as a property.

    22. EPISODE 22

      Run Time 6:14

      Are you manually writing out your doc-blocks in Vim? Annoying, right? Luckily, there's a much simpler way. In this episode, we'll pull in the PHP Documentor plugin, while also fetching UltiSnips, which is similar (even a replacement) to SnipMate.

      View our .vimrc file for the series so far on GitHub.