Vim for Ruby Developers
Have you always wanted to learn how to use the Vim text editor, but never knew where to start? Then this is the course for you. My name is Jordan Hudgens, and I’ll be your instructor for the course. In addition to being the lead instructor for devCamp I’ve also been building web applications for over a decade for organizations such as Eventbrite and Quip.
After completing this course you will know how to code with the Vim text editor. But that’s not really a big deal. If you just wanted to use a text editor there’s no point in learning Vim. Vim is more than a text editor, you can ask professional developers from around the world and they’ll tell you that Vim development is a lifestyle. Which is why I don’t stop at simply teaching you how to use the editor. After going through the basics I will show you have to use Vim like a professional Ruby developer to automate your entire development workflow. This will include learning:
- How to process Ruby code so that it renders right inside of the file, this makes it possible to efficiently debug and build Ruby programs without even having to leave the text editor!
- How to customize the Vim environment like a pro, including how to integrate the file system, multiple view panes, and even how to customize the keyboard shortcuts so that you can focus on your code and not the editor.
- How to install Vim plugins, such as being able to perform fuzzy file searches and autocomplete.
This course is not for beginners, the ideal students for this material are those who have some level of Ruby experience and want to take their skills to the professional level. I won’t be teaching much Ruby code throughout these lessons, instead this course will walk through how to setup your development environment to maximize development efficiency.
In additions to the lessons, as a student you will be given access to my personal Vim setting file and a Vim cheat sheet that I’ve spent the past several years creating so that you can use it as a reference as you continue to learn how to use Vim.
Please feel free to review the course curriculum and I look forward to going through the material with you on your development journey!
In this course you'll learn how to work with the Vim text editor from the ground up. This will include: navigation, editing, integrating plugins, customizing the development environment, and much more.
This written guide gives you access to my vimrc customization file and the Vim Cheat Sheet.
In this section you'll learn how to navigation in the Vim text editor, including learning the various keybindings that make navigation efficient.
In this guide you'll learn how to navigate through a file using the Vim text editor, including a discussion on 'Home' and the commands you can use to work in Vim.
Learn how to efficiently navigate through a file in Vim, including keyboard shortcuts that allow you to efficiently skip through data with a single keystroke.
This guide examines the various Vim modes, including:
- Command mode
- Insert mode
- Visual mode
- Replace mode
These modes each have a specific purpose and we walk through examples of how to use each mode to work with files in Vim.
Working with Custom Settings in Vim
In this section you'll learn how to customize your Vim setup, including how to customize on a session and permanent basis.
In this guide you'll learn how to make custom Vim setting changes that last for a single session. We will walk through how to add line numbers, remove the alert sounds, and other temporary setting changes.
This guide examines how to edit the vimrc file so that you can implement permanent settings in Vim that can be utilized throughout your system.
In this guide we'll walk through a base setting file that you can utilize in your vimrc files. We will build on these settings throughout the rest of the course.
Editing in Vim
This section will teach you how to edit a text file in Vim, including advanced editing techniques that will allow you to edit files efficiently.
This guide walks through the basic editing commands that you can use in Vim.
This guide examines how to perform copy, cut, and paste commands, along with how to copy/cut selected items along with entire lines of code by leveraging the delete and yank processes.
In this guide you'll learn how to copy and paste items while working in Vim's Visual mode.
In this guide you'll learn how to paste into Vim from the system clipboard using the "+P command.
In this lesson you'll learn how to delete items in Vim, including various ways that you can remove items from a page.
In this guide we'll walk through advanced commands you can run to delete items in Vim, including how to remove all the comments from a page in a Rails application with a single command.
This quiz will test your knowledge of how to edit in Vim.
Searching and Selecting
In this section you'll learn how to search and perform selections in Vim. We'll also cover how to quickly find and replace text using regular expressions.
In this guide you'll learn the various ways that you can select items inside of Vim, specifically walking through the options provided by Vim's Visual mode.
This lesson teaches you how to perform basic search commands in Vim, I also walk through how to update your Vim settings to add features such as highlighting and case insensitive search.
This guide examines the process for finding and replacing items inside of Vim by leveraging the %s command and passing it regular expressions.
This guide walks through how to search and select items in Vim.
Advanced Vim Processes for Ruby Developers
In this section you'll learn how to work with specific ways that you build Ruby programs by leveraging automated Vim workflows.
In this guide you'll learn how to command and uncomment Ruby code from within a vim file, including a comparison between Vim and Sublime Text.
In this lesson you'll learn how to run terminal commands directly from within Vim, this includes the ability to run Ruby code, RSpec tests, and any other Terminal command.
In this guide you'll learn how to automate your indentation rules inside of a Vim file, including standard and smart indentation behavior.
This guide walks through how to manually indent lines inside of Vim.
This quiz will test your knowledge of shortcuts for Ruby development.
Vim View Management
In this section you'll learn how to work with views in Vim, including how to work with: multiple panes, background jobs, and how to customize pane size.
In this guide you'll learn how to split your view panes horizontally and vertically so that you can view multiple files at the same time in Vim.
This guide walks through how to create custom Vim keybindings that will allow you implement custom behavior while using Vim. Specifically we'll use the example of dynamically resizing window panes in Vim.
This guide explains how you can work with multiple files in Vim by leveraging the :e command.
This guide will teach you how to leverage Unix based background jobs to suspend Vim session and then how to return to them.
This quiz tests your knowledge of working with multiple views and files in Vim.
Auto Processing Ruby Code
In this section you'll learn how to implement a powerful too: how to render Ruby code inside of a file, right next to the Ruby code that you right. This is how you can replicate the type of behavior that Rubyists such as Avdi Grimm uses in his RubyTapas video (except that he uses Emacs).
This guide examines how you can utilize the Seeing Is Believing RubyGem to auto render Ruby code while inside of Vim, including how to add a custom keybinding for running the code.
Guide to Vim Plugins
In this section you'll learn how to work with Vim plugins, including how to install and manage plugins, including Fuzzy Search, Nerd Tree, and other tools that help make your experience as efficient as possible.
Learn how to integrate the Ctrl P plugin in order to utilize Fuzzy Search inside of Vim, this is especially helpful when working on Ruby on Rails applications.
In this guide you'll learn how to integrate the NERDTree plugin so that you can have access to an application's file system while working in Vim.
This guide walks through how to integrate the Endwise Vim plugin in order to add Ruby based auto completion.This include behavior such as adding an `end` to methods and conditionals.
Learn how to integrate the Supertab plugin into Vim in order to allow for tab based autocompletion of commonly used words in a file.
Learn how to integrate the Pathogen plugin manager in order to make the plugin installation process more efficient.
Guide to Vim Macros
In this section you'll learn how to work with Vim macros. This will allow for you to create automated behavior, such as quickly replicating stored processes.
Learn how to create macros in Vim to automate processes and help save you time as a developer on repetitive tasks. For the demo I walk through how to efficiently style CSS and HTML code.
This quiz tests your knowledge of the commands required to run macros in Vim.
Bonus Development Tools
In this section you'll learn how to work with additional tools to aid your Ruby development. This will include how to perform universal code search queries and implementing the tree tool.
This guide will teach you how to run a universal search query through the file system using the grep command. It also compares the search process from the terminal with the process of searching with the Sublime Text editor.
This guide extends the lesson on searching through files with grep and shows how to add the option for searching with a case insensitive option.
Learn how to install the 'tree' command and run it in order to quickly analyze the file system for a specific file path.
This quiz will test your knowledge of the commands learned in the Tools section.