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.
- How to check if Java main thread is alive - Java
- Possible outages message Google Webmaster tool - Google
- Sublime Text 3 spell check shortcut - Sublime
- [Error] zsh: command not found: mvn - HowTos
- How to Gzip a file directory on Mac OS X using Terminal Command - Mac-OS-X
- How to un-hide tab bar in notepad++ - NotepadPlusPlus
- Failed to load the JNI shared library jvm.dll - Eclipse
- Hotstar Disney+ mobile app test push notification - News
- Display bookmarks bar Safari - HowTos
- SharePoint Server 2016 installation System Hardware requirements - SharePoint
- How to check your IP using bash for Windows? - Bash
- Eclipse Error The JVM Shared Library JavaVirtualMachines does not contain the JNI_CreateJavaVM symbol - Eclipse
- Changing Android Intent Tittle using java code - Android
- How to send SMS on Android Emulator - Android
- How to check if a port is in use using terminal [Linux or macOS] - MacOS
- Install Native Java JDK JRE on Apple Silicon M1 Mac - MacOS
- Create SharePoint Site Collection using PowerShell New-SPSite - SharePoint