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 your installed version of Git - Git
- How to install Packages in Sublime Text Editor - Sublime-Text
- Transfer files between Android and Mac OS X using usb cable - Mac-OS-X
- Locate MainActivity Java or Kotlin file in Android Studio - Android-Studio
- HTML, HTML5. CSS, CSS3 Color Codes 2020 - Html
- How to run a Maven jar project from eclipse without tomcat - Eclipse
- Docker Desktop needs privileged access macOS - MacOS
- 10 Beginners Commands for macOS Terminal Usage - MacOS