Due to an high dpi screen, I have to start atom with the following command to avoid blurred fonts:
atom --force-device-scale-factor=1 .
I can add the option to my desktop starters and I can define an alias for the shell. Out of curiosity, I'd like to add this configuration to the atom editor. As a result of some searching, I found the following solution for electron:
app.commandLine.appendSwitch "js-flags", "--harmony_proxies"
It should be in some sort of init script. But where would I add a line like this in the atom editor?
You could add it to
Setting -> Open Config Folder -> config.cson
Related
Where can the indent settings (tab width) be set for uncrustify run by the Atom package atom-beautify (on Windows)?
While the package settings offer to specify a path for an uncrustify config file (separately for C and C++), I can't figure out where the default settings come from.
The package directory is
Windows: C:\Users\<user>\.atom\packages\atom-beautify\src\beautifiers\uncrustify
Uncrustify is run via index.coffee, resulting in arguments like:
C:\uncrustify\uncrustify.exe
-c
C:\Users\<user>\AppData\Local\Temp\.....cfg
-f
C:\Users\<user>\AppData\Local\Temp\input...
-o
C:\Users\<user>\AppData\Local\Temp\output...
-l
CPP
If no path is configured in settings, it generates a temporary config via cfg.coffee. It may just look like
indent_with_tabs = 0
output_tab_size = 2
input_tab_size = 2
This may not be enough for uncrustify to modify the source as intended. I am not sure from where these settings originate (Atom Editor Settings?). So I just modified default.cfg in the package directory (reduce tab width to 4, spaces for tabs -- not sure which parameter did it), added that to the settings, et voila...
go to Atom's top menu bar -> Packages -> Atom Beautify -> Settings and open the C section as in the picture below:
there you must fill the Config Path with yours, mine, because I work on Ubuntu, was:
/home/ungalcrys/.atom/packages/atom-beautify/src/beautifiers/uncrustify/default.cfg
on Windows it migt be:
C:\Users\ungalcrys\.atom\packages\atom-beautify\src\beautifiers\uncrustify\default.cfg
default.cfg file already exists and you may have to comment one or two lines depending on the version of uncrustify.
I have created a build configuration but the "Add Config transforms" option doesn't show up for me. I've tried currently being on that build configuration or not. I've tried to add the file manually, but then it doesn't stack with the original Web.config file.
Install "Configuration Transform" extension. And this option will show up.
Tools -> Extension and updates... -> (select "Online" and type "transform" into search box)
I'm writing a shell script I can run on a new machine to install my apps, set preferences, arrange dock, and add homebrew packages, and I'd like to be able to configure atom packages within the script instead of manually. Is this possible?
Edit: Also I'd like to change the theme from command line, is that possible?
cd ~/.atom
touch init.coffee
echo "atom.config.set('core.themes', ['THEME_HERE', 'SYNTAX_THEME_HERE'])" >> init.coffee
Atom configuration settings are stored as CSON text in config.cson in the .atom directory. So, for example, if you ran
atom.config.set('core.themes', ['THEME_HERE', 'SYNTAX_THEME_HERE'])
from inside Atom, in the config.cson file, you would see:
"*":
core:
themes: [
"THEME_HERE"
"SYNTAX_THEME_HERE"
]
So, you can write directly to this file from your shell script to configure Atom. You can also change config.cson to config.json and use JSON (instead of CSON) to configure the editor, which can make it easier to use things like jq to work with the file.
I frequently dislike how atom by default will open files I was previously working on when I run atom . inside of a project directory. How can I get atom to open with a blank editor with the file tree on the side and that's it?
You can disable this feature by appending restorePreviousWindowsOnStart: false line to your Atom config file which is opened by Edit/Config... menu item.
See here https://github.com/atom/atom/pull/11324 for more details.
Short answer is you cant
Currently the behavior is automatic with no setting. Until that changes, you can open atom via the icon and then open the folder you want from the file menu.
I am following a tutorial for ruby on rails and in the video the guy opens the directory we are currently inside in terminal as a textmate project. I am not sure how to do this.
When you are in a directory in terminal, to open all files in TextMate, use
mate .
If you want to open a single file, use
mate <the file name>
You can use the mate terminal command, see how to use it here:
http://manual.macromates.com/en/using_textmate_from_terminal.html
HTH
If you are using the textmate 2, it comes with this command line utility. What you need to do is turn it on.
Go to "Preferences", and then "Terminal" to turn on.
See http://blog.macromates.com/2011/mate-and-rmate/