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

Updated all plugins that are non-forked. Added some new plugins.

Added update_plugins.py which can fetch new plugins from GitHub.

New plugins added: zencoding, vim-indent-object, taglist, nginx.vim
This commit is contained in:
amix
2013-04-13 14:45:21 -03:00
parent 5731b3a420
commit 3f1cdba799
1057 changed files with 33631 additions and 10806 deletions

View File

@ -0,0 +1 @@
assert_redirected_to ${1::action => "${2:index}"}

View File

@ -0,0 +1 @@
assert_redirected_to <+<+parent+>_<+child+>_path(<+@<+parent+>+>, <+@<+child+>+>)+>

View File

@ -0,0 +1 @@
assert_redirected_to <+<+parent+>_<+child+>_path(<+@<+parent+>+>)+>

View File

@ -0,0 +1 @@
assert_redirected_to <+<+model+>_path(<+@<+model+>+>)+>

View File

@ -0,0 +1 @@
assert_redirected_to <+<+model+>s_path+>

View File

@ -0,0 +1,3 @@
assert_difference "${1:Model}.${2:count}", $1 do
${3}
end

View File

@ -0,0 +1,3 @@
assert_no_difference "${1:Model}.${2:count}" do
${3}
end

View File

@ -0,0 +1 @@
assert_response :${1:success}, @response.body${2}

View File

@ -0,0 +1 @@
assert_rjs :<+replace+>, <+"<+dom id+>"+>

View File

@ -0,0 +1 @@
assert_select '<+path+>'<+, :<+text+> => <+'<+inner_html+>'+>+> <+do<++>+>

View File

@ -0,0 +1 @@
before_filter :${1:method}

View File

@ -0,0 +1 @@
belongs_to :${1:association}

View File

@ -0,0 +1 @@
cattr_accessor :${1:attr_names}

View File

@ -0,0 +1,14 @@
def create
@${1:model_class_name} = ${2:ModelClassName}.new(params[:$1])
respond_to do |wants|
if @$1.save
flash[:notice] = '$2 was successfully created.'
wants.html { redirect_to(@$1) }
wants.xml { render :xml => @$1, :status => :created, :location => @$1 }
else
wants.html { render :action => "new" }
wants.xml { render :xml => @$1.errors, :status => :unprocessable_entity }
end
end
end${3}

View File

@ -0,0 +1,9 @@
def destroy
@${1:model_class_name} = ${2:ModelClassName}.find(params[:id])
@$1.destroy
respond_to do |wants|
wants.html { redirect_to($1s_url) }
wants.xml { head :ok }
end
end${3}

View File

@ -0,0 +1,3 @@
def edit
@${1:model_class_name} = ${2:ModelClassName}.find(params[:id])
end

View File

@ -0,0 +1,8 @@
def index
@${1:model_class_name} = ${2:ModelClassName}.all
respond_to do |wants|
wants.html # index.html.erb
wants.xml { render :xml => @$1s }
end
end${3}

View File

@ -0,0 +1,8 @@
def new
@${1:model_class_name} = ${2:ModelClassName}.new
respond_to do |wants|
wants.html # new.html.erb
wants.xml { render :xml => @$1 }
end
end${3}

View File

@ -0,0 +1,8 @@
def show
@${1:model_class_name} = ${2:ModelClassName}.find(params[:id])
respond_to do |wants|
wants.html # show.html.erb
wants.xml { render :xml => @$1 }
end
end${3}

View File

@ -0,0 +1,14 @@
def update
@${1:model_class_name} = ${2:ModelClassName}.find(params[:id])
respond_to do |wants|
if @$1.update_attributes(params[:$1])
flash[:notice] = '$2 was successfully updated.'
wants.html { redirect_to(@$1) }
wants.xml { head :ok }
else
wants.html { render :action => "edit" }
wants.xml { render :xml => @$1.errors, :status => :unprocessable_entity }
end
end
end${3}

View File

@ -0,0 +1 @@
find(:all<+, :conditions => ['<+<+field+> = ?+>', <+true+>]+>)

View File

@ -0,0 +1 @@
find(:first<+, :conditions => ['<+<+field+> = ?+>', <+true+>]+>)

