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)
- 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.
- Unable to load VM from snapshot. The snapshot has been saved for a different hardware configuration - Android
- Get Wifi Details : Android Programming - Android
- JSON Syntax : JSON Tutorial - Json-Tutorial
- Word count in Notepad++ - NotepadPlusPlus
- SharePoint Server 2016 error - Failed to connect to the configuration database - SharePoint
- Android Alert Dialog with Checkboxes example - Android
- java.lang.NoClassDefFoundError android.support.v4.content.LocalBroadcastManager - Android
- [Notepad++] Remove CR Carriage Return and LF Line feed (CRLF) - NotepadPlusPlus
- Failed to install Android.apk on device 'emulator-5554': timeout - Android-Studio
- How to get Mobile Screen Resolution Width and Height programatically - Android
- Tomcat Manager Default Username and Password - Tomcat
- Turning Off Chat in Gmail - Google
- [Solved] SharePoint Illegal operation attempted on a registry key that has been marked for deletion - SharePoint
- Find Sum of two numbers - C-Program
- Struts 2 Hello World Example in Eclipse - Java