Sublime search "Find in Files" doesn't always work - search

The EXACT same thing if i do it in .html , xml files e.t.c it works as it should. That is it reutrns a filled find results tab. In this file it doesn't
I have a simple .log text file
When i search with ctrl+f everything is ok:
when i use ctrl+shift+f i have 0 results. Why?

Scanning through the text of these log files, do you see any control characters? According to this answer to your question in the Sublime Text forum, when Sublime Text finds inline control characters, Find in Files will treat the whole file as binary and therefore not display detailed results.
TL;DR: Try deleting control characters.

Related

pycharm jetbrains to search for text NOT in test*.py filename pattern

In Pycharm, when search for files that contain a given text e.g. hitting Ctrl-Shift-F, we have the File mask box as in below snapshot to filter file name pattern.
I want a NOT filter here e.g. search for files not starting with test*.py. How can we archive this?
Note
Although this question is old, I'll leave the answer here just in case someone else reaches the question.
Solution
The way to exclude results in File mask is by adding a ! before the mask, for example: !*test*.py
However, this might generate an unwanted situation, because it can bring results from configuration files, or temporary files, or any file we don't want. For this, the solution is to have multiple masks at once, and this can be achieved by separating masks with , (comma).
Example
If we want all files containing the word def in .py files, excluding files containing the word tests for any type of file, and models ending in .py, we would use the File mask: !*test*, !*models*.py, *.py
Hope this helps!

Can sublime 3.0 convert display from plain text to source color scheme automatically?

I'm little new to Sublime, wanted to know if there is a way to change display in sublime-3.0 from plain text to source colors automatically (i.e. Sublime should keep source colring from where code was copied and pasted like- HTML or XML or Java code) without I changing it manually.
Thanks in Advance!
Sublime Text already does this for some languages, like XML.
It works when you have a blank document that is set to Plain Text format (i.e. you open a new tab), and paste something in whose first line can be identified to be a specific language, using regular expressions.
For XML, it looks for an XML prolog or an XML element with a namespace. Regex
For HTML, it looks for a HTML doctype.
It currently doesn't support Java - I guess it's not easy to come up with a regex that would match only the first line of a Java file and not a C# file, for example. If you do have some ideas, you can use https://packagecontrol.io/packages/PackageResourceViewer to edit the relevant .sublime-syntax (YAML) file and add a first_line_match in.
You may also find the following packages helpful:
https://packagecontrol.io/packages/AutoSetSyntax
https://packagecontrol.io/packages/ApplySyntax
Extra note: these "first line matches" also apply when opening files that aren't automatically matched to a syntax by the file's name/extension.
There might be a better way, but I've done it with the Package control ctrl+shift+p (Win, Linux) or cmd+shift+p (OS X). Search for Package Control: install Package, press Enter and then search whatever package you need.
After installing the SCSS package, I'd get the HTML colouring as well.

Inkscape doesn't allow to edit svg text lines once it has been saved as plain svg or treated with scour

I was for several days trying to find a solution to the following problem :
Create a svg with text (simply click with the text tool to add text, do not drag to open a frame)
Type enter to create a multiline text, add several lines of text
Save as plain svg or optimized svg
Or treat with scour in command-line
Reopen with Inkscape : you cannot edit the text, it shows it properly but when you go to the next line (with the mouse or keyboard arrow down) the cursor stays on the first line.
This is an annoying bug running for some time in Inkscape and doesn't help with web edition.
But there are solutions... See the following thread to manually (in vim) replace all tspans :
Vim search replace regex + incremental function
And see my answer below to correct the svg code in order to get your Inkscape files back in working order !!!
SVG files do not currently support multi-line text. Inkscape uses custom XML attributes to keep track of which spans of text are part of that block of text.
When you save as Optimized SVG, Inkscape strips out all its custom XML attributes and writes a vanilla SVG file. So the sense of what is a block of text is gone.
Sed is very useful in order to correct your files in a batch:
cd /home/user/my/svg/files
sed -i.bak 's|<svg|<svg\nxmlns:xlink="http://www.w3.org/1999/xlink"\nxmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"|g' *.svg
This runs on all svg files in the current folder and :
Creates a .bak file which you can rename to svg in order to get your original files (but I nevertheless strongly advocate to duplicate your working folder in order to avoid terrible mistakes when fiddling with sed)
Adds the correct namespaces with newlines (\n)
Then:
sed -i.2.bak 's|<tspan|<tspan sodipodi:role="line" |g' *.svg
This appends sodipodi:role="line" to all tspan tags in the current folder and creates file.2.bak backups.

SublimeText3 - Find all files without a string?

I've looked around quite a bit for an answer to this, but I cannot seem to find what I need. Is it possible with SublimeText3 > Find in Files to do a search for all files that DO NOT include a string?
I've tried toggling the Regular Expressions button beside "Find:" and entering a value, but I'm not a regex pro, so I may be doing it wrong?
For example, I want to find all files in a designated folder that DO NOT have the following string:
social-links
Any help would be greatly appreciated.
Search for all files in your directory in question (for anything, like a space or the letter e...assuming every file has a space or letter e!), and copy all those file-paths to a new file.
Search for all files with the word, and paste that path-list into a second file.
Sort both files, then compare them to see which lines--which paths--are missing from the has-the-word file. Those are the ones you want.
As far as a single find-in-files search, I don't see how you would do that in Sublime or any other basic text editor. Here is some more information:
https://unix.stackexchange.com/questions/26836/how-can-i-find-all-files-that-do-not-contain-a-text-string
Find files that does not contain a string
How to find all files that do NOT contain specific string in windows environment Visual Studio or any other IDE?
Good luck!

Fuzzy file searching by directory?

I'm attempting to use RubyMine, but there's one feature that's consistently killing my productivity. I use this all the time in Sublime.
Say I have a hundred index.html.haml files strewn across my view folder. In Sublime Text 2, I can search for /app/views/orders/index.html.haml by hitting Cmd+t, typing "order index" and hitting enter.
But in RubyMine so far, you can't type order because directories aren't included in the search index. You can type "index.html.haml", but then I see all of the index views, and order is down around #80.
I also really prefer being able to type a portion of a file name, like the first letter of each matching file. Sublime Text 2 and PeepOpen allow you to do this easily; I'd love to have it in RubyMine.
TL:DR; Can you search for files by directories in RubyMine / IntelliJ?
I use the feature "Search in Everywhere" in RubyMine.
Here http://mrhaki.blogspot.ru/2014/02/search-for-anything-with-search.html description.

Resources