option for ls command

i'm using SunOS 5.7 and I know theres a ls option for seeing what kind of files are in a directory. I was wondering if there was a ls option that could see if the files are txt or files that can be opened in vi

ls -l
will tell you what type of file you have. But unix does not make the kind of distinctions that you are referring to. To unix, a plain file is a plain file. One command that comes close to what you want would be:
file *
this will open every file, read some of it and try to make a guess as to what the contents are. You might give that a try.

But see this thread for some discussion on why the "file" command is not really a great solution.