Text Editor is for editing unspecified texts, nothing to do with programming, although a code can be written in a text editor.
A code editor is specialized, has features that help in coding, there are aids to better take advantage of programming languages or other types of definition. Besides the features that allow editing in a more appropriate way for the movements that a code usually has, and do not have the typical features of editing text formatted as a letter or something like that (does not make bold, paragraph, etc.), it usually have coloring to help with visualization, tips and auto completion of syntax, among other facilities. Generally it can be more configurable to give more ergonomics and usability to the programmer with its style and language. It is common to have a plugin system. Of course, every code editor is a text editor in a general sense.
As far as I know, it does not have a clear line where the code editor starts to be an IDE. I guess it's when you do something other than editing the code. Certainly every IDE has a text editor. You also have to call the debugger and analysis tools, project management, help , probably a screen editor, reports and other visual components, version control, analysis performance, among others. The plugin system is usually more comprehensive.
Of course, a code editor can edit plain, plain text without formatting. Just as you can edit JSON, XML. I do not consider the two editors cited as text. A Notepad ++ can edit simple text or code.
For me Sublime and Notepad ++ are essentially code editors. As it does not have a clear and irrefutable formal definition certainly there are those who disagree.
And I consider the Visual Studio Code a IDE . It may not be as powerful, but it is much more than a code editor, lets you take care of the project as a whole.
Visual Studio is a ALM (Application Lifecycle Management) or (ADLM where development is included) which is a Glorified IDE. In addition to the typical activities of development, he takes care of other points such as configuration, various tests, implementation, requirements, architecture, maintenance, changes and problems, documentation, quality, governance, collaboration, the project in a broad sense and other activities related to the project which are not development itself.
An ALM has UML modeling or similar style, database access, continuous integration, among others. Some ALMs do not have an IDE. Again the line of what an IDE is and an ALM is not well defined.