Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow us to change the font type and size of find-replace widget #101064

Open
leo-carmo opened this issue Jun 25, 2020 · 14 comments
Open

Allow us to change the font type and size of find-replace widget #101064

leo-carmo opened this issue Jun 25, 2020 · 14 comments
Assignees
Labels
editor-find Editor find operations feature-request Request for new features or functionality
Milestone

Comments

@leo-carmo
Copy link

Hi, and please! It's unreadable for my limited eyes:
image

I know we are now able to resize the widget horizontally (like pointed out at issues #2657, #20447 and #2220), but that doesn't change the legibility of the inserted characters.

Look how easier it is on Sublime Text to read:
image

There should be a pair of settings like "editor.FindReplaceWidgetFontFace": "Consolas", and "editor.FindReplaceWidgetFontSize": "16", (the names are just examples).

@rebornix rebornix added feature-request Request for new features or functionality editor-find Editor find operations labels Jun 25, 2020
@Lucasmateuseng
Copy link

Corcordo com o recurso acima, as letras maiores ajudaria bastante da ux da interface

@ssbarnea
Copy link

ssbarnea commented Aug 8, 2020

That is clearly a very important accessibility aspect even for English users, as long texts do not fit.

@ArturoDent
Copy link

@ssbarnea You can drag the left edge of the find widget to expand it. But it desperately needs a larger font size/letter spacing if you are working with regex's in particular.

@Plrrb
Copy link

Plrrb commented Oct 4, 2020

And I think it needs Syntax Highlighting for Regex (Regular Expressions)

@sweettyler
Copy link

agree that find/replace box should use monospace font only!

@leo-carmo
Copy link
Author

So, any updates or workarounds? :(

@agftrading
Copy link

agftrading commented Apr 12, 2022

@ssbarnea You can drag the left edge of the find widget to expand it. But it desperately needs a larger font size/letter spacing if you are working with regex's in particular.

Dragging the left edge to resize does not seem to be possible in my VS Code, is there a setting that I need to change or is this perhaps an insiders edition (that am not using yet) feature. Thanks for any replies.

@mike-clark-8192
Copy link

mike-clark-8192 commented Jan 30, 2024

Here's a workaround until there's a setting for it. Use the Command Palette (Ctrl/⌘+Shift+P). Choose Developer: Toggle Developer Tools. In the JavaScript console, run something like this:

[...$$(".find-widget textarea")].forEach(x => {const s=x.style; s.fontFamily='monospace'; s.fontSize='15pt';});

NB: Never paste or run any JavaScript in the developer console that you don't understand what it does.

If you want to make it semi-permanent, you could try: be5invis.vscode-custom-css. This extension is not super user-friendly, but it does work, and if properly setup, would make the setting "stick" until the next VSCode update was applied.

@leo-carmo
Copy link
Author

Here's a workaround until there's a setting for it. Use the Command Palette (Ctrl/⌘+Shift+P). Choose 'Developer: Open Webview Developer Tools'. In the JavaScript console, run something like this:

[...$$(".find-widget textarea")].forEach(x => {const s=x.style; s.fontFamily='monospace'; s.fontSize='15pt';});

NB: Never paste or run any JavaScript in the developer console that you don't understand what it does. If you want to make it semi-permanent, you could try: be5invis.vscode-custom-css

I tried, but then I came across this which indicates the Webview Developer Tools are...deprecated? I found that after my editor didn't open any new window after trying Developer: Open Webview Developer Tools in the command palette. But I could open the window under the command Developer: Toggle Developer Tools, and switched to the console tab and inserted your code. Didn't work.
What am I missing?

@starball5
Copy link

Related on Stack Overflow: How do I increase the font size in VS Code find widget?

@antonioscript
Copy link

I'm really looking forward to this feature. It's been getting in my way for a while, and accessibility like this would help a lot.

@mike-clark-8192
Copy link

mike-clark-8192 commented Sep 8, 2024

I tried, but then I came across this which indicates the Webview Developer Tools are...deprecated? I found that after my editor didn't open any new window after trying Developer: Open Webview Developer Tools in the command palette. But I could open the window under the command Developer: Toggle Developer Tools, and switched to the console tab and inserted your code. Didn't work. What am I missing?

You're right, the Open Webview Developer Tools item in the command-palette no longer seems to work. However, the Developer: Toggle Developer Tools command palette does work for this workaround. The snippet of JavaScript code I provided does work for me, and has for many months across multiple updates. If you are not seeing a change in the font face and font size, we might be talking about a different Find Box. The Find Box that my JS snippet modifies is the (Ctrl+F) "inline" one that overlays your active editor, not the Ctrl+Shift+F (global find across files) box. If you are find box that my snippet tweaks, maybe do a test by increasing the font size in the JS snippet to make the size change dramatically obvious (the font size of 15 in my JS Snippet is not dramatically larger than the default font, just a little larger.) If it's still not working, perhaps attempt my workaround using a one-off "portable" installation of VSCode (Google for instructions.) A one-off portable configuration of VSCode is an easy way to get an "OEM" or "Stock" installation of VSCode side-by-side with your daily driver VSCode installation, as the two will not share any configuration settings. The reason I suggest this is that it's possible some extensions or themes you have installed into your regular VSCode are interfering with the workaround.

@leo-carmo
Copy link
Author

That worked, mike-clark-8192! I used the Developer: Toggle Developer Tools instead of the Open Webview Developer Tools command. Awesome for readability!

@leo-carmo
Copy link
Author

@mike-clark-8192 Turns out that js in the console works, but is not permanent. How to make the change persistent?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor-find Editor find operations feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

12 participants