Error while creating a new file in "Brackets" code editor - adobe-brackets

I have tried to create a new file in Brackets code editor. It shows up an error message as below.
"Error Creating File: An error occurred when trying to create the file. The target directory cannot be modified.

I had the same problem and I figured it out.
Instead of going File->New you have to right click on the folder section in brackets and then select new File which will create a new file in your current folder as well as in the Working Files section.
See image below of where to right click (right click in the red circle):
I added the file Bootstrap.html to the folder 'Full Stack Dev'

Related

I cannot set/change my working directory directly in my R code. Instead, I have to manually set it in the file browser tab

For some reason, I am unable to set or change my working directory in my R-code itself. I'll include a line such as:
setwd("~/Documents/BeaverProject/HOBOData/Beav")
But it will be followed with an error:
Error in setwd("~/Documents/BeaverProject/HOBOData/Beav") :
cannot change working directory
However, if I go to the file browser tab in the bottom right corner, and click "(gear icon) More", it provides an option to "Set as Working Directory" which I can use to change the working directory to the desired file folder.
While this works, it means that I can't just sit back and allow my code sequence to run because I have to manually change the working directory at every point in the code where it needs to.
Any suggestions?

How to add the presenter mode to ioslides

I know the documentation says to add ?presentme=true to the URL. I am trying to knit to a local HTML file and I can not add a ? when renaming the knited file.
Is it something to add to the yaml?
You do not rename your file or add something to the YAML. After knit, you may click on "Open in Browser" and just add ?presentme=true after ".html" in the address bar.
Just to give you an example. In my case, this is at the address bar after opening the .html file generated:
file:///Documents/ioslides-present.html#1
To start presenter mode, this is the new location:
file:///Documents/ioslides-present.html?presentme=true

How can you delete a scrip from an R,project

I have a project with multiple scripts I know how to clear the console and how to use rm to remove the variables I create. I have tried using the x on the upper right of the scrip.R tabs I want to delete and then saving the project after deletion. When I re-open the project those scripts I deleted are back on again.
thanks for any help. tried the RStudio help and R documentation as well as the search here
If by scripts you mean files in your RStudio project directory, you can delete them on the file tab of the bottom right pane. Select the file and click the delete button.
The x on the upper right just closes the editing session for that file.
If by scripts you mean R functions, they can be deleted like any other variable.
rm(functionName)
or
rm(list=ls(all=TRUE))
You can delete a script by clicking the white box next to it in the project environment and then clicking the delete button in that same environment.
You can also delete by going into file explorer where your project is located on your machine and delete just like any other file.

How to change working directory via extension in Adobe brackets

Given a file or path - I can use FileUtils (or similar) to work with files. I'd like to be able to alter the current working directory in my extension.
I see in node.js there is process.chdir(directory) but I am unable to access that object.
Is there any other way to change the current working directory.
I am trying to create a simple plugin that when you open the file dialog, the directory your file listing is the same as the currently opened file. The simple implementation being:
MainViewManager.on("currentFileChange", function (e, newFile) {
process.chdir(newFile.parentPath); // This is my FAIL
});
Brackets, like many GUI apps, doesn't use the current working directory very much once it's up and running. So there is probably a different way to accomplish what you're looking for.
When you say...
when you open the file dialog, the directory your file listing is the same as the currently opened file.
...do you mean you want the file tree on the left side of the window to change? If so, try the ProjectManager.openProject() API.
...or do you mean you want to open a file-picker dialog box (like what you see when you choose File > Open in the menu)? If so, you can use FileSystem.showOpenDialog() - the 4th argument is the directory to show when the dialog is first opened.

Sublime Text 3 side bar is not updating or refreshing

For some reason the side bar on Sublime Text 3 is just displaying the folder named Template. The strange thing is that this folder is already deleted and regardless of that, the folder Template should not be displayed when I open Sublime in for example my Dropbox folder. No matter where in Ubuntu I open Sublime (from command line or Dash) it will open with that folder named Template in the sidebar. Template will have the arrow next to it indicating I can expand its contents or hide them. When I press it I see the arrow go from the right to to down position no folder contents show, nothing happens.
Also nothing happens when I go Project > Refresh Folders.
This problem happened around the time I was trying to add a new server using SFTP. Not certain if that had anything to do with it.
Any ideas whats happening here?
If it is a top level folder, you need to edit the project itself. You may right click on the folder in the side bar, and select "Remove from Project". Alternatively, you can edit the file itself by going to Project -> Edit Project. The top level folders are defined as a list of objects. Remove the entry you want from there, and it will no longer appear in the sidebar. You can write a plugin to clean up a project for you if you find yourself removing items frequently.

Resources