As far as I know, there really is no difference between the two.
I prefer to add such commands to ftplugin and save the main .vimrc agnostic language ... But there are no hard rules. The advantage of saving to your vimrc would be that your vim settings would be easier to navigate (for example, you can get all the vim settings on a new machine by simply copying .vimrc instead of .vimrc + .vim ). Obviously, including them in your .vimrc will also have a slight performance limitation (i.e. they will be uploaded + executed for each file, and not just for ruby ββfiles) ... But I would not worry about that.
source share