GithubHelp home page GithubHelp logo

mahmoudfawzykhalil / obsidian-global-search-and-replace Goto Github PK

View Code? Open in Web Editor NEW
80.0 80.0 3.0 111 KB

A plugin to do a global search and replace in all your Obsidian vault files.

License: GNU Affero General Public License v3.0

JavaScript 4.78% TypeScript 91.00% CSS 4.23%

obsidian-global-search-and-replace's Introduction

Hi ๐Ÿ‘‹, I'm Mahmoud

I'm a Software Engineer from Cairo, Egypt ๐Ÿ

  • ๐Ÿ’ฌ Ask me about Java, Spring Boot, Testing

  • ๐Ÿ“ซ How to reach me [email protected], LinkedIn

  • โšก Fun fact I play guitar ๐ŸŽธ

obsidian-global-search-and-replace's People

Contributors

mahmoudfawzykhalil avatar quanru avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

quanru

obsidian-global-search-and-replace's Issues

Not picking up any files

For some reason I cannot get it to pick up any files. Can't seem to find any additional instructions.

Replace with regex

hi I'm trying to replace an array of numbers:

19:22
19:23
19:24
19:25
19:26

then I searched them using the regex : 19:(22|23|24|25|26)
but I can't add anything around the numbers with regex , I've been trying to put all of them inside a square bracket like : [19:26] using [$&]
please also allow to replace with regex.

figma has have a pretty good example for renaming things with regex.

One click global replacement

Hello, is there a chance to add a global one-click replace all feature? I believe it would be meaningful.Thank you very much.

[FEATURE REQUEST] Select which of the matches to replace

Finally, a Global Search & Replace plug-in. Incredible that it is not part of the Obsidian core features. Anyway, many thanks, a lot of people have been waiting for it. I have been using VS Code for this.

In VSC, the global search produces a list of matches, and allows you to exclude any of those matches. Could you add that too?

[FR] Regex support

Regular expression find-and-replace across vault would be really handy and would alleviate the need to open vault in vscode or similar code editors.

New command for global YAML replacing

Hi, I don't know if this is within the scope of the plugin, but I've always wanted to replace multiple YAML values in all my vault. And this plugin seems to do something similar. I was wondering if another command could be added to target YAML only values. Thank you very much.

Replacement doesn't work for text in kanban boards

Description

When using kanban boards created kanban plugin, the global search and replace modal does search text inside it successfully but it doesn't replace it when you hit enter.

This behaviour was replicated in the sandbox vault with only kanban and global search and replace community plugins installed.

The global search and replace works fine when the kanban board is open and switched to markdown mode.

Debug Info

SYSTEM INFO:
Obsidian version: v1.4.16
Installer version: v1.4.13
Operating system: Windows 10 Pro 10.0.19045
Login status: not logged in
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: off
Plugins installed: 2
Plugins enabled: 2
1: Global Search and Replace v0.3.0
2: Kanban v1.5.3

RECOMMENDATIONS:
Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.

Search for Special Characters (like Tab) doesn't work

I want to replace all tabs (ASCII char 9 / Unicode U+0009) in all files with four empty spaces (" "). When searching for the tab character, the plugin doesn't find any results. When using the built-in Obsidian search, it is able to find and replace it per file. Therefore, there is a bug with special characters (like tabs) that the plugin can't find.

[FR] Don't influence `lastOpenFiles`

Currently, all the files get opened and the content gets replaced in the editor. This means that all these files now count as recent notes, so using the quick switcher becomes less useful (when relying on the recency feature).

One way to solve this would be to replace the content in the files directly without opening them.

Another way would probably be to monkey-patch app.workspace.recentFileTracker.collect to stop it from executing when the plugin's replace modal gets opened. This might be possible with pjeby's monkey-around, I've only ever used it to execute additional code, but by not calling the old method it should work I think (https://github.com/pjeby/monkey-around).
And on modal-close, that monkey-patch would need to be removed again.

What do you think?

[FR] Add `replace in all files` option to modal

I would find an option in the modal to replace in all files without needing to replace in each file individually useful.

I don't know whether opening each file for such an option would be a good idea. It might be better in that case to read and write the files without opening them in the editor.

Replacing text that is a part of an in-line dataview query destroys the page or completely deletes it

Used your plugin to do a replacement on a lot of dataview queries and when there are multiple in a single page something happens causing random text to disappear. In one case, the contents of the whole page was gone.

I don't know if this is due to the refresh the page is trying to do while the plugin attempts a replacement of another portion of the text

Useful plugin, but this has me a bit worried

Regex doesn't match newlines

When text with newlines are copied from Apple Notes, it creates scenarios like this in Obsidian:

Here is some text on one line.
\n
\s\n 
\n
Here is other text

I want to be able to replace \n\s\n\n with \n, but I can't get any matches. I've tried:

  • \n
  • \s
  • \n\s\n\n
  • ^\n$
  • ^\s
  • ^\n$
    and a few other combos, but nothing matches.

[FR] Replace All

As described in the features part of the README.md, a match can be replaced by either clicking on it or pressing enter. It would be great to add a new functionality "Replace All, replacing all findings in all files.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.