In this article we will go through the steps required to add comma after each line, the same steps can be used in both Mac or Windows using any of the commonly used code editors like Atom or Sublime text.
You may even use the solution to remove a comma or even better add/remove other symbols or content after each line.
Welcome to to Mr. Virk Media, I am your host Navjot Virk. And will be walking you through the steps.
Add Comma After Each Line
Learn using a sample use case or Move Straight to Steps HERE.
Use case: I have an excel dataset that contains public companies info like ticker symbol, industry etc.
And, I am interested in creating an online portfolio on say Yahoo Finance which requires comma separated ticker symbols for multiple entries, and off-course I am not looking to insert data individually (maybe I am lazy or want to save time & energy or there maybe just too much data to work with, any the case I think their is no point going one by one if you can do it all at once and more effectively).
I will be taking all the ticker symbols.
Note: The video tutorial shared below covers steps on 3 different code editors – Atom, Sublime Text and Visual Studio Code
In this example, I will be working with Atom on a Mac (you may choose an editor of your choice). If you are on a Windows Computer please use Ctrl (control) button on your keyboard instead of Command and you should be able to achieve the same results.
Let’s start, open your code editor with data you would like to work with. Below, I have isolated all the ticker symbols that I am interested in working with.
Step 1: Select all the data using Command + A on your keyboard
Step 2: Press Command + Shift + L to split data into lines, this will allow you to work at the end of each line.
Step 3: Using the Arrow key → navigate to end of the line, and add comma or any other content of your choice.
Add Comma or Something at the Start of Each Line
Now if you had use-case where you wanted to add comma at the start of each line, you would just want to simply navigate to start of line using the ← symbol on the keyboard
List of Commonly used Text/Code Editors you may use
For anyone new to code editors, here is a list of commonly used editors – Atom, Sublime Text, Visual Studio Code
Hope this helps save you some time.