1
0
mirror of https://github.com/amix/vimrc synced 2025-06-16 01:25:00 +08:00

Updated plugins

This commit is contained in:
amix
2016-02-20 13:13:10 +00:00
parent 795a8fb80d
commit e81e42ec4d
214 changed files with 5916 additions and 1107 deletions

View File

@ -622,25 +622,9 @@ finally:
endsnippet
#####################
######################
# Assertions & Tests #
#####################
snippet pdb "Set PDB breakpoint" b
import pdb; pdb.set_trace()
endsnippet
snippet ipy "Embed IPython shell" b
import IPython; IPython.embed()
endsnippet
snippet ipdb "Set IPDB breakpoint" b
import ipdb; ipdb.set_trace()
endsnippet
snippet pudb "Set PUDB breakpoint" b
import pudb; pudb.set_trace()
endsnippet
######################
snippet ae "Assert equal" b
self.assertEqual(${1:${VISUAL:first}},${2:second})

View File

@ -15,7 +15,7 @@ t.boolean :${1:title}
$0
endsnippet
snippet cla "Create controller class"
snippet clac "Create controller class"
class ${1:Model}Controller < ApplicationController
before_filter :find_${2:model}
@ -48,7 +48,7 @@ t.float :${1:title}
$0
endsnippet
snippet cla "Create functional test class"
snippet clact "Create functional test class"
require 'test_helper'
class ${1:Model}ControllerTest < ActionController::TestCase
@ -133,7 +133,7 @@ class ${1:Model}sController < ApplicationController
# PUT /${1/./\l$0/}s/1.xml
def update
respond_to do |wants|
if @${1/./\l$0/}.update_attributes(params[:${1/./\l$0/}])
if @${1/./\l$0/}.update(params[:${1/./\l$0/}])
flash[:notice] = '${1:Model} was successfully updated.'
wants.html { redirect_to(@${1/./\l$0/}) }
wants.xml { head :ok }
@ -601,12 +601,6 @@ respond_to do |wants|
end
endsnippet
snippet resw "respond_with"
respond_with(${1:@${2:model}})${3: do |format|
format.${4:html} { $0 \}
end}
endsnippet
# FIXME
snippet returning "returning do |variable| ... end"
returning ${1:variable} do${2/(^(?<var>\s*[a-z_][a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1: |)/}${2:v}${2/(^(?<var>\s*[a-z_][a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:|)/}
@ -799,10 +793,6 @@ snippet xput "xhr put"
xhr :put, :${1:update}, :id => ${2:1}, :${3:object} => { $4 }$0
endsnippet
snippet finl "find(:last)"
find(:last${1:, :conditions => ['${2:${3:field} = ?}', ${5:true}]})
endsnippet
snippet sweeper "Create sweeper class"
class ${1:Model}Sweeper < ActionController::Caching::Sweeper
observe ${1:Model}

View File

@ -266,18 +266,6 @@ snippet "(\S+)\.Index" ".index do |item| ... end" r
end
endsnippet
snippet do "do |<key>| ... end" i
do |${1:args}|
$0
end
endsnippet
snippet Do "do ... end" i
do
$0
end
endsnippet
snippet until "until <expression> ... end"
until ${1:expression}
$0