I have a problem with Aptana file/editor associations. I have installed PDT into Aptana. In a directory I have three (and more) PHP files. When I open the first Aptana opens the "PHP Editor", when I open the second I get an Error ("Unsupported content type editor") and with the third Aptana opens the "PHP Source Editor". All have the same extension (.php). I want Aptana to open all PHP files with "PHP Editor". When I explicitly open the files that throw the error with "PHP Editor" I get the same error.
I have activated the PHP perspecive. Content Types > Text > PHP Content Type has *.php (locked), Content Types > Text > PHP Source has *.php (locked), too. In the file associations I have both editors (and two text editors) listed for *.php and "PHP Editor" is the default editor.
The project is a (local) GIT repository. In another project (also a GIT repository) it seams to work (all *.php files are opened in the "PHP Editor").
Can somebody explain me that "magic" and give me a tip how to solve my problem. I don't want to switch to another IDE or something like that…
EDIT
Here is how the different files behave:
Open With… Open With… Open With…
file double click PHP Editor PHP Source Editor Default Editor
-------- -------------------- ------------- -------------------- --------------
a.php Error Error PHP Source Editor Error
b.php PHP Editor PHP Editor PHP Source Editor PHP Editor
c.php PHP Source Editor PHP Editor PHP Source Editor PHP Editor
Like described by Sarah Kemp in her answer the different behavior of b.php and c.php is correct. But why can I not open file a.php with the PHP Editor?
EDIT 2
When I look at the file properties, b.php and c.php have the type "File (PHP Content Type)" and a.php has "File (PHP Source)".
You can set file associations on a per file basis too, it looks like maybe that is your problem since your other repo is working correctly?
Right click on your file in the Project Explorer (this is where I tested) and choose 'Open With...' and select the editor you prefer from the sub menu. Once you have selected an editor in this list, Aptana will remember your preference for that file and use it when you double click in future - even if all other file of that type open with something else.
Hope this works for you.
Related
By mistake, I have changed the output directory in turbo c++. I have tried to set but i don't remember exact path. Can anyone help me to set the path of that directory ?
go to Options -> Directories
You'll get 4 text fields.
Include Libraries
Library Libraries
Output Libraries
Source Libraries
See if any path is present in the "Include library" field by default. If there is any content, copy the same to the other three fields as well.
If there isn't any content in any of the fields, type the root directory, usually "C:" or "D:" or the directory in which you've installed Turbo C, followed by the installation folder. Usually, its "tc".
After copying the content to the other text fields, press OK.
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 have a project that explicitly needs PHP 5.4.x compatibility, so I right click on my project and go to Properties. Then I click the "PHP Development" menu on the left, and select "PHP 5.4.x" from the dropdown. It works fine until I restart Aptana--then it goes back to "PHP 5.3.x" which I guess is the default. Is this a bug in Aptana? How do I get the version to stick even when I restart?
The only temporary solution I found (in Aptana build 3.6.0.201407100658) is setting the PHP 5.4.x version from Project->Properties from the opened file. You just can't close Aptana or the file but can come handy when working on few important files.
update: You can add project_path/.settings/com.aptana.editor.php.prefs file that reads:
eclipse.preferences.version=1
phpVersion=php5.4
In my case, this helped.
It seems this is a serious bug in Aptana. Just like our friend Viktor Sulak said: edit the file .settings/com.aptana.editor.php.prefs,
But, if your workpsace does not have this file "com.aptana.editor.php.prefs", simply create it with the content:
eclipse.preferences.version = 1
phpversion = php5.4
and everything gonna be all right!
Symptom:
When I start a new post on my Wordpress (example: http://website.com/wp-admin/post-new.php), I have the following problems:
The tinyMCE editing toolbar is missing, and
Text does not appear when typed in the body of the new post
Attempts:
Following Wordpress' guidelines, I tried the following without success:
Deactivate all plugins -- still no edit toolbar.
Use other browsers -- same error in Chrome, Firefox, and IE on multiple machines.
Enable SCRIPT_DEBUG in wp-config.php -- same error.
Viewing browser errors in Chrome -- see below.
I opened Developer Tools ("F12") in Chrome on the new post page and found the following 3 errors:
Failed to load resource: the server responded with a status of 404 (Not Found) -- [wordpress-website]/wp-includes/js/tinymce/tiny_mce.js?ver=349-20805
Uncaught ReferenceError: tinyMCE is not defined -- wp-langs-en.js:1
Uncaught ReferenceError: tinyMCE is not defined -- post-new.php:760
Question:
What must I do to get the edit toolbar back?
404 errors are an indication files may be missing. Have you verified the files haven't accidentally been moved or deleted?
You can replace the contents of the wp-includes/ directory where TinyMCE is located. You can either do this via the admin area updater, or you can do it manually.
Automatic way
Log into your WordPress admin area
Navigate to Home > Updates
Click the Re-install Now button
Manual way
Download a copy of the version of WordPress you are currently
running (if you are not running the current version you can find a copy in the release archive)
FTP into your site
Make a backup of your wp-content/ directory
Delete the wp-includes/ directory from the server
Upload the entire wp-includes/ directory from the new copy of WordPress you downloaded
You should now have a completely replaced wp-content/ directory and all of the TinyMCE files will be on your server.
I've found a few related posts but none match my specific problem and I think i've tried everything.
This is the error I get:
[Errno 2] No such file or directory
[cmd: [u'sass', u'--update', u'/Users/ryanwaters/Code/raw_portfolio/public/css/stylesheet.css.scss:/Users/ryanwaters/Code/raw_portfolio/public/css/stylesheet.css.css', u'--stop-on-error', u'--style', u'compressed']]
[dir: /Users/ryanwaters/Code/raw_portfolio/public/css]
[path: /usr/local/bin/sass]
[Finished]
When I put which sass in command line I get /Users/ryanwaters/.rvm/gems/ruby-1.9.3-p429/bin/sass
I've changed the pass several times and still can't figure out what the problem is
This seems pretty simple, but my problem was that I upgraded my mac's OS to Yosemite. I must've done something wrong, because my sass installation didn't carry over.
So, Sublime was throwing this error because it couldn't find sass. I reinstalled it, and everything worked as before.
This question is nearly an exact duplicate of SASS won't build in Sublime Text 2 [Errno 2] No such File or Directory from several days ago. If you look at my answer there, you'll see that you need to change the path to sass. You can either edit your SASS.sublime-build file and change the "cmd": line to point to /Users/ryanwaters/.rvm/gems/ruby-1.9.3-p429/bin/sass, or you can make a symlink to it in one of Sublime's default search directories, like /usr/local/bin or /usr/bin.
I had to manually specify the "path" and "gemPath" settings in the User Settings file for SassBeautify (e.g. "/Users/username/Library/Application Support/Sublime Text 2/Packages/User/SassBeautify.sublime-settings"). .
Here are the exact steps I followed to resolve the issue:
(derived from the documentation in the package repository).
Open up a terminal
Run: echo $PATH
Copy the entire output of that command
Open the SassBeautify settings file ("Preferences" -> "Package Settings" -> "SassBeautify" -> "Settings – User")
Paste the previously copied output wrapped in quotes into the 'path' setting (or add a "path" setting if it doesn't already exist)
Go back to your terminal and run: echo $GEM_PATH
Copy the entire output of that command
Go Back to the settings file
Paste the previously copied output wrapped in quotes into the 'gemPath' setting (or add a "gemPath" setting if it doesn't already exist)
Save the settings file and restart Sublime Text
Here's a screenshot of my SassBeautify settings file for reference: