I was confused about what text editor should I use to write code and script, can anyone tell me what his best text editor and why?
Create templates to quickly answer FAQs or store snippets for re-use.
I recommend Visual Studio Code. It starts out simple, so there isn't a lot to learn before you can get started working on code. Just install it and open up a file. As you learn more about what you're working with, it has a ton of extensions and is easily customized via JSON files which can be used globally or per-project. It's actually completely replaced bulkier IDEs for me, just through extensions and customization, but is still useful for quick edits on small files. It runs on Windows, OS X, or Linux. The built-in code tooling is pretty helpful, and it has a built-in terminal window so you can stay within the application as you work.
Been using UNIX systems (and, now, UNIX work-alikes) since 1989, so, pretty much have been a vi an vi clones/work-alikes mostly because it's just so ingrained (plus, even if using other editor-type tools, I generally only use ones that let me operate in vi mode ...or else the tool simply feels useless).
After all the years, I'm still a Nano devotee. It's preinstalled on most Linux distros, very easy to learn, and has most of the features I would want. It's got help across the bottom to help you learn the most important hotkeys while working, and it gets pretty powerful when you configure it and all, especially with the extensible syntax highlighting system. I've written more about the unsung power of Nano.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.