How to properly create a new file in Brackets - sass

I know this may sound easy but I can't really get my head around this.
I just begun using Brackets for primarily writing html, scss and css. I tried going to file > new to create a new file and start typing, it did create a new file and by default it was plain text.
When I tried to change the language from the menu at very bottom right hand side of Bracket's window, I found that this option was totally disabled.I tried to save the new file, it saved it but without any file extension at the end. when I tried the saved as it only gave me two options and none of the was the language extension I intend to save my file in(All files, Web files, text files). It just saved like this (Untitled-1) instead of (Untitled-1.scss).
So how to create files like normally I would do in any other IDEs?

Related

Prevent Xcode from opening new files

Is there any way to prevent Xcode from opening brand new files? Let me explain. Everytime I create a new file (Xib, .swift, .storyboard, etc...) Xcode opens that new file automatically in the standard editor. This functionality kinda annoys me because something I just want to create the file and maybe open it on the assistance editor instead or just to work on the file later. I tried changing some of the Xcode's behavior but I don't see any ways where I can trigger an action when certain events occur (like creating a new file).
Well here's one way:
Create a folder full of empty files of various types (with various extensions) that you typically create. Then whenenver you want a new file, rather than telling Xcode to create a new file, use the "Add Files to ..." command and choose one of those files. Just remember to also check the checkbox "Copy items if needed".
Doing this won't open the added file.
As an added benefit, you could also make some versions of these files pre-seeded with code or comments or whatever else that you often keep re-typing into many of your new files.

Why aren't all file templates that are available in the Add New Item dialog available in the New File dialog?

In Visual Studio, if I have a solution open and choose File > New, the New File dialog provides me with a number of templates. However, if I, say, have an ASP.NET MVC project open, right click it and choose Add > New Item, the Add New Item shows way more item templates. For instance, I can add a new JSON file to my project this way, but I can't just create a new JSON file via File > New, because the template isn't available there.
I often want to just create a one-off JSON file to see some proper formatting and coloring, and basically mess around with it, but then discard it without saving it. With Add New Item, it creates a new file and checks my project out from source control, which is too much hassle to correct if you just want to see some JSON code with proper formatting.
I feel your pain! It looks like the only way to achieve the desired behavior is to save a new file with .json extension so VS can figure out the proper editor.

How do I save and load all files in a sublime text session as a 'project'?

I've read that you can save a ' project ' but apparently I'm doing it wrong.
What I've done is...
Create a js, html and css file and use view/layout with 3 columns so
each file has its own section of the layout.
I then went to Project / save project as / and saved the respective file in
a directory
I assumed that all files should be saved in this directory along with a file that I can click that loads them all up to reflect the workflow.
Apparently sublime has a different idea of how this should work and I do not understand it.
Essentially, there are two parts to a Sublime project - a .sublime-project file, and a .sublime-workspace file. Please see both the "unofficial" docs and the official website for information regarding projects, and the setup of .sublime-project files. These files are JSON-formatted and contain paths to any folders contained in your project, project-specific settings, and project-specific build systems. This file can (and should) be edited to customize the project to your needs. Double-clicking this file (after associating its file type with Sublime, following the procedure of your operating system) will open the project, any open files within it, and any folders you've added to it (by selecting Project -> Add Folder to Project).
The .sublime-workspace file is also JSON-formatted, but is saved automatically by Sublime and shouldn't be edited unless you really know what you're doing, and even then you probably shouldn't edit it. It contains all sorts of meta information about the project's history in Sublime, which files were open and in what order/pane, previous contents of searches, find/replace, etc., your file history, settings for various plugins like SublimeCodeIntel, and lots more. By default it is hidden when viewing the contents of folders in the Side Bar, and when double-clicked it will try to open the project instead of opening for viewing/editing, so there are several measures in place to prevent your playing with it and potentially screwing up Sublime.
.sublime-project files can be saved wherever you want, but the folders and files contained within it are not necessarily saved in the same place - they stay wherever they were saved. It usually makes sense to save them in the project's root directory, so if you have a filesystem like myhomedir/projects/web/SweetWebsite/ containing html/, js/, and css/ subdirectories, you might want to save your project as .../SweetWebsite/SweetWebsite.sublime-project, just so you know at a glance what files/folders are probably in it. However, you could save SweetWebsite.sublime-project in myhomedir/Desktop for all Sublime cares, and it would work exactly the same way. While it is possible to have unsaved files in a project, of course it's always best to save your work early and often, so you don't lose anything.
Hopefully this helps, please let me know if you have further questions.

.vbp could not be loaded and NOT in notepad neither

As of yesterday, my vbp file refuses to open '.vbp could not be loaded'. If i try to open the individual forms, some of them work (open in vb6), some of them produce error .log file with two class errors : Class TabDlg.SSTab of control mstTabArticles was not a loaded control class. Line 3672: Class MSComCtl2.DTPicker of control dtpTicketDate was not a loaded control class.
I cannot open the vbp in notepad neither (=empty) and in wordpad i only get small squares...
Any help please?
Your .vbp file is corrupt. You will either need to restore from your backup or source control (you do have both of those don't you?).
Failing that, you will need to recreate the project file from scratch and readd each of the forms. You'll need to figure out what controls and references were loaded though.
As for the errors when loading the form files, this is normal as the controls have not been added to the project.
One other possibility is to open your file with a hex editor. You may be able to rescue a good deal of the text from the corrupt file and copy it to a new one.

Textmate - how do I create a new empty file in the same folder as the current file?

With the Textmate "filesystem explorer tray" open I would like to create an empty file in the same folder as the currently open file. I cannot see a simple way of doing this barring creating a new file and then hunting through the file system in the save dialog.
Is there an easier way?
With the first document open in TextMate, type the following anywhere in that document (although a blank line works best):
mate "$TM_DIRECTORY"/mynewfile.txt
or even
mate "$(dirname "$TM_FILEPATH")"/mynewfile.txt
Then, highlight the text and hit Control-r. If it's on its own line, you don't even need to highlight it. Just be on the same line... Of course, you don't need to type that all the time. This is what we have snippets, commands and macros for!

Resources