Skip to content

Commit

Permalink
Commit new files (2016-07-26) as plain text
Browse files Browse the repository at this point in the history
These files are not much readable. They are only for seeing better text diff.
  • Loading branch information
maliayas committed Jul 26, 2016
1 parent 0884332 commit 64bb333
Show file tree
Hide file tree
Showing 17 changed files with 718 additions and 266 deletions.
398 changes: 206 additions & 192 deletions www.sublimetext.com/docs/3/api_reference.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions www.sublimetext.com/docs/3/auto_complete.html
Expand Up @@ -3,11 +3,11 @@
Auto Complete
Auto complete shows the completion popup as you type, so you can fill in long words by typing only a few characters. It's enabled by default for source code and HTML (but only after entering a < character).
Disabling Auto Complete
Auto complete can be disabled with the auto_complete setting. To disable it, add this line to Preferences/File Settings - User:
Auto complete can be disabled with the auto_complete setting. To disable it, add this line to the right-hand pane of Preferences/Settings:
"auto_complete": false
If auto complete is disabled, the completion popup can be shown manually, or tab can be used to insert the highest ranking completion without showing the popup.
Manually Showing Completions
Pressing Ctrl+Space will show the completion popup if it's not currently showing. If it is showing, it'll select the next item.
Pressing ctrl+space will show the completion popup if it's not currently showing. If it is showing, it'll select the next item.
Commit on Tab
By default, the selected item in the completion popup will be committed when enter is pressed. This can create ambiguity between committing the completion, and inserting a newline. By setting the auto_complete_commit_on_tab setting to true, enter will insert a newline, and tab will commit the current completion. There are other benefits, too: because Sublime Text knows there is no ambiguity, it will show a more curated list of completions, with the one you want more likely to be in first place.
Enabling Commit on Tab is recommended, but it will take a short time to get used to.
2 changes: 1 addition & 1 deletion www.sublimetext.com/docs/3/distraction_free.html
Expand Up @@ -13,5 +13,5 @@
"word_wrap": true,
"scroll_past_end": true
}
You can customize these via editing Packages/User/Distraction Free.sublime-settings, which is accessible via the Preferences/File Settings - More menu.
You can customize these via editing Packages/User/Distraction Free.sublime-settings, which is accessible via the Preferences/Settings – Distraction Free menu item.
It's worth noting the wrap_width setting, above. The value of 80 causes wrapping to happen at 80 characters. You may want to set this to a higher value, or wrap to the window width, by setting it to 0.
4 changes: 2 additions & 2 deletions www.sublimetext.com/docs/3/font.html
@@ -1,8 +1,8 @@


Font Settings
Changing the font can be done via adding these lines to Preferences/Settings - User:
Changing the font can be done via adding these lines to the right-hand pane of Preferences/Settings:
"font_face": "Courier New",
"font_size": 10
and then change as desired. The font will change when you save.
You can see other settings to change by browsing through Preferences/Settings - Default. There are many things that can be customized in Sublime Text.
You can see other settings to change by browsing through the left-hand pane of Preferences/Settings. There are many things that can be customized in Sublime Text.
10 changes: 2 additions & 8 deletions www.sublimetext.com/docs/3/indentation.html
@@ -1,7 +1,7 @@


Indentation Settings
Indentation Settings determine the size of the tab stops, and control whether the tab key should insert tabs or spaces. In addition to the automatic detection, they can be customized globally, per-file type, or per-file.
Indentation settings determine the size of the tab stops, and control whether the tab key should insert tabs or spaces. In addition to the automatic detection, they can be customized globally, per-file type, or per-file.
Settings
tab_size
Integer. The number of spaces a tab is considered equal to
Expand All @@ -19,14 +19,8 @@
Packages/<syntax>/<syntax>.sublime-settings
Packages/User/<syntax>.sublime-settings
In general, you should place your settings in Packages/User/Preferences.sublime-settings. If you want to specify settings for a certain file type, for example, Python, you should place them in Packages/User/Python.sublime-settings.
Example Settings File
Try saving this as Packages/User/Preferences.sublime-settings
{
"tab_size": 4,
"translate_tabs_to_spaces": false
}
Per-syntax Settings
Settings may be specified on a per-syntax basis. You can edit the settings for the current syntax using the Preferences/Settings - More/Syntax Specific - User menu.
Settings may be specified on a per-syntax basis. You can edit the settings for the current syntax using the Preferences/Settings Syntax Specific menu.
Indentation Detection
When a file is loaded, its contents are examined, and the tab_size and translate_tabs_to_spaces settings are set for that file. The status area will report when this happens. While this generally works well, you may want to disable it. You can do that with the detect_indentation setting.
Indentation detection can be run manually via the View/Indentation/Guess Settings From Buffer menu, which runs the detect_indentation command.
Expand Down
11 changes: 7 additions & 4 deletions www.sublimetext.com/docs/3/index.html
@@ -1,8 +1,9 @@

