In Finder, in any folder, you can select multiple files then control + click, you will see the menu item “Open With”. Continue holding the control key then press the option key and you will see the menu item “Open With” changes to “Always Open With”. Click that “Always Open With” menu item, choose the default application you want to use to open those files. This will change the default Application for those files only. Just follow this process with all the files in the different folders. Again the process will not take long because you can select multiple files at once and change their default applications.
If you save this following script to your /Users/your username/Library/Workflows/Applications/Folder Actions folder, it will be available to select in the folder actions set up dialogue. Then every time you add a text file to the designated folder, it will set the default application to which ever text editor you assigned in the script.
Basically you create three different versions of this folder action script and asign a different text editor variable in each script to use on the different folders.
I rearranged the script a little bit to make it a bit more universal. Now it's easier to tweak the code to work with different file extensions and different applications, just by changing the property values while leaving the body of the script completely intact.
This script will target ONLY THE .txt's, no matter what type of file gets added to the folder
property Default_App_To_Open_With1 : alias "Macintosh HD:Applications:TextWrangler.app:"
property Default_App_To_Open_With2 : alias "Macintosh HD:Applications:TextEdit.app:"
property Default_App_To_Open_With3 : alias "Macintosh HD:Applications:BBEdit.app:"
property Default_App : Default_App_To_Open_With3
property name_Extension : "txt"
on adding folder items to this_folder after receiving dropped_items
repeat with this_File in dropped_items
tell application "System Events"
if name extension of this_File is name_Extension then
set default application of this_File to Default_App
end adding folder items to