Skip to content

Samples and notes for my Aug 2014 'Your First Vim Plugin' talk

Notifications You must be signed in to change notification settings

learningjs/your-first-vim-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Your First Vim Plugin

These are the notes and samples from my August 2014 Vim talk, 'Your First Vim Plugin'. Their official home is this repo.

Samples

  1. Fix spelling error
  2. Move Item To List Top
  3. Markdown underline
  4. Extract Variable

The Simple Path to Your First Plugin

  1. Know how to edit, save, and source your vimrc
  2. Capture normal mode actions, repeat with :normal
  3. Wrap :normal call in a named function 1a. Poke around in the REPL / command line 1b. Add ehcom debug statements, use :messages to review 1c. Temporarily export to global var
  4. Wrap it up
  • script local your function
  • create a command
  • package it up!

What Can You do with Vim Plugins?

Custom Text Objects

Not mine, but still great!

Operators

  • titlecase - Titlecase based on a motion
  • sort-motion - Sort lines or arguments, based on a vim motion

System Integration

  • tmux nav - Navigate seamlessly between vim and tmux splits
  • tmux runner - Send commands from Vim to adjacent tmux panes

Raw Efficiency

  • spec-runner - Efficient spec running from withing vim
  • rfactory - Rails.vim inspired navigation commands for FactoryGirl
  • conflicted - Powerful git merge/rebase conflict resolution
  • quicklink - Insert links

Pro Tips

About

Samples and notes for my Aug 2014 'Your First Vim Plugin' talk

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vim Script 79.8%
  • JavaScript 20.2%