Cloud9, open file from tree on single click? - c9.io

My question is pretty basic but I can't find anything on the user preferences (file or from the UI) inside the editor, or on the web about it.
I simply want the files to be opened when I click on them, not double click, but single click.
How can I do that?

Enable the "Enable Preview On Tree Selection" option under:
Cloud9->Preferences->User Settings->Tree & Navigate

Related

How do I change the Color Scheme used by the ExportHtml package in Sublime Text 3?

I want to use the Notepad++ Color Scheme (https://packagecontrol.io/packages/Notepad%2B%2B%20Color%20Scheme) for printing in Sublime Text 3.
I've installed 2 printing (HTML export) packages to attempt this:
Print to HTML
ExportHtml
Print to HTML puts a nice menu option in Sublime's "File" menu, but I don't see any options for changing the print/export color scheme. Therefore, I'm trying to use ExportHtml, which does have color scheme options.
However, I can't figure out how to use them.
I used Ctrl+Shift+P then search for Package Control: Install Package to install ExportHtml.
To see the export menu for ExportHtml go to Ctrl+Shift+P then Export to HTML: Show Export Menu. This shows all of the export options for printing. Choose one and it will open your code up, syntax-highlighted and all, in a browser, for instance, for nice printing.
To make my changes, I want to add a menu entry to the settings to give me a "Browser Print - Color (Notepad++ colors)" option.
To access the settings, I went to Preferences --> Package Settings --> ExportHtml --> Settings. Documentation on the color_scheme can be found here: http://facelessuser.github.io/ExportHtml/usage/.
I then added the following to my user settings in an attempt to add a menu entry to the "html_panel" in the main settings:
{
// Define configurations for the drop down export menu
"html_panel": [
// Browser print color (selections and multi-selections allowed)
{
"Browser Print - Color (Notepad++ colors)": {
"numbers": true,
"wrap": 900,
"browser_print": true,
"multi_select": true,
"color_scheme": "Packages/ExportHtml/ColorSchemes/Print-Color.tmTheme",
"style_gutter": false,
"diable_nbsp": true
}
}
],
}
FIRST PROBLEM: This causes my one menu entry to replace the others when I want it to be added to them. When I go to Ctrl+Shift+P then Export to HTML: Show Export Menu I don't see my menu option added to the others, I see it replacing them. Is there a way to fix this without having to copy all menu entries, or do I just need to copy them?
SECOND PROBLEM: I installed the Notepad++ Color Scheme via the Ctrl+Shift+P Package Control: Install Package tool too, and it works fine, but I don't know how to link it to the "color_scheme" parameter in the configuration settings just above. I've searched all around the folders in my Linux home directory and don't know where this package is installed or what to put in the code above to make it use this color scheme.
How do I fix the above 2 problems?
For this particular package, the only way for you to (safely) add an item to the html_panel setting is to copy the whole of that setting from the default file into your own version, and then make the change there. There's no shortcut around that, unfortunately.
Sublime handles many of its resource files (including sublime-settings files) by allowing multiple packages to have files with the same name which contribute to the settings, and then merging them together in a specific order, where the User package (where your Sublime customizations are stored) is always last.
That means that if your User version of the file is empty, the settings all come from the package version, and settings that you add to your User settings override the ones in the packaged version.
Thus if you add the setting html_panel to your custom file, you're overriding the default version, so without copying the entire setting to your user file, the command will only show you the one you added.
For the second part of your question, the line that you want to modify in the entry to add that color scheme is this:
"color_scheme": "Packages/Notepad++ Color Scheme/Default Stylers.tmTheme",
Recent versions of Sublime have an item in the Preferences menu named Color Scheme... that shows you a list of color schemes and lets you select one.
If you're not familiar with the general process of figuring out the full name of a color scheme, the easiest way to find out would be:
Use Preferences > Color Scheme... and select the color scheme that you want to use
Use Preferences > Settings to open your user settings; the value of the color_scheme setting in your user settings tells you how to set the color scheme up
Use Preferences > Color Scheme... to reset back to the color scheme you want to use in general
As far as package locations, there are three places where packages can be installed.
First, if you select Preferences > Browse Packages... you will be taken to your Packages folder. This folder contains all of the packages that are installed as "loose" files (that will become clear in a moment). Most packages that Package Control installs aren't installed this way, so you will probably see many packages missing.
On Linux, the location of this folder is ~/.config/sublime-text-3/Packages.
Secondly, from the folder above if you navigate one folder level up in your file browser, you will see a folder named Installed Packages. If you look inside there, you will see a set of files of type sublime-package, which is really just a zip file with a different name. Each file is named for the package that it represents and contains the contents of the package.
On Linux, the location of this folder is ~/.config/sublime-text-3/Installed\ Packages.
Thirdly, if you look inside of the folder that Sublime is installed in, you will see a folder named Packages, and inside of that folder is another set of sublime-package files. These are the packages that ship with Sublime to provide default functionality. They're shared by everyone on the same computer, so you shouldn't mess with this folder at all unless you're fully aware of all of the ramifications (and really not even then).
The location of this folder depends on where you installed Sublime. If you're not sure where that is, you can open the Sublime console with View > Show Console and then enter the following text and press enter:
sublime.executable_path()

Visual Studio Code closes my file when I search for new ones

I'm using Visual Studio Code for working and I use ctrl-P command to search for files in my directory.
The problem appears when I want to search for another file, it opens it in the place of the first searched file, closing it.
Is any setting for avoiding this pain?
By default, VSCode opens files in preview mode. This is indicated by their name being italic in the menu bar. As John noted, you can double click on the file to fully open it.
To disable this behavior, try setting:
"workbench.editor.enablePreview": false
When you select a file from search result -> you will see the file open with file name italicized. This means that the file is open in preview mode. Now any other file you choose to select will replace its content in this tab.
To make this tab stick among the open tabs you can:
double click to select the file
or
double click on already selected file in search pane -> you will see the name of file is not italicized anymore(meaning the file is now pinned as a tab)
Alternatively,
You can use the below setting to have all selected files open as a separate tab:
"workbench.editor.enablePreview": false
This setting is found here : Files -> Preferences-> Settings
But the downside of using this is that all files you click on will remain opened and you would then need to clean tabs after your search.
Ctrl+P -- For targetting a file
Alt+Enter -- For Opening that file into next tab
Double click on the files instead of a single click. That worked for me.

Link the open file to file system tree in c9 IDE

In C9 IDE, when I open a file, is it possible to expand the file system tree to that file.
I need something similar to "Link with Editor" button of Eclipse.
Yes, use Cmd-Shift-L on a mac (I think it's Ctrl-Shift-L on win/linux). There's also a setting to do this automatically as a tab becomes active. You can also right click on a tab and choose "reveal in file tree"

Sublime Text 2 - Open folders

Is it possible to open multiple folders in the same window using Sublime Text 2?
Selecting File->Open Folder always opens the folder in a new window.
Sublime Text is an excellent editor, but this issue is a bit annoying.
You can use the Add folder to Project... item on the Project menu to open a folder in the current Sublime Text 2 window.
With Sublime Text 2, a project is always open, even if it is anonymous and unsaved.
In Sublime text 3, you can just drag and drop folders, it will open multiple folders. However i have not tried it in Sublime text 2.
Update:
Drag and drop works in Sublime text 2 as well.
From what I can tell, this behavior is built in. In Packages/Default/Main.sublime-menu, the listing for Open Folder… is
{ "command": "prompt_open_folder", "caption": "Open Folder…", "platform": "!OSX" }
Unfortunately, after searching all through the installation, there's no macro or .py file with the prompt_open_folder command, so it must be a hard-coded part of the binary, which makes sense, because it's a system call to the operating system/window manager to open a file picker dialog.
It should be relatively straightforward to write a plugin to select a folder for inclusion in the current window, but unfortunately I'm not quite able to at the moment.
For macOS users, use the command 'open' like so:
usr#mac ~ $ open -a "Sublime-text" "./Desktop/GitHub/uoe"
This will open all the folders in the 'uoe' directory in sublime provided you are at the root directory. For windows/Linux try finding something similar to 'open' :)

How to open a c project in source insight?

Someone recommends me to use SI to read the c source of PHP ,a great open source project.
I've already downloaded the source.
But I don't know how to import it,can anyone help?
Open the Project menu and create a new project (or push Alt+Shift+N). In the upcoming dialog window, enter PHP as the project's name and select a folder to store the project data. Click OK to configure the project, e.g. activate storing function-local symbols in the project DB etc. Click OK again.
The next dialog lets you actually import files to the project. Select your source folder and click "Add Tree" to add the whole directory structure to the project. Click Close. You can now start browsing the source code.
Make sure you configure SourceInsight so that it knows where your local library folders are, i.e. the C headers & runtime. This is usually done when installing SourceInsight.

Resources