Sublime text opens, wants to reload old files because they have changed, I reload a few and then it crashes.
Is there a way to start Sublime Text afresh, letting it forget the last files that it had open?
In Sublime Text 3 set hot_exit to false in "Preferences -> Settings-User"
"hot_exit": false
remember_open_files doesn't exist in Sublime Text 3 settings anymore.
Go to Sublime Text
Choose
Preferences >> Settings-User
Add the code below to the current settings. (Remember to add a comma at the end of the first line if it doesn’t) and save it.
{
"remember_open_files": false,
"hot_exit": false,
}
Related
I'm very confuse about left window in my screen shot when i try to open setting.json file.
do someone know what is this window are and how to hidden them.
It's the arguments for the flake8 linter, look at like 23 and line 24.
You can try something like
"python.linting.flake8Args": [
"--max-line-length=120"
]
The Answer is this left window is call "default setting" from vscode
can the way to close them is add this setting into setting.json file
or remove it from setting.json file (default is should be false already)
"workbench.settings.useSplitJSON": false,
but for some reason it set to True in my setting.
I am not completely sure if this not a plugin, but after starting a line comment in .js file, for example, when I hit enter the next line starts with "//" as well. This is kind of annoying. Is there a simple way to remove this?
In "Preferences -> Package Settings -> Doc Blockr -> Settings Default" you can find lines:
// If true, then pressing enter while in a double-slash comment (like this one)
// will automatically add two slashes to the next line as well
"jsdocs_extend_double_slash": true,
If you want to disable this behavior go to "Preferences -> Package Settings -> Doc Blockr -> Settings Default" and add
{
"jsdocs_extend_double_slash": false
}
This is indeed caused by the package DocBlockr.
When using this package, you can hit shift + enter to prevent the // from appearing on your new line.
is it possible to hide all the files with certain extension from the sidebar (lateral nav bar) in Sublime Text Editor 3?
Are you talking about the sidebar? For example, if you select File → Open and select a folder, then the folder and its contents are displayed along the left side, allowing you to navigate amongst its contents and sub-directories. If that is the case, then the answer is yes, files can be excluded.
Select Preferences → Settings – Default to open a tab called Preferences.sublime-settings – Default. This file is read-only, so you'll also need to open Preferences → Settings – User. The first time you open your user preferences it will be blank. It (and all Sublime config files) are in the JSON format, so you'll need opening and closing curly braces at the beginning and end of the file, respectively:
{
}
Activate the default preferences tab and search for file_exclude_patterns (which is on line 377 in ST3 build 3083) and also folder_exclude_patterns if desired. Copy its contents to your user preferences file, like so:
{
"file_exclude_patterns": ["*.pyc", "*.pyo", "*.exe", "*.dll", "*.obj","*.o", "*.a", "*.lib", "*.so", "*.dylib", "*.ncb", "*.sdf", "*.suo", "*.pdb", "*.idb", ".DS_Store", "*.class", "*.psd", "*.db", "*.sublime-workspace"]
}
and feel free to add your own customizations. Please note that there is no comma (,) after the closing square bracket, as in this example this is the only customized preference. If you have multiple ones (changing fonts, window options, themes, or whatever) you'll need a comma after each item except the last one (trailing commas are illegal JSON):
{
"translate_tabs_to_spaces": true,
"trim_trailing_white_space_on_save": true,
"word_wrap": true,
"wrap_width": 0
}
You can also set them up per project and ignore folders, in your .sublime-project file, e.g.:
{
"folders": [{
"path": ".",
"folder_exclude_patterns": [".svn", "._d", ".metadata", ".settings"],
"file_exclude_patterns": ["*.pyc", "*.pyo", ".project"]
}]
}
How does one enforce a newline at end of file in RubyMine (v 4.5.3, on Mac OS)?
e.g., similar to Sublime Text 2
Enable Ensure blank line before end of file on Save option in the Editor settings:
In RubyMine 6 or above (on Mac OSX):
Enable 'Ensure line feed at file end on Save' option in the Editor settings.
RubyMine 2021.2
"Ensure every saved file ends with a line break"
RubyMine alongside many other editors supports the EditorConfig standard for basic configuration.
You can enforce newlines at the end of every file by placing a file named .editorconfig at the root of your project:
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
It's possible to disable the setting for specific file types or filenames.
In RubyMine 2016.2.1 you have to go to Preferences > Editor > General > Other > Ensure line fedd at file end on Save.
Screenshot of the Preferences in RubyMine 2016.2.1
Is there a way to set a default document type when saving a NEW FILE?
I created several new files and I want to have a default value of .txt when saving a NEW FILE.
Create a new plugin Tools > Developer > New Plugin...
Paste this in:
import sublime, sublime_plugin
class EverythingIsPowerShell(sublime_plugin.EventListener):
def on_new(self, view):
view.set_syntax_file('Packages/PowerShell/Support/PowershellSyntax.tmLanguage')
Save and call it NewTabSyntax.py. New tabs will now default to Powershell.
You can change the syntax to whatever you prefer. To find out the "path" of a particular syntax, simply open a file of that syntax, open the console (View > Show Console) and type:
view.settings().get('syntax')
This plugin does it:
https://github.com/spadgos/sublime-DefaultFileType
seems pretty great.
Edit:
Ok, two things, there currently seems to be a small bug so the text file syntax is not being correctly picked up due to the whitespace in the filename. In addition you need to set the "use_current_file_syntax" to false, (otherwise the new file will default to whatever filetype you have open already when you hit Ctrl-N)... So the fix/workaround is this:
Put the following code in: Packages/User/default_file_type.sublime-settings
{ "default_new_file_syntax": "Packages/Text/Plain_text.tmLanguage",
"use_current_file_syntax": false }
NOTE THE UNDERSCORE.
Next, find the "Plain text.tmLanguage" file and copy and rename it (in the same folder) as "Plain_text.tmLanguage". [be sure to copy/duplicate it, do not just rename it, as it may have dependancies]
Restart, just to be sure, and this should do the trick.
Also note this plugin only works for new files created with Ctrl-N.
Working after these steps:
1.Uninstalled
2.Installed using Package Control
3.Test using default install (type Jave) <-- worked
4.Copy and Renamed file Sublime Text 2\Packages\Text\Plain text.tmLanguage > Sublime Text 2\Packages\Text\Plain_text.tmLanguage
5.Changed file Sublime Text 2\Packages\Default File Type\default_file_type.sublime-settings >
`{ "default_new_file_syntax": "Packages/Text/Plain_text.tmLanguage", "use_current_file_syntax": true }`
-- All working.
I did not need to copy any files into the 'Packages/User' folder
#fraxel _ Thanks for all the help and quick response.