When I disable the prettier-atom package, the tab size is 4, but when I enable the prettier package, formatting a file causes the tab size to decrease to 2. My prettier version is 0.56.4; I was able to directly modify the tab size of prettier in my prettier package settings on a previous version, but now the option is gone. I've looked at other questions about tab size, but haven't found where to directly edit the prettier default tab size.
Any help or direction is appreciated. :)
Unfortunately, the tab length in the latest prettier-atom package is 2 and there is no way to change it.
The atom-beautify package https://atom.io/packages/atom-beautify uses the standard Tab Length from your Atom settings.
Related
Sometimes it is convenient to deal with jupyter notebooks from the VS Code editor (faster load, less latency and easier debugging).
Nonetheless, there is a problem that default theme colors are not contrast enough to distinguish between input and output cells.
I'm having a hard time to figure out which setting I should change, to, let us say, make the output cell background just "dark-grey" (I'm using default VS 2019 Dark theme but other options are also not contrast with .ipynb files).
Any help will be welcome.
(I've also come across other similar questions but did not find the turn key solution.)
Example:
In the settings.json -- can be found at File(Windows)/Code(Mac)>Preferences>Settings -- click on any link stated "Edit in settings.json"
Adding this into the json will work -- notebook's setting has to be put under the workbench.colorCustomizations.
"workbench.colorCustomizations": {
"notebook.outputContainerBackgroundColor": "#FFFFFF",
},
I'm not sure if this helps you, but you can try overriding VSCode's theme by adding this to your settings.json file:
{
"jupyter.ignoreVscodeTheme": true
}
If you prefer to use VSCode's gui to edit settings, you can go to your Jupyter extension (assuming you have it installed) => Extension settings => and check "Ignore Vscode Theme".
You need to restart or reload VSCode for this to take effect.
Using Eclipse 2020-09 (i.e. v. 4.17) IDE for Java (on Linux, openSUSE Tumbleweed), with version 3.0.38 of Mylyn WikiText plugin installed, I had the following difficulty: Although pretty much all editor/ui fonts were fine, the HTML preview of WikiText files (in particular README.md!) displayed in unreadably small fonts (my display has a very small pixel pitch). So I wanted to find a way to set the CSS of such preview pages. The Mylyn WikiText docs (at https://help.eclipse.org/2020-09/index.jsp?topic=%2Forg.eclipse.mylyn.wikitext.help.ui%2Fhelp%2FMylyn+WikiText+User+Guide.html, under the heading "Rendering Appearance") says that there should be a Preferences screen General > Editors > Text Editor > WikiText > Appearance that allows one to set this CSS. However, no such screen shows up in my installation.
The only method I was able to find for fixing this was to use an application (such as Engrampa) which is able to edit the contents of .jar files, and in my eclipse installation directory, use it on plugins/org.eclipse.mylyn.wikitext.ui_3.0.[SPECIFIC_VERSION_HERE].jar to edit the internal component org/eclipse/mylyn/internal/wikitext/ui/viewer/default.css -- I could change any css there, and upon restarting Eclipse, the changes would take effect.
However, clearly any changes I make this way will be blown away upon the next update of Eclipse or of Mylyn Wikitext. Does anyone know of a better way to set the size of the preview text? Was that Appearance pane mentioned in the docs removed? If so, what replaced it? If not, any ideas why I might not be seeing it?
I'm working with R, in RStudio, and I use to specify the package of each function in my scripts, even if the package is already loaded in the environment. I want to be sure that the code will use the filter() function from dplyr, and not from another package which has a similar named function.
For instance :
Question/ to make code easier to read, is there a way to play with global appearance colors, and that package names (all names before ::) are in a different color (light grey for instance) ?
Here is a complete answer, I guess will work.
Since a recent version of rstudio, you can add custom themes on rstudio (see this update blog)
From this point you can create custom themes, but it require you to know the "code" for each part of your script. After opening the inspector, I've foudn that the dplyr word before the :: is named as support. See the color used in the theme Cobalt here (custom theme editor).
Finally, once you created your own theme by modification of a previous one (creating from scratch is always a pain), you import it in rstudio (see in the first link) and apply it.
At this point you won't see any change, because you also need to check Global options > Code > Diplay > highlight R function call. This will highlight the word classified as support and as support.function. You can set both colors in the theme editor (Cobalt theme has the first one in light green and the second one in light orange).
I've not done the full process myself but I think it could work.
You can modify themes at this website: https://tmtheme-editor.herokuapp.com/#!/editor/local/Monokai
If you go to Customize Preview Code at the bottom right, you can test out the code in your image above.
If you change the color for variable, it seems like this makes the change you're looking for.
When you've customized everything to your liking, you can download your custom theme. Then you can go back to Rstudio --> Tools --> Global Options --> Appearance, and click 'Add' to add your theme.
I am trying to alter an RStudio Editor Themes so that I can set my own colors. I'm using RStudio version 0.99.473 on Windows 10.
I've reviewed Any way to change colors in Rstudio to something other than default options? which was extremely helpful as well as Editing R Studio them in cashe.css theme file (ACE editor?)
I am trying to identify what the different .ace_ items in the RStudio Editor Theme CSS files (ACE editor code) correspond to. The CSS files are found in /www/rstudio/ within RStudio's install path. An example of the script is found on GitHub for the Tomorrow theme.
In particular, I'm looking to see how to color variables (that I define) differently from functions. For example in x <- rnorm(10,0,10), I'd like x and rnorm to be colored differently. Not sure if that's possible.
For what it's worth, the newest versions of RStudio come with a preference that allow you to ensure that function calls are colored differently from variables -- from RStudio v1.0.44, we have the option
Highlight R function calls
With this option active, function calls will be highlighted differently (for example, with Tomorrow Night Bright):
Hopefully, user-customizable themes will become part of the next RStudio release.
RStudio has a tutorial. Although not specific to your question about coloring variables, I did edit the highlighting of matched brackets in my theme so that they are more visible. Here's how:
Select a theme from this theme editor and save it to your machine as a .tmTheme file. Add the theme in RStudio. RStudio automatically creates an .rstheme file from that. I found the rstheme file in my Users/Eric/Documents/.R/rstudio/themes folder (Windows machine). Open the file in Notepad++ (or your favorite text editor) and find the .ace entry that matches the one you want to change (for me, specifically, .ace_bracket from the RStudio tutorial I mentioned earlier). This will have an rgba value similar to: background-color: rgba(238, 252, 81, 0.8); Note that the last value is the alpha (transparency) value and should be between 0 and 1. The values I used give me a nice bright yellow that is easily seen.
I think you are looking for customising the RStudio theme and I think in that case
You can check out the following link:
This website gives you several options to customize
https://tmtheme-editor.herokuapp.com/#!/editor/theme/Azure
This is how it works
Once you are done customizing download them.
Later you can add the theme in the "add" options while setting a theme in your RStudio
Hope this was helpful
Happy Coding :)
I found (2022) the theme files in
C:\Users\<my user>\AppData\Roaming\RStudio\themes
Is it possible to change the default zoom level when using knitRBootstrap?
I know in my knitRbootstrap settings I can change the thumbnail size, but that doesn't allow a lot of flexibility as there is a max value:
knit_bootstrap_md(input=inputFile, output=outputFile, boot_style = 'cerulean',
code_style="Google Code",
chooser=NULL, thumbsize = 9, show_code=FALSE)
I like the features of knitRbootsrap and prefer it over conventional knitR, but not sure the easiest way to customize image size to allow for certain plots/charts to appear larger
The current github version of knitrBootstrap has a chunk option for the image thumbnail size with bootstrap.thumbnail.size. They correspond to the bootstrap grid options, the default is col-md-6.
The new version is not yet available on CRAN, but you can install it easily with devtools.
install.packages('devtools')
library(devtools)
install_github('jimhester/knitrBootstrap')
Please see the knitrBootstrap github page for full details on all the options and using the new version.