ipython: change syntax highlighting color for matching parenthesis
You can create ipython profile if not exists and override style
check if ipython_config.py
presents under ~/.ipython/profile_default/
if not then you can run this command to create it
ipython profile create
open ipython_config.py
file in any editor of your like and uncomment and update this option
from pygments.token import Token
c.TerminalInteractiveShell.highlighting_style_overrides = {
Token.MatchingBrackets.Other : '#FF00FF', # nested brackets color
Token.MatchingBracket.Other : '#FF00FF', # bracket color
Token.MatchingBracket.Cursor : '#4b3588', # on cursor over bracket color
Token.MatchingBrackets.Cursor : '#4b3588', # on cursor over nested matching brackets color
}
For Build in token check here, for Styling info check here
For how i get to know ipython uses pygments for customization check here
Replace / remove highlighting in Jupyter Notebook with custom theme
The CSS selector for matching brackets is div.CodeMirror span.CodeMirror-matchingbracket
So, you can change the colour of the bracket itself and the background colour of the bracket by putting the following code into your custom.css
file (~/.jupyter/custom/custom.css
)
div.CodeMirror span.CodeMirror-matchingbracket {
color: #INSERT-YOUR-DESIRED-BRACKET-COLOUR-HERE ;
background-color: #INSERT-YOUR-DESIRED-BRACKET-BACKGROUND-COLOUR-HERE ;
}
How to disable auto-quotes and auto-brackets in Jupyter 5.0
It looks like it can be done by running in a notebook:
from notebook.services.config import ConfigManager
c = ConfigManager()
c.update('notebook', {"CodeCell": {"cm_config": {"autoCloseBrackets": False}}})
This creates a file ~/.jupyter/nbconfig/notebook.json
with the content:
{
"CodeCell": {
"cm_config": {
"autoCloseBrackets": false
}
}
}
After executing the Python command, or manually creating the file, restart your Jupyter notebook, and it should stop auto-closing quotes and brackets.
Turned off JupyterLab's auto encapsulation
The changelog of JupyterLab for 3.1 version, specifically the user-facing changes section, describes that:
The closing bracket is no longer automatically added by default; the old behaviour can be re-enabled from the menu bar (
Settings
->Auto Close Brackets
) or from theAdvanced Settings Editor
.
This is the seventh option in default JupyterLab 3.1 installations, and second from the bottom on the picture above. For more discussion and to provide constructive feedback please go to jupyterlab issue #5741.
How to set the default background/text color scheme in QtConsole for iPython?
This is a bug in 0.12, and has been fixed in master. So the only way to get what you want is to update to master, or wait for 0.13 (soonish).
How do I set custom CSS for my IPython/IHaskell/Jupyter Notebook?
I think the path to your custom.css
should be:
~/.ipython/profile_default/static/custom/custom.css
custom
folder instead of css
folder.
Related Topics
Center Wrapped Items in a Space-Between Flexbox
How to Change Font-Size of a Tag Using Inline CSS
Mvc Bundling and Relative CSS Image When Website Is Deployed to an Application
Why Does Firefox Treat Helvetica Differently from Chrome
Center Text Larger Than Container? (Without Using Separate Child Element)
Angularjs: with Ng-Animate & Ng-View, How to Make a 3D Cube Rotation Effect
Efficient and Inefficient CSS Selectors (According to Google, Pagespeed ...)
Em Vs Px and Cross Browser Compatibility
How to Use CSS3: :Selection Without Changing The Default Color and Background Color
Position Relative, Float Takes Div Out of The Normal Flow
CSS - Smooth Button Gradient Color Transition on Hover
How to Avoid Line Breaks After ":Before" in CSS
Max-Width:-Webkit-Fit-Content Ie 8 Equivalent
Styling Links Inside a Div with a Specific Class
Using CSS Mix-Blend-Mode with a Child of a Position Fixed Element
Twitter Bootstrap Thumbnail Caption to The Right
How to Select CSS Id's with Numbers in Them
CSS Problem - Link (Position:Absolute) Above a Box Not Work in Ie + Opera