added vim helper, abstracted smartfile func