Joined March 2012
·

Jan Dudulski

Ruby and Javascript developer at Monterail
·
Wroclaw, Poland
·
·
·

You can also use arel:

Order.where(Order.arel_table[:uuid].in(ids).or(Order.arel_table[:id].in(ids)))

With arel-helpers we can make it a little shorter:

Order.where(Order[:uuid].in(ids).or(Order[:id].in(ids)))

And it's much more flexible since you can combine any or/and groups

Posted to Natural copying and pasting in Vim over 1 year ago

I don't like remapping C-c/C-v. I'm using <Leader>y and <Leader>p

Posted to Auto indent pasted code in vim over 1 year ago

instead of:

V`]

you can use:

gv

which reselect last select or paste.

Also, I'm not sure if I would like to have = remapped, gv= is still ok for me :)

edit:
I was wrong. gv will work only if p or P was used in visual mode.
I've got another mapping in my .vimrc:

noremap gV `[v`]

It would select last edited/pasted lines, so you can use gV=

Achievements
379 Karma
21,526 Total ProTip Views