SublimeText3 - Find all files without a string? - sublimetext3

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!

Related

How to search a string in files partially matching "name"

I'm looking for a class which is defined in a Koin module file somewhere in my project. The filenames of all those Koin modules are "*Module.kt".
I could do cmd+shift+F to search for "TheClass" everywhere, but that gives me too many results and I don't want to go through all of them manually. I'd like to only search in files with the above mentioned filename pattern.
Another thing I could do is to use alt+F7 or cmd+B on the TheClass itself to see its usages, but again that leads to too many results.
Is there a way (using Android Studio) to search smarter for this?
I found out that when using "Find in Path" with cmd+shift+F you can put more in the file mask than just "*.kt". I've changed the file mask to "*Module.kt" and got the desired result.

IntelliJ File mask not working on simple excluding file pattern! Why?

Follows this page https://www.jetbrains.com/help/pycharm/2016.1/find-and-replace-in-path.html?origin=old_help#mask , it should be able to exclude many files using "!" symbol in front of the regular pattern like: *.java, when doing text search inside IntelliJ projects.
On my project, when I fired Ctrl + Shift + F to do text search for string xyz. There's over 100+ results return in both *.ftl and *.java files. I tried to reduce the results on only ftl files by changing the "File mask(s)"-Option to "!*.java" . But it did not work! The result list is empty!
Googling on the excluding file pattern results in creating custom file filters for each particular search, which I don't want to maintain!
Do I miss something here or IntelliJ is just bad on this function (I'm using IntelliJ 15)? With Eclipse, the "File mask" was amazing!
You have to use
!*.java instead of !.java
As for IDEA 2019.1 Ultimate, it works for me(exclude with !*.yml or anything else).
If it does not in yours, as you only as .ftl file to exclude, why not add mask as *.java?
PS: what does not work is exclude some path, like "all files under out/ folder". With !out/* or anything ales it does not work.
Forget about File Mask and use Scope:
In Scope the options are unlimited where you can select folder include/exclude files or folders.
Excluding file paths in the Find in Path dialogue was not added until IntelliJ 2016.1 per this IntelliJ forum response.

VIM Convert Text to URL with Search/Replace

I have a document that contains long filenames, followed by a hyphen, followed by a description of the contents of the file. The files are all PDFs. I am converting this document into a page on our website, so that it has the filename, which should be a link to the file, followed by the description of the file contents.
I'm fairly versed in the basics of VIM, but advanced search/replace is something I'm lacking in. What I'd like to do is convert each filename into a link to that filename. For example:
WebAdapt_Prod_Int_10.1_Install.IIS7.2008R2.pdf - Step by step instructions for installing ArcSDE 10.1 for Oracle on the ‘Test’ environment, including configuration notes.
Should convert to:
WebAdapt_Prod_Int_10.1_Install.IIS7.2008R2.pdf - Step by step instructions for installing ArcSDE 10.1 for Oracle on the ‘Test’ environment, including configuration notes.
There are roughly 30 of these documents, so going line-by-line would be time consuming (though by the time I get a response I'll probably already have done it). I'd just like to know how to do this for the next time I'm given a big text file that needs formatting.
Thanks in advance!
Try this:
:%s!\v^\S+\.pdf!&!
Please note that the above doesn't try to do anything with HTML entities though. See the Vim Tips wiki for a possible solution if that's a concern.
Edit: The way this works:
:% - filter the entire file
s!...!...! - substitute
\v - set "very magic" syntax for regexps
^\S+\.pdf - match one or more non-spaces at the begging of line, followed by .pdf
& - replace with the link: & is the matched string (that is, the filename).

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

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.

SublimeText 2 - find all occurences and save in file

I need to find all occurences of expression in all project files and saved into a separate file. (I need complete list of occurences).
It's possible? (If not, please advice made unpaid simple similar editor with this functionality).
Thanks
You can accomplish this by using Find In Files. Then paste the output in a separate file and save.

Resources