View File

@ -0,0 +1 @@
find(<+id+>)

View File

@ -0,0 +1 @@
find(:last<+, :conditions => ['<+<+field+> = ?+>', <+true+>]+>)

View File

@ -0,0 +1 @@
flash[:${1:notice}] = "${2}"

View File

@ -0,0 +1 @@
has_and_belongs_to_many :${1:object}, :join_table => "${2:table_name}", :foreign_key => "${3}_id"${4}

View File

@ -0,0 +1 @@
has_many :${1:object}

View File

@ -0,0 +1 @@
has_many :<+object+>s<+, :class_name => "<+object+>", :foreign_key => "<+reference+>_id"+>, :dependent => :destroy<++>

View File

@ -0,0 +1 @@
has_many :${1:object}, :through => :${2:object}

View File

@ -0,0 +1 @@
has_one :${1:object}

View File

@ -0,0 +1 @@
I18n.t('${1:type.key}')${2}

View File

@ -0,0 +1 @@
<%= image_submit_tag("<+agree.png+>"<+<+, :id => "<+id+>"+><+, :name => "<+name+>"+><+, :class => "<+class+>"+><+, :disabled => <+false+>+>+>) %>

View File

@ -0,0 +1 @@
RAILS_DEFAULT_LOGGER.${1:debug} ${2}

View File

@ -0,0 +1 @@
logger.debug { "${1:message}" }${2}

View File

@ -0,0 +1 @@
logger.error { "${1:message}" }${2}

View File

@ -0,0 +1 @@
logger.fatal { "${1:message}" }${2}

View File

@ -0,0 +1 @@
logger.info { "${1:message}" }${2}

View File

@ -0,0 +1 @@
logger.warn { "${1:message}" }${2}

View File

@ -0,0 +1 @@
add_column :${1:table}, :${2:column}, :${3:type}

View File

@ -0,0 +1 @@
${1:map}.${2:connect} '${3:controller/:action/:id}'

View File

@ -0,0 +1 @@
${1:map}.catch_all "*${2:anything}", :controller => "${3:default}", :action => "${4:error}"${5}

View File

@ -0,0 +1 @@
${1:map}.resource :${2:resource}

View File

@ -0,0 +1 @@
${1:map}.resources :${2:resource}

View File

@ -0,0 +1,3 @@
${1:map}.with_options :${2:controller} => '${3:thing}' do |$3|
${4}
end

View File

@ -0,0 +1 @@
before_save :${1:method}

View File

@ -0,0 +1 @@
change_column :${1:table}, :${2:column}, :${3:type}

View File

@ -0,0 +1 @@
t.column :${1:title}, :${2:string}

View File

@ -0,0 +1,3 @@
change_table :${1:table_name} do |t|
${2}
end

View File

@ -0,0 +1 @@
remove_column :${1:table}, :${2:column}

View File

@ -0,0 +1,3 @@
create_table :${1:table_name} do |t|
t.column :${2:name}, :${3:type}
end

View File

@ -0,0 +1,8 @@
class ${1:`Snippet_MigrationNameFromFilename()`} < ActiveRecord::Migration
def self.up
${2}
end
def self.down
end
end

View File

@ -0,0 +1 @@
map(&:${1:id})

View File

@ -0,0 +1 @@
remove_column :${1:column}

View File

@ -0,0 +1 @@
remove_column :${1:table}, :${2:column}

View File

@ -0,0 +1 @@
rename_column :${1:table}, :${2:old}, :${3:new}

View File

@ -0,0 +1 @@
mattr_accessor :${1:attr_names}

View File

@ -0,0 +1 @@
named_scope :<+name+><+, :joins => :<+table+>+>, :conditions => <+['<+<+field+> = ?+>', <+true+>]+>

View File

@ -0,0 +1 @@
named_scope :<+name+>, lambda { |<+param+>| { :conditions => <+['<+<+field+> = ?+>', <+param+>]+> } }

View File

@ -0,0 +1 @@
params[:${1:id}]${2}

View File

@ -0,0 +1 @@
render :action => "${1:action}"

View File

@ -0,0 +1 @@
render :action => "${1:action}", :layout => "${2:layoutname}"

View File

@ -0,0 +1,3 @@
respond_to do |wants|
wants.${1:html} <+{ <++> }+>
end

View File

@ -0,0 +1 @@
render :file => "${1:filepath}"

View File

@ -0,0 +1 @@
render :file => "${1:filepath}", :use_full_path => ${2:false}

View File

@ -0,0 +1 @@
render :inline => "<+<%= 'hello' %>+>"

View File

@ -0,0 +1 @@
render :inline => "${1:<%= 'hello' %>}", :locals => { ${2::name} => "${3:value}"${4} }

View File

@ -0,0 +1 @@
render :inline => "${1:<%= 'hello' %>}", :type => ${2::rxml}

View File

@ -0,0 +1 @@
render :json => ${1:text to render}

View File

@ -0,0 +1 @@
render :layout => "${1:layoutname}"

View File

@ -0,0 +1 @@
render :nothing => ${1:true}

View File

@ -0,0 +1 @@
render :nothing => ${1:true}, :status => ${2:401}

View File

@ -0,0 +1 @@
render :partial => "${1:item}"

View File

@ -0,0 +1 @@
render :partial => "<+item+>", :collection => <+@<+item+>s+>

View File

@ -0,0 +1 @@
render :partial => "<+item+>", :locals => { :<+item+> => <+@<+item+>+><++> }

View File

@ -0,0 +1 @@
render :partial => "<+item+>", :object => <+@<+item+>+>

View File

@ -0,0 +1 @@
render :partial => "${1:item}", :status => ${2:500}

View File

@ -0,0 +1 @@
render :text => "${1:text to render}"

View File

@ -0,0 +1 @@
render :text => "${1:text to render}", :layout => "${2:layoutname}"

View File

@ -0,0 +1 @@
render :text => "${1:text to render}", :layout => ${2:true}

View File

@ -0,0 +1 @@
render :text => "${1:text to render}", :status => ${2:401}

View File

@ -0,0 +1,3 @@
render :update do |${1:page}|
$1.${2}
end

View File

@ -0,0 +1 @@
render :xml => ${1:text to render}

View File

@ -0,0 +1 @@
Digest::SHA1.hexdigest(${1:string})

View File

@ -0,0 +1,15 @@
class ${1:ModelClassName}Sweeper < ActionController::Caching::Sweeper
observe $1
def after_save(${2:model_class_name})
expire_cache($2)
end
def after_destroy($2)
expire_cache($2)
end
def expire_cache($2)
expire_page
end
end

View File

@ -0,0 +1,2 @@
t.boolean :${1:title}
${2}

View File

@ -0,0 +1,2 @@
t.binary :<+title+><+, :limit => <+2+>.megabytes+>
<++>

View File

@ -0,0 +1,2 @@
t.decimal :<+title+><+<+, :precision => <+10+>+><+, :scale => <+2+>+>+>
<++>

View File

@ -0,0 +1,2 @@
t.date :${1:title}
${2}

View File

@ -0,0 +1,2 @@
t.datetime :${1:title}
${2}

View File

@ -0,0 +1,2 @@
t.float :${1:title}
${2}

View File

@ -0,0 +1,2 @@
t.change :<+name+><+, :<+string+><+, :<+limit+> => <+80+>+>+>
<++>

View File

@ -0,0 +1,2 @@
t.integer :${1:title}
${2}

View File

@ -0,0 +1,2 @@
t.integer :lock_version, :null => false, :default => 0
${1}

View File

@ -0,0 +1,2 @@
t.references :<+taggable+><+, :polymorphic => <+{ :default => '<+Photo+>' }+>+>
<++>

View File

@ -0,0 +1,2 @@
t.string :${1:title}
${2}

View File

@ -0,0 +1,2 @@
t.text :${1:title}
${2}

View File

@ -0,0 +1,2 @@
t.time :${1:title}
${2}

View File

@ -0,0 +1,2 @@
t.timestamp :${1:title}
${2}

View File

@ -0,0 +1,2 @@
t.timestamps
${1}

View File

@ -0,0 +1 @@
t.remove :${1:column}

Some files were not shown because too many files have changed in this diff Show More