TextEdit keeps crashing
To figure out why TextEdit is crashing, your best bet is to pull up Console and look for error messages from TextEdit. 

That said, there are so many better text editors available on OS X.  Unless you have a really good reason for using TextEdit, I'd suggest trying any of these:


Sublime Text: http://www.sublimetext.com/
Atom: http://atom.io/
TextMate: https://macromates.com/download
Brackets: http://brackets.io/
Text Wrangler: http://www.barebones.com/products/textwrangler/
BBEdit: http://www.barebones.com/products/bbedit/