Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Colon replacement for surround.vim

I know supporting plugins is a slippery, slippery slope, but if we can
do matchit, why not surround?  This lets you do cs": to change a string
to a symbol.
  • Loading branch information...
commit 680d1eaafc693017318267b6eb08eb889252c0aa 1 parent b3af8c4
Tim Pope tpope authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 ftplugin/ruby.vim
4 ftplugin/ruby.vim
View
@@ -41,6 +41,10 @@ if exists("loaded_matchit") && !exists("b:match_words")
\ "InstanceVariable\\|GlobalVariable\\|Symbol\\)\\>'"
endif
+if exists('g:loaded_surround') && !exists('b:surround_'.char2nr(':'))
+ let b:surround_{char2nr(':')} = ":\r"
+endif
+
setlocal formatoptions-=t formatoptions+=croql
setlocal include=^\\s*\\<\\(load\\>\\\|require\\>\\\|autoload\\s*:\\=[\"']\\=\\h\\w*[\"']\\=,\\)
Please sign in to comment.
Something went wrong with that request. Please try again.