I am using OSX El Capitan and Atom 1.2.4. And I also have installed "tabs-to-spaces" package.
I am trying to setup the editor to indent and make the tab be 2 spaces. But I am not able to make this work, here is my setup
Thank you
This is funny. I also like using 2 spaces and was struggling with the described behaviour. When I put the following lines into config:
".python.source":
editor:
tabLength: 2
(Main Menu -> Atom -> Config...)
Atom starts using 2 spaces in my python code. But if try to change settings in language-python package, those lines simply disappear and 4 spaces indentation is back. Thankfully all other settings seem to not reset this, so if you don't mess with language-python settings page, everything should be fine.
I answer my own question because could be useful for someone else.
Atom and the plugin are working, and are indenting 2 spaces.
But as I was writing Python code, the suggestion PEP8 is 4 spaces. Seems Atom is forcing 4 spaces.
Related
I have a python tensorflow script that used 2 space indent. My Atom preferences have tab set to default: 2. When I hit enter after a : Atom does a 4 space auto-indent, inconsistent with the rest of the file and with the preferences.
In fact, a fresh install comes with the default set like this:
However, if I open a new file and hit the TAB button it tabs 4 spaces. This is bizarre!
I have just started using Atom, so maybe overlooking something obvious, but this is a frustrating problem.
IT turns out there are language-specific preferences that override the general editor preferences. These are accessed via Edit > Preferences > Packages > language-python > Settings which is where the tab length was set to 4.
I find it tedious to manage very large style sheets in Sublime Text 3.
Some of my stylesheets are about 2000 lines of code. I am trying to figure out how to navigate more easily within the stylesheet. I already know about bookmarks and the brilliant search function, but another way would be to hide/fold all code and show comments only. Tis way it would be easier to find the correct place you want to go to.
So is there a way to hide all code below a comment? This would be something as the opposite of Fold Comments
I know Hugo proposed the classic "fold all" solution here. But I would like to hide absolutely all code and display comments only.
For example:
/*******************************************************************
Description 1
*******************************************************************/
Hide/fold all code between here...
...
...
..
.
.
/*******************************************************************
Description 2
*******************************************************************/
You can fold everything, which is not a comment by opening the console ctrl+` and write view.fold(view.find_by_selector("-comment")).
This searches all regions with the selector - comment, which means everything except comments. Afterwards these regions are folded.
If you want to create a keybinding for it, just create a plugin. Open Tools >>> Developer >>> New Plugin and paste:
import sublime_plugin
class FoldEverythingExceptCommentsCommand(sublime_plugin.TextCommand):
def run(self, edit):
regions = self.view.find_by_selector("-comment")
self.view.fold(regions)
Afterwards add this to your Key Bindings - User to add a keybinding for the command:
{
"keys": ["ctrl+alt+shift+f"],
"command": "fold_everything_except_comments"
},
You can use the arrows in the far left of the text editor. Sublime has the line number listed down the left and beside those numbers are tiny arrows.
With the basic Sublime Text 2 build, I am getting CSS value autocompletion only when I type the first letter of the value, as seen in the image below.
However, I've been watching the Tuts HTML+CSS web tutorials (here is an example video), and his Sublime Text build shows all possible CSS for a given attribute. Below is a screenshot from the linked example video.
My question is what setting or package allows for the display of all possible CSS values for a given attribute?
No additional packages or specific settings were needed to solve this issue. The Ctrl/Cmd+Space keyboard shortcut natively displays all possible completions.
Try different plugins through Package Control.
Specifically trying these may work for you:
CSS Completions
Emmet CSS Snippets
CSS Extended Completions (requires ctrl/cmd + space)
There is no package needed in Sublime Text 2 to display all possible completions, e.g. all possible values for a CSS property, but LaceLafontaine's answer is no longer current. Cmd+Space doesn't work on Macs, partially because it's a shortcut for a spotlight search.
Currently the shortcut to display the completions in OSX is Ctrl+Space. I believe it's the same for both Mac and PC. The issue was discussed here: https://github.com/processing/processing/issues/2699
Linux Users
For me it worked when I config using this:
"auto_complete_triggers":
[
{
"characters": ": ",
"selector": "source.css",
},
],
And then you use Space as trigger.
There is an additional space before every value, but Minify or HTML-CSS-JS Prettify will delete all these spaces
Is it possible to increase the space between lines in Aptana Studio 3? If so, how can it be done?
Yeah Andrew is right. It is not possible yet using Aptana Preferences.
I use a manual trick, though it is not something technical.
I do it on my Aptana Studio 3.5.0 installed on Linux Ubuntu 12.04. Not sure it will trick on other OS.
I just copy any UTF-8 hindi test, just paste it on the top of my PHP file.
This code is not some technical thing it is just for an example. It has nothing to do with coding or Aptana preferences.
Example :
<?php // हिन्दी ?>
If I just paste it for a while and then remove it, it will keep the increased line height until I close the file.
No, it seems that it's not possible yet.
Css code folding doesn't seem to be there any more Aptana Studio 3, build: 3.0.2.201106082310.
I have checked the preferences under 'Aptana', 'Editors', 'CSS' and 'Enable Folding' has a tick in it.
Folding works fine for JS but seems to have dissappeared under CSS, intellisense still works fine.
I used to get a little '-' or a '+' symbol in the left column alongside the line number.
Anybody else found this problem, its a great tool and would like to be able to use it again.
It's definitely still available, as I can see it in 3.0.2 or 3.0.3.
It might be that your code has a parse error or some similar problem that's causing the ticks not to show, though that would be odd if it happens to all files.
If it is a single file, I would file a bug here. Otherwise, you might check Help > Studio > View Log File to see if there are any error messages, or try updating to the latest beta version, 3.0.3 (docs on the wiki)