Sublime Text 3 Documentation
Website
Forum
Sublime Text 3 Documentation
General
Sublime Text Unofficial Documentation is an excellent resource, with a huge amount of information on Sublime Text.
The following pages contain the official documentation for Sublime Text 3. The Sublime Text Unofficial Documentation is an excellent supplementary resource, with a huge amount of information not covered in the official documentation.
Usage
Column Selection
Multiple Selection with the Keyboard
Expand All @@ -17,11 +18,13 @@
Indentation
Spell Checking
Packages
Syntax
Miscellaneous
Reverting to a Freshly Installed State
OS X Command Line
API
Package Development
API Reference
Syntax Definitions
Scope Naming
minihtml Reference
Porting Guide
How to Create a Sublime Text Plugin
173 changes: 173 additions & 0 deletions www.sublimetext.com/docs/3/minihtml.html
@@ -0,0 +1,173 @@


minihtml Reference
Sublime Text contains a custom HTML and CSS engine, named
minihtml, for displaying stylized
content in editor panes. HTML content can be displayed in both
popup windows and phantoms.
minihtml provides a limited subset of
HTML and CSS features found in most web browsers. While only
certain CSS and HTML features may be implemented, they are designed
to be standards compliant. Any feature implemented should function
the same way in minihtml as in a
browser.
HTML
The following tags are styled by the default style sheet:
<html>
<head>, <style>
<body>
<h1>,
<h2>,
<h3>,
<h4>,
<h5>,
<h6>
<div>
<p>
<ul>,
<ol>,
<li>
<b>, <strong>
<i>, <em>
<u>
<big>, <small>
<a>
<code>,
<var>,
<tt>
Special behavior is implemented for a few tags:
<a> – a callback can be specified via the
API to handle clicks on anchor tags
<img> – supports PNG, JPG and GIF images
from http://, file://,
res:// and data: URLs
<ul> – bullets are displayed for
<li> tags
Other HTML tags with special behavior are not implemented. This
includes tags such as <input>,
<button>, <table>, etc.
Best Practices
To allow color scheme authors to tweak the look of popups and
phantoms, it is best to add a unique id=""
attribute to the <body> tag of your plugin's
HTML.
Within the <body> tag, add a
<style> tag containing selectors that do not
use the id. Leave that for selectors in color schemes
to be able to override the plugin.
<body id="my-plugin-feature">
<style>
div.error {
background-color: red;
padding: 5px;
}
</style>
<div class="error"></div>
</body>
CSS
The following list provides an overview of supported properties and
values:
display: inline,
block, list-item,
none
margin: positive
units
margin-top: positive
units
margin-right: positive
units
margin-bottom: positive
units
margin-left: positive
units
position: static,
relative
top: positive and negative
units
right: positive and negative
units
bottom: positive and negative
units
left: positive and negative
units
background-color: colors
font-family:
comma-separated list of font families
font-size: positive
units
font-style: normal,
italic
font-weight: normal,
bold
line-height: positive
units
text-decoration: none,
underline
color: colors
padding: positive
units
padding-top: positive
units
padding-right: positive
units
padding-bottom: positive
units
padding-left: positive
units
border-radius: positive
units
border-top-left-radius: positive
units
border-top-right-radius: positive
units
border-bottom-right-radius: positive
units
border-bottom-left-radius: positive
units
Units
Supported units of measurement include:
rem
em
px
pt
rem units are recommended because they are based on the
user's font_size setting, and they will not cascade.
Colors
Colors may be specified via:
Named colors: white, tan, etc
Shorthand hex: #fff
Shorthand hex with alpha: #fff8
Full hex: #ffffff
Full hex with alpha: #ffffff80
RGB functional notation: rgb(255, 255, 255)
RGBA functional notation: rgba(255, 255, 255, 0.5)
HSL functional notation: hsl(0, 100%, 100%)
HSLA functional notation: hsla(0, 100%, 100%, 0.5)
transparent
Additionally, color values may be blended using the CSS Color Module Level 4 color-mod function with the blend() and blenda() adjusters.
.error {
background-color: color(var(--background) blend(red, 50%));
}
The color-mod function will be most useful in combination with variables.
Variables
CSS variables are also supported using custom properties and the var() functional notation. Custom properties are those starting with --.
html {
--fg: #f00;
}
.error {
background-color: var(--fg);
}
The one limitation is that the var() notation can not be used for part of a multi-number value, such as padding or margin. With those aggregate properties, the var() notation must be used for the complete value.
Predefined Variables
When a color scheme is loaded, the background and foreground colors are set to CSS variables, along with the closest color found to a handful of basic colors. These are all set in an html { } rule set in the default CSS style sheet.
var(--background)
var(--foreground)
var(--redish)
var(--orangish)
var(--yellowish)
var(--greenish)
var(--bluish)
var(--purplish)
var(--pinkish)
The algorithm to pick the colors uses the HSL color space and uses several heuristics to try and pick colors that are suitable for foreground use. In the case that the automatic color selection is undesirable, color scheme authors may override the appropriate values with their own html { } rule set contained in the
popupCss or phantomCss settings.
2 changes: 1 addition & 1 deletion www.sublimetext.com/docs/3/packages.html
@@ -1,7 +1,7 @@


Packages
Packages are a collection of resource files used by Sublime Text: plugins, syntax highlighting definitions, menus, snippets and more. Sublime Text ships with several packages, and more user created ones are available
Packages are a collection of resource files used by Sublime Text: plugins, syntax highlighting definitions, menus, snippets and more. Sublime Text ships with several packages, and more user created ones are available.
Packages are stored in .sublime-package files, which are zip files with a different extension. Packages may also be stored unzipped within a directory, or a mix of the two: any loose files in the package directory will override files stored in the .sublime-package file.
Locations
Zipped packages may be stored in:
Expand Down
28 changes: 14 additions & 14 deletions www.sublimetext.com/docs/3/porting_guide.html
Expand Up @@ -13,25 +13,25 @@
Out of Process Plugins
Plugins are now run in a separate process, plugin_host. From a plugin authors perspective, there should be no observable difference, except that a crash in the plugin host will no longer bring down the main application.
Asynchronous Events
In Sublime Text 2, only the set_timeout method was thread-safe. In Sublime Text 3, every API method is thread-safe. Furthermore, there are now asynchronous event handlers, to make writing non-blocking code easier:
on_modified_async
on_selection_modified_async
on_pre_save_async
on_post_save_async
on_activated_async
on_deactivated_async
on_new_async
on_load_async
on_clone_async
set_timeout_async
In Sublime Text 2, only the set_timeout() method was thread-safe. In Sublime Text 3, every API method is thread-safe. Furthermore, there are now asynchronous event handlers, to make writing non-blocking code easier:
on_modified_async()
on_selection_modified_async()
on_pre_save_async()
on_post_save_async()
on_activated_async()
on_deactivated_async()
on_new_async()
on_load_async()
on_clone_async()
set_timeout_async()
When writing threaded code, keep in mind that the buffer will be changing underneath you as your function runs.
Restricted begin_edit() and end_edit()
begin_end() and end_edit() are no longer directly accessible, except in some special circumstances. The only way to get a valid instance of an Edit object is to place your code in a TextCommand subclass. In general, most code can be refactored by placing the code between begin_edit() and end_edit() in a TextCommand, and then calling run_command on that TextCommand.
begin_end() and end_edit() are no longer directly accessible, except in some special circumstances. The only way to get a valid instance of an Edit object is to place your code in a TextCommand subclass. In general, most code can be refactored by placing the code between begin_edit() and end_edit() in a TextCommand, and then running the command via run_command().
This approach removes the issue of dangling Edit objects, and ensures the repeat command and macros work as they should.
Zipped Packages
Packages in Sublime Text 3 are able to be run from .sublime-package (i.e., renamed .zip files) files directly, in contrast to Sublime Text 2, which unzipped them prior to running.
While in most changes this should lead to no differences, it is important to keep this in mind if you are accessing files in your package.
Importing Modules
Importing other Plugins is simpler and more robust in Sublime Text 3, and can be done with a regular import statement, e.g., import Default.comment will import Packages/Default/Comment.py
Importing other plugins is simpler and more robust in Sublime Text 3, and can be done with a regular import statement, e.g., import Default.comment will import Packages/Default/Comment.py.
Restricted API Usage at Startup
Due to the plugin_host loading asynchronously, it is not possible to use the Sublime Text API at import time. This means that all top-level statements in your module must not call any functions from the sublime module. During startup, the API is in a dormant state, and will silently ignore any requests made.
Due to the plugin_host loading asynchronously, it is not possible to use the API at import time. This means that all top-level statements in your module must not call any functions from the sublime module. During startup, the API is in a dormant state, and will silently ignore any requests made.
10 changes: 5 additions & 5 deletions www.sublimetext.com/docs/3/projects.html
@@ -1,10 +1,10 @@


Projects
Projects in Sublime Text are made up of two files: the sublime-project file, which contains the project definition, and the sublime-workspace file, which contains user specific data, such as the open files and the modifications to each.
As a general rule, the sublime-project file would be checked into version control, while the sublime-workspace file would not.
Projects in Sublime Text are made up of two files: the .sublime-project file, which contains the project definition, and the .sublime-workspace file, which contains user specific data, such as the open files and the modifications to each.
As a general rule, the .sublime-project file would be checked into version control, while the .sublime-workspace file would not.
Project Format
sublime-project files are JSON, and support three top level sections: folders, for the included folders, settings, for file-setting overrides, and build_systems, for project specific build systems. An example:
.sublime-project files are JSON, and support three top level sections: folders, for the included folders, settings, for file-setting overrides, and build_systems, for project specific build systems. An example:
{
"folders":
[
Expand Down Expand Up @@ -35,6 +35,6 @@
Each folder must have a path, and may optionally have settings file_exclude_patterns, file_include_patterns, folder_exclude_patterns, folder_include_patterns and follow_symlinks. The path may be relative to the project directory, or a fully qualified path. Folders may also be given a name setting, to set how they're displayed on the side bar.
Converted projects from earlier versions may have a mount_points entry under folders. If you wish to use the exclude patterns, you'll need to change to the above format.
Settings
Settings may be specified here using the settings key, and will override regular user settings. Note that they will not override syntax specific settings.
Settings may be specified here using the settings key, and will override regular user settings. Note that they will not override syntax-specific settings.
Build Systems
Build Systems specifices an array of inline Build Systems definitions. In addition to the regular build system settings, a name must be specified for each one. Build Systems listed here will be available via the regular Tools/Build Systems menu.
build_systems specifices a list of inline Build Systems definitions. In addition to the regular build system settings, a name must be specified for each one. Build systems listed here will be available via the regular Tools/Build Systems menu.
8 changes: 4 additions & 4 deletions www.sublimetext.com/docs/3/revert.html
Expand Up @@ -7,10 +7,10 @@
Linux: ~/.config/sublime-text-3
To revert to a freshly installed state, you can:
Exit Sublime Text
Delete (or move) the data folder, as listed above
Move the data folder to a backup location
Start Sublime Text
When restarted, a fresh data folder will be created, just as it was the first time you ran Sublime Text. Keep in mind that this will also remove all of your settings and packages.
OS X Lion
In Lion, the ~/Library folder is hidden by default. To navigate there, select the Go/Go to Folder menu item in Finder, and type in ~/Library.
When restarted, a fresh data folder will be created, just as it was the first time you ran Sublime Text. Keep in mind that this will also remove all of your settings and packages. The backup copy of your data folder can be used to retrieve configuration, or custom packages that can not be reinstalled.
OS X
On OS X, the ~/Library folder is hidden by default. To navigate there, select the Go/Go to Folder menu item in Finder, and type in ~/Library.
Windows
In Windows, cache files are stored in a separate location, %LOCALAPPDATA%\Sublime Text 3, to improve performance with roaming profiles.

0 comments on commit 64bb333

Please sign in to comment.