Text Editors & Terminals
What is a text editor?
A text editor is a program that can be used in several different ways. In my situation, it is what I am using to develop this web page! How can you access a text editor? Text editors are very easy to get! You can simply download and install what ever editor you prefer to your computer or use one that is local to a website like GitHub. Selecting a text editor can be very important because it is the main tool that you will use in development!
What should you look for in a text editor?
While there are several different types of text editors to use, it is vital to look into your options. When considering a text editor you will have to weigh out different factors like:
- Cost: Some editors are completely free to use while others may have trial periods or a flat fee to purchase the software.
- Usability: While some are universal, not all text editors unfortunately work on all computers. There are a variance of options for each operating system.
- Work preferences: If you are starting to develop for your place of work, they may all use a specific text editor. This is not crucial but can help in the process of working together!
- Personal Preference: This is where your opinion comes in. What text editor best suits what you are looking for? Is it presentable and easy to maneuver? It is also key to look for editors that have code completion & syntax highlighting to be more efficient.
- Definitions:
- Syntax Highlighting: This feature displays text and code that you have written in different colors and fonts according to the code used, markdown effect, etc. It also can make your text easier to read when it comes to finding errors.
- Code Completion: Code completion is constantly working while you are entering code. The code completion feature will display suggestions like end brackets, full code for inserting photos & hyper links, etc. This is based on what you originally begin to type in your code editor. This can be beneficial when working on large projects with lots of open and closing code!
- IDE: (Integrated Development Environment) An IDE is a text editor, file manager, compiler, and a debugger all in one software package.
> Here is a list of a few different Text Editors
Mac | Windows |
---|---|
Text Wrangler | NotePad++ |
Visual Studio Code | Visual Studio Code |
Atom | Atom |
Brackets | Brackets |
What is a Terminal?
A terminal is the actual interface to your computer that you can type and execute text based commands. The terminal is used to execute commands that allow you to do a certain task like: display computer content, locate and create file pathways, create networks, access text editors, and so much more! The commands that you use while working in a terminal can very based on the Terminal used, but all use common code languages like JavaScript, Python, C#, C++, and Ruby! Below are a few common operating systems and how to open the terminal!
- Macbook
- How to open Terminal?
- You can start by looking under Applications -> Utilities. An easy way to get to it is the key combination ‘command + space’ which will bring up Spotlight, then start typing Terminal and it will soon show up.
- Linux
- How to open Terminal?
- On linux systems, you can try to find it in Applications -> System or Applications -> Utilities. Alternatively you may be able to ‘right-click’ on the desktop and there may be an option ‘Open in terminal’.
- How to open Terminal?
- Windows
- If you are on Windows and intend to remotely log into another machine then you will need an SSH client.
Commands and Pathways
So we have a little bit of a better idea on what a terminal is and how to access it, but now what! This is where the magic of commands come into play. Commands, similar to markdown commands, are terms and symbols used to run specific process while in terminal. There are so many different commands that can be used individually or combined to run different processes. It may be a little intimidating at first seeing all the different commands but there is no need to be. Most of the time you can find cheat sheets online or make your own to help remember them! Below is a listed of a few commands that I found important when first interacting with a Terminal.
Command Name Action pwd Print Working Directory This command will show what directory you are currently in. ls List Displays everything that is in the current directory. ls /Users/username/applications List for applications file Displays everything that is in applications. -ls Long List Displays a long list with more info from everything in current directory. cd Change Directory Using this command with a pathway will change your current directory. mkdir Make Directory This will create a new director in the current directory. code . Open Text Editor This will open an external text editor if connected. rm -f Remove File Using this command with a pathway will remove a file. Pathways
Pathways are used to show you where you are or where you want to go more specifically in a terminal! For example, say you are in your terminal and you need to change directories to your Applications folder from your home directory:
cd applications
. Once using the cd command, you may not think anything happened but after enteringpwd
, you will see you are now in the applications directory (pathway:user/yourusername/applications
) rather than being just in your home directory (pathwayusers/yourusername
)! Just as it appears, all that happened to the pathway was the application extension was added in. To help get a better idea of what is going on, this is the equivalent to being in finder or files on your os and clicking to the applications file. This can be very useful in making sure you are in the correct directory or navigating into a file that is deep within a large network.