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
2013-05-04 16:32:47 -04:00
parent 687184f0bb
commit 630b462208
16 changed files with 287 additions and 147 deletions

View File

@ -69,6 +69,41 @@ Historical notes
unfortunately abandoned the project. [Rok Garbas][3] is now maintaining a
[fork][4] of the project in hopes of improving the existing code base.
Versions / dialects / ..
========================
There are some issues, such as newer language versions may require other
snippets than older. If this exists we currently recommend doing this:
add snippets/ruby.snippets (common snippets)
add snippets/ruby-1.8.snippets (1.8 only)
add snippets/ruby-1.9.snippets (1.9 only)
then configure github.com/garbas/vim-snipmate this way:
let g:snipMate = {}
let g:snipMate.scope_aliases = {}
let g:snipMate.scope_aliases['ruby'] = 'ruby,ruby-rails,ruby-1.9'
or github.com/MarcWeber/UltiSnips this way:
let g:UltiSnips = {}
let g:UltiSnips.snipmate_ft_filter = {
\ 'default' : {'filetypes': ["FILETYPE"] },
\ 'ruby' : {'filetypes': ["ruby", "ruby-rails", "ruby-1.9"] },
If it happens that you work on a project requiring ruby-1.8 snippets instead,
consider using vim-addon-local-vimrc and override the filetypes.
Well - of course it may not make sense to create a new file for each
ruby-library-version triplet. Sometimes postfixing a name such as
migrate_lib_20_down
migrate_lib_20_up
will do it then if syntax has changed.
Language maintainers
--------------------
@ -76,6 +111,11 @@ Language maintainers
No one can really be proficient in all programming languages. If you would like
to maintain snippets for a language, please get in touch.
Notes: People are interested in snippets - and their interest may stop again
at will. So its ok if people maintain a language only for a short period of
time - or jump in and get things done - don't let the flow stop :)
vim-snippets is not like the "linux kernel".
* Python - [honza](http://github.com/honza)
* Javascript - [honza](http://github.com/honza)
* HTML Django - [honza](http://github.com/honza)

View File

@ -589,6 +589,8 @@ snippet bf
before_filter :${1:method}
snippet bt
belongs_to :${1:association}
snippet btp
belongs_to :${1:association}, :polymorphic => true${2}
snippet crw
cattr_accessor :${1:attr_names}
snippet defcreate
@ -890,22 +892,27 @@ snippet mrnc
rename_column :${1:table_name}, :${2:old_column_name}, :${3:new_column_name}
snippet mcc
change_column :${1:table}, :${2:column}, :${3:type}
snippet mccc
t.column :${1:title}, :${2:string}
snippet mnc
t.${1:string} :${2:title}${3:, null: false}${4}
snippet mct
create_table :${1:table_name} do |t|
t.column :${2:name}, :${3:type}
${2}
end
snippet migration
snippet migration class .. < ActiveRecord::Migration .. def up .. def down .. end
class ${1:class_name} < ActiveRecord::Migration
def self.up
def up
${2}
end
def self.down
def down
end
end
snippet migration class .. < ActiveRecord::Migration .. def change .. end
class ${1:class_name} < ActiveRecord::Migration
def change
${2}
end
end
snippet trc
t.remove :${1:column}
snippet tre
@ -913,7 +920,6 @@ snippet tre
${3}
snippet tref
t.references :${1:model}
#rspec
snippet it
it "${1:spec_name}" do
@ -944,7 +950,9 @@ snippet aft
${2}
end
snippet let
let(:${1:method}) { ${2} }
let(:${1:object}) ${2:block}
snippet let!
let!(:${1:object}) ${2:block}
snippet subj
subject { ${1} }
snippet spec