Sublime Editor rocks when it comes to handling Text files on any Operating systems you work on. You can make changes to text files much effectively using this tool. As a programmer there are times when i want to add certain text at the start and end of each line in a text file (like adding single or double quotes at both ends of each line)
Steps :- Open the file using Sublime Text.
- Press Ctrl + F Key on Windows / Command + F on Mac OS X.
- Now you would see Find Options at the bottom, Select .* (Regular Expression) Button
- Now Search : ^ (Exponent Symbol) and Click on Find all: You would see the cursor's blinking at the start of each line of the file, anything you type now will added at the start of each line.
- Similarly to add some text at the end of each line, Search : $ (Dollar)
- Thats it!
Note: Do check that the Regular expression option has been selected, if it is not you will not be able to perform this operation.
Example: Here is a file with some text, double quotes are to be added at the start and end of each line, below is a .gif image demonstration of how to achieve this using the above steps.
- Mac - How to Install VirtualBox - MacOS
- How to convert a True/False String to Boolean in Python - Python
- Detect Data roaming in Android Application - Android
- Changed AD user display name showing old name in SharePoint - SharePoint
- How to Hum a Song to Google to find it out! [Android and iPhone] - Google
- Java Generics: Type parameter cannot be instantiated directly - Java
- Arrows and Directional Symbol Picker - Tools
- pip/pip3 ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied - PIP