How can I create an obisidian css file to make this work for selected text?Hi,…
- User
User: How can I create an obisidian css file to make this work for selected text?Hi, this is doable by changing the color of the variable --text-selection. I have a very dark theme with so I am using rgba(230, 247, 255, 0.2); which looks like this: I always look at the Inspector Pane > Sources > app.css when searching for this stuff. Assistant: To create a custom CSS file for Obsidian that changes the text selection color, you can follow these steps:
-
Create a Custom CSS File:
- Open Obsidian and navigate to your vault.
- Create a new folder named
snippets(if it doesn't already exist) in your vault's root directory. - Inside the
snippetsfolder, create a new file and name it something likecustom-selection.css.
-
Add CSS for Text Selection:
- Open the
custom-selection.cssfile in a text editor and add the following CSS code:
::selection { background-color: rgba(230, 247, 255, 0.2); /* Change this to your desired color */ color: inherit; /* Keeps the text color the same */ } /* For Firefox */ ::-moz-selection { background-color: rgba(230, 247, 255, 0.2); /* Change this to your desired color */ color: inherit; /* Keeps the text color the same */ } - Open the
-
Enable Custom CSS Snippets in Obsidian:
- Go to
Settingsin Obsidian. - Navigate to
Appearance. - Scroll down to the
CSS snippetssection. - You should see your
custom-selection.cssfile listed there. Toggle it on to enable the snippet.
- Go to
-
Test Your Changes:
- Select some text in your notes to see the new selection color in action. It should now reflect the color you specified in your CSS.
-
Adjust as Needed:
- If you want to change the selection color, simply edit the
background-colorvalue in yourcustom-selection.cssfile and save it. The changes should take effect immediately in Obsidian.
- If you want to change the selection color, simply edit the
Additional Tips:
- If you want to customize other aspects of your theme, you can add more CSS rules to the same file.
- Always make sure to back up your CSS files and any customizations you make to avoid losing them during updates or changes to your vault.
By following these steps, you should be able to successfully change the text selection color in Obsidian to fit your dark theme. User: obsidian command to open DeveloperTools panel Assistant: In Obsidian, you can open the Developer Tools panel by using the following command:
-
- Assistant
It looks like you're asking about indenting in Vim. Here's a brief guide on how to handle indentation in Vim:
Basic Indentation Commands in Vim
-
Indent a line or lines:
>>: Indent the current line to the right.<<: Indent the current line to the left.- You can indent multiple lines by specifying a range or using visual mode:
- Example:
5>>will indent 5 lines starting from the current line. - Select lines in visual mode (
Shift + V), then press>or<to indent right or left.
- Example:
-
Auto-indent when inserting text:
-