Create an Applet. The script below should get you started. Save that Applet to place of your preference (
/Applications/). Select any text file and press ⌘+I(nfo) > Open With: > Other > Select you Applet, then click change all. Now whenever you open any text file that applet will run, which will open the file in vim.
on open theFiles
tell application "Terminal"
-- If there are no open windows, open one.
if (count of windows) is less than 1 then
do script ""
set theTab to selected tab in first window
set filePath to POSIX path of item 1 of theFiles
do script "/usr/bin/vim " & quoted form of filePath in theTab
-- Handle the case where the script is launched without any dropped files
open (choose file with multiple selections allowed)