Search for quotation marks doesn't work in Sublime - search

How do I search for quotation marks in sublime?
I need to replace "file.jsp"/> with "file.jsp"> in more than 100 files
Is this possible to do in sublime using replace tool ?
I already tried backslash and it doesn't work. Any other solutions please?

Make sure that the option whole word (Alt + W) in the replace toolbar is turned OFF

Related

Highlight matches 'quotes' and "double quotes"

How can I highlight matches for single quotes ('quotes') and double quotes ("double quotes")?
I read the docs and I saw there is something for brackets and tags:
"brackets_options":"foreground",
"brackets_foreground":"var(orange)",
"bracket_contents_options":"foreground",
"bracket_contents_foreground":"var(orange)",
"tags_options":"foreground",
"tags_foreground":"var(orange)",
but didn't found any solution for quotes.
Is there any option like "quote_options" or something like that with the same behavior as for brackets and tags?
I know about BracketHighlighter but this plugin is so slow and I generally prefer native options
I am working with:
PHP, HTML, JS
Default Mariana color scheme
Default theme
Sublime Text ver.: 3
There is no option to highlight quotes, but you can select all between the quote tags by using Selection | Expand selection to Scope or shortcut Ctrl + Shift + Space if you are looking for some functionality to "see" everything between the quotes.
Example when you click somewhere in between the quotes and use above mentioned functionality:

I want to Replace a word which contains more no of / using vim

I want to replace this word /BGL/HUG/LIK/ to /TOM/GUY/MAP/ using vim editor I have tried %s/ commands it's not working please give some better solutions.
You can replace the separator / after %s with any character, so you can choose one that is not included in your source text, e.g.
%s,/BGL/HUG/LIK/,/TOM/GUY/MAP/,g
Hope this helps.

How to remove blank line in Sakura editor?

I need to prepare test data having around 10K lines with many blank lines, same has to be removed. Earlier I was using editplus (Text editor) and could able to solve very easily by using Find (Find text: "\n\n" Regular expression) and Replace (empty) option.
Here in this project I am using Sakura editor and tried the below option to remove blank lines but its not working.
Need to remove line 6 and 7.
Find text
\n\n
\r\n\r\n
[\r\n]+[\r\n]
More information about using of regular expression in sakura editor
Click here
PS: I have some restriction in my current project to download and install any other software/tools.
Any help is appreciated.
Finally found solution. Like to share with others.
In sakura editor, we can remove the empty lines by using find and replace option.
Find ^\r\n 【Option:Regular expression】 and replace
Explanation
^ Beginning of the line
\r carriage-return character
\n newline (line feed) character

Sublime Text Editor snippet to remove parentheses

Sublime is able to add parentheses, brackets (curly and square), apostrophes, and quotes to highlighted text by default. I've tried but can't seem to find a way to have it remove those as well. What I'd like to be able to do is highlight some text that is surrounded by parentheses and have it remove those. Is there a good way to do that using snippets?
I suspect it can be done with use of allFollowingCharacter and allPrecedingCharacter but it seems those might be from a previous version of Sublime when those were in XML instead of the current JSON...?
Any help would be appreciated!
With surround you can do this. Install it via Package Control. (Package Control Installation)
Open the command palette:
CTRLSHIFTP on Linux and Windows,
CMDSHIFTP on Mac.
Search for Surround: delete surround and type in ( and Enter and you are done!
I'm surprised this question isn't searched more regularly!
BracketHighlighter is an excellent utility that includes convenient deleting of parenthesis. To cut to the chase, install BracketHighlighter and set bh_remove_brackets to whatever shortcut you'd like to be able to delete parentheses. Search up bh_remove_brackets in the example sublime keymap to see an example!

How to use backspace escape sequence in Notepad++?

I need to use find new lines (\n) in a .txt file and replace them with a backspace (\b). Using this in the Find and Replace feature of Notepad++ successfully finds the new lines, (\n), but replaces them with the characters "\b" instead of applying a backspace. How can this be done correctly?
\r\n should work.
replace them with empty field and you will get your backspace(\b) equivalent
A simple way would be Ctrl + J or Edit->Line Operations->Join Lines
I was also trying to replace \n with backspace, but the above solutions seems neat. Maybe it helps someone.
(I tried the \r\n solution and it seems both works the same way :) )
In notepad++,
Go to Edit menu, line operations and then click on "Remove Empty Lines"
You get what you are trying with regular expression.
Removing empty lines
Use regular expressions, in Find what:, enter \r\n and in Replace with: leave that blank.

Resources