Установка и настройка sublime text 3
Содержание:
Settings
By default, Sublime will include ctags files in your project, which causes
them to show up in the file tree and search results. To disable this behaviour
you should add a file_exclude_patterns entry to your
Preferences.sublime-settings or your project file. For example:
"file_exclude_patterns":
In addition to this setting, there’s a CTags.sublime-settings file, which
can be edited like any other .sublime-settings file
-
filters will allow you to set scope specific filters against a field of
the tag. In the excerpt above, imports tags like from a import b are
filtered:'(?P<symbol>+)\t' '(?P<filename>+)\t' '(?P<ex_command>.*?);"\t' '(?P<type>+)' '(?:\t(?P<fields>.*))?'
-
extra_tag_paths is a list of extra places to look for keyed by
-
(selector, platform). Note the platform is tested against
sublime.platform() so any values that function returns are valid. -
extra_tag_files is a list of extra files relative to the original file
-
command is the path to the version of ctags to use, for example:
"command" : "/usr/local/bin/ctags"
or:
"command" : "C:\Users\<username>\Downloads\CTags\ctag.exe"
The rest of the options are fairly self explanatory.
Features
Backup/Restore
This allows you to backup the installed packages list & the user settings for each package. This backup can then be restored to any other device using PackageSync.
- Backup/Restore via a Zip file (Recommended) — Backs up the installed packages list & their settings into a zip file. The zip file is the best portable format for offline syncing.
- Backup/Restore via folder — Works the same way as the zip file, with the only difference that the contents are placed in a folder instead of an archived zip file.
- Backup/Restore only Package List — Backs up only the installed packages list to a file. User settings for packages are ignored in this option.
Do note that this Backup/Restore operation only syncs your packages list and your user settings offline. But the actual installation of missing/new packages requires a working Internet connection.
Also, while restoring from PackageSync backup, please ensure that all files are closed. Files in open state would interrupt the restore operation, resulting in unforeseen errors.
Sync Online
This allows you to sync the packages & user settings in real time across different devices. For this, the installed packages list & user settings are be saved to & synced via a folder monitored by Dropbox, Google Drive or SkyDrive etc.
-
First Machine
Turn on PackageSync’s online syncing module by setting the sync folder via “PackageSync: Sync Online — Define Online Sync Folder” from the command palette or Tools menu. In the ensuing input panel, give the complete path to any directory on your computer inside your Dropbox or Google Drive sync folder. -
Second Machine (or after a fresh installation of Sublime Text)
On your second machine please wait until all the backup files are available and then simply set the sync folder and PackageSync will automatically pull all available files from that folder. The following message dialog should appear which you just have to confirm.
Restart Sublime Text & Package Control will check for missing packages and install them automatically. From now on everything should work very smoothly.
Features
- Trim whitespace at the end of each line.
- Trim whitespace at the start of each line.
- Trim whitespace at the start and end of each line.
- Trim whitespace from selection(s).
- Delete empty, whitespace only lines.
- Collapse multiple consecutive empty lines into one empty line.
- Collapse multiple consecutive spaces into one space.
- Trim empty, whitespace only lines at the beginning and end of file.
- Remove blank space characters.
- Normalize spaces (consecutive spaces reduced, empty lines removed and lines trimmed).
- Tokenize a string by collapsing consecutive spaces, and trimming leading and trailing spaces.
- Delete empty, whitespace only HTML and XML tags.
- Remove code comments and collapse lines.
Settings
PlainTasks is an opinionated plugin, which means that it is highly configured to look in a specific way, but this does not mean that you can not customize it. If you feel that something does not look right and you want to change it, you can easily do it in your user settings file.
Go to and open , there you can override all the default settings, to get an idea you can take a look at .
Here is a list of PlainTasks’ specific settings:
Setting | Default | Options/Description |
---|---|---|
open_tasks_bullet | ||
done_tasks_bullet | ||
cancelled_tasks_bullet | ||
date_format | See strfti.me for quick reference; detailed documentation: , | |
done_tag | true | Determines whether done tasks should gain a tag or not |
done_date | true | Determines whether done tasks should gain a date or not |
before_tasks_bullet_margin | 1 | Determines the number of spaces (default indent) before the task bullet |
project_tag | true | Postfix archived task with project tag, otherwise prefix |
archive_name | Make sure it is the unique project name within your todo files | |
new_on_top | true | How to sort archived tasks (done_tag=true and default date_format are required) |
header_to_task | false | If true, a project title line will be converted to a task on the certain keystroke |
decimal_minutes | false | If true, minutes in lasted/wasted tags will be percent of hour, e.g. 1.50 instead of 1:30 |
tasks_bullet_space | whitespace or tab | String to place after bullet, might be any character(s) |
highlight_past_due | true | If true, highlight past, soon, and invalid |
highlight_due_soon | 24 | Hours as int, threshold to define which will be soon |
scope_past_due | Any scope, define color for past | |
scope_due_soon | Any scope, define color for will be soon | |
scope_misformatted | Any scope, define color for mismatch date_format | |
icon_past_due | Gutter icon¹ | |
icon_due_soon | Gutter icon¹ | |
icon_misformatted | Gutter icon¹ | |
icon_critical | Gutter icon¹ | |
icon_high | Gutter icon¹ | |
icon_low | Gutter icon¹ | |
icon_today | Gutter icon¹ | |
show_remain_due | false | In Sublime 3, show remain or overdue time under due tags |
show_calendar_on_tags | false | In Sublime 3, if true, automatically show date picker when cursor is on tag (you can get date picker any time via context menu) |
due_preview_offset | Place preview date outside of parens of , 1 — within | |
due_remain_format | will be replaced with actual value | |
due_overdue_format | will be replaced with actual value |
¹ Icon value can be , , , , , or custom relative path to existing png file,
e.g. .
Changing color scheme
If you don’t like colors used in bundled schemes just copy any from PlainTasks to
your User directory, change colors and paste the code below in your user settings file:
{ "color_scheme" "Path to your custom color scheme file. e.g. Packages/User/custom_plaintasks.hidden-tmTheme" }
N.B., sometimes you have to restart Sublime Text to apply changes made in tmTheme file.
N.B., , , and settings can assign any scopes defined in tmTheme file, e.g.
you can set and then just add style definition in tmTheme for this scope.
Taskpaper Compatibility
If you need to keep your files compatible with Taskpaper, go to
and open , then
add these settings to the json file:
{ "translate_tabs_to_spaces" false, "date_format" "(%y-%m-%d)", "taskpaper_compatible" true }
Spell check
It is build-in feature of Sublime, you can toggle spell check with F6.
For convinience, you may add bullets in list of ignored words into , e.g.
{ "ignored_words" "☐", "", "✘", "✄" }
Features
- Familiar syntax: as a web-developer, you already know how to use Emmet. Abbreviation syntax is similar to CSS Selectors with shortcuts for id, class, custom attributes, element nesting and so on.
- Dynamic snippets: unlike default editor snippets, Emmet abbreviations are dynamic and parsed as-you-type. No need to predefine them for each project, just type to convert any word into a tag.
- CSS properties shortcuts: Emmet provides special syntax for CSS properties with embedded values. For example, will be exampled to .
- Available for most popular syntaxes: use single abbreviation to produce code for most popular syntaxes like HAML, Pug, JSX, SCSS, SASS etc.
Using
SublimeSBT is mostly used through the Command Palette. To open the pallete,
press (Windows, Linux) or (OS X). The SublimeSBT
commands are all prefixed with . The commands only show up in the command
palette if SublimeSBT detects that your project is an SBT project.
Start SBT
Start an SBT session for the current project. If the project looks like a
Play Framework project, the play command is used instead of the sbt
command.
Stop SBT
Stop the currently running SBT session.
Kill SBT
Force the currently running SBT session to stop.
Show SBT Output
Show the SBT output panel if it’s not already showing. This also focuses
the output panel and puts the cursor at the end.
Compile, Test, Run, Package, Start Console
Run the compile, test, run, package, or console SBT command. If
SBT is currently running the command is run in interactive mode, otherwise
it’s run in batch mode.
Start Continuous Compiling, Start Continuous Testing
Run ~ compile or ~ test. If SBT is currently running the command is run
in interactive mode, otherwise it’s run in batch mode.
Test-Only, Test-Quick
Run the test-only or test-quick command, prompting for an argument. If
SBT is currently running the command is run in interactive mode, otherwise
it’s run in batch mode.
Start Continuous Test-Only, Start Continuous Test-Quick
Run ~ test-only or ~ test-quick, prompting for an argument. If SBT is
currently running the command is run in interactive mode, otherwise it’s
run in batch mode.
Reload
Run the reload command if SBT is currently running.
Show Error List
Show a quick panel with any compile errors or test failures. Selecting an
error opens the file at the line with the error and shows the error text in
the error output panel.
Show Next Error
Jump to the next error in the error list. Opens the file at the line with
the error and shows the error text in the error output panel.
Show Error Output
Show the error output panel if it’s not already showing.
Clear Errors
Clear any compile errors or test failures and remove any highlighting
thereof.
Show History
Show a quick panel with the history of submitted commands. Selecting a
command submits it again.
Show History and Edit
As for Show History but also provides an opportunity to edit the selected
command before it is re-submitted.
Clear History
Clear the command history.
Decide how to Host
You‘ll need to pick one of the following two hosting options:
-
Use a public GitHub or BitBucket repository. Only include one
package per repository and be sure the root of the package is the root
of the repository. -
Host .sublime-package files and a packages.json on
a web server with SSL. For each release you’ll need to create and upload
a new package file and update the packages.json information.
Hosting of the files must be done on a secure server to help ensure the
security of users’ machines. Unsecure URLs could lead to malicious code
being loaded and run.
This is rarely used – see
example-repository.json
for documentation.
No matter how your package is hosted, Package Control will check it
for updates approximately once per hour. The Last Seen date on
the package detail page of this site will show the last time (UTC) when
the package information was refreshed.
License
“None are so hopelessly enslaved as those who falsely believe they are free.” Johann Wolfgang von Goethe
Copyright 2014 Tito Bouzout tito.bouzout@gmail.com
This license apply to all the files inside this program unless noted different for some files or portions of code inside these files.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. http://www.gnu.org/licenses/gpl.html
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/gpl.html
Скачивание и установка
Рассмотрим самую последнюю версию Sublime Text 3, поэтому наша инструкция может отличаться от того что вы видели ранее в интернете.
Чтобы скачать Sublime Text 3 откройте сайт sublimetext.com/3. Откроется страница — Download Sublime Text 3. Здесь вы можете выбрать необходимую версию под вашу операционную систему. Выбираю для windows Sublime Text 3 64 bit. Если у вас тоже windows 64 bit, можете выбрать соответствующий файл Sublime Text или его портативную версию. Скачайте загрузчик. После того как загрузчик будет скачан можно приступить к установке.
Рассмотрим как установить Sublime Text 3.
Запускаем скачанный файл от имени администратора.
Подтверждаем установку Sublime Text.
Выбираем путь для установки или оставляем тот, что выбрала программа по умолчанию.
На следующем шаге Sublime Text предложит добавить себя в контекстное меню. Отметьте галочку, чтобы разрешить это.
Далее устанавливаем и финишируем установку.
Установленный Sublime Text вы можете найти через меню “Пуск” — “Все программы”.
What is improved?
Most of C Improved features tend to facilitate everyday C development experience. This varies from enabling highlighting of operators to more complex enhancements listed below.
Preprocessor issues
C preprocessor directives are relatively simple to parse (even with regular expressions, to some extent). And so related issues were addressed first of all.
Macro highlighting and error handling
Macro parameters (including variadic arguments) and argument stringification now have proper highlighting with handling of some common syntax errors.
Here is an example of two more or less complex multi-line macros.
Standard C | C Improved |
---|---|
And below is a result of commenting out a vararg (but missing a preceding comma outside the comment) and accidentally putting tabs after some line continuation backslashes.
Standard C | C Improved |
---|---|
Both errors are ignored by the standard package, while C Improved highlights a premature closing paren in the first case as an error, and warns about trailing whitespaces after the backslashes (the second one is immediately followed by an error complaining about an unexpected EOL within macro parameters). See an issue about highlighting.
Macro innards
A macro body (with proper line continuations, if needed) is not able to contribute to the symbol index anymore, nor it can interfere with a code surrounding the macro, or anyhow break syntax highlighting.
Standard C | C Improved |
---|---|
In this example the standard C package recognizes inside a macro as a function definition though it is actually a function call.
This leads to incorrect highlighting and also adds a bogus symbol into the symbol list.
Moreover, a function declaration which follows the macro () is not recognized at all.
Scopes for preprocessor directives
All preprocessor directives provide a proper scope now (), which means that you can select a whole macro with ctrl+shift+space or ⌘+⇧+space. It also allows, for instance, the whole macro body to be styled differently (this is up to a color scheme though).
Support for significant projects
The standard C package provides a special support for functions from C standard library and POSIX. For example, a function is highlighted differently.
However, most of major software projects implemented in C have their own internal libraries/frameworks and use some established patterns and idioms all across their sources. This includes not only a set of commonly used functions and types; there could be a handful macro for defining some object, a special kind of function attribute/annotation, etc.
If you use Sublime Text for developing some of the following projects, you should find these improvements rather useful.
Linux kernel source
This adds a special handling of some common macros widely used across the kernel source code, like , or ,
which would otherwise be recognized as functions thus polluting a symbol index and an outline.
Standard C | C Improved |
---|---|
CPython interpreter source
This includes:
- Highlighing of Python-related constants (like or ) and main data structures (, , , etc.)
- Widely used , and function annotation. This sanitizes higlighting of annotated functions and the symbol index
- Special highlighting of interned static string literals defined with macro
- Well-marked highlighting of macros involving transfer of control (like ).
Standard C | C Improved |
---|---|
Customizable indexing of types/functions/macros
You can adjust which symbols are available for navigation and visible in a symbol index or in an outline.
The following scopes and default preferences are provided:
Scope name | Description | Outlinectrl+R | Index (ST3) F12ctrl+shift+R |
---|---|---|---|
compound type | visible | visible | |
forward declaration of a type | visible | hidden | |
type alias () | visible | visible | |
function definition | visible | visible | |
function declaration | visible | hidden | |
function-like macro | visible | visible | |
object-like macro | visible | visible |
These settings can be changed through files, see .
Issues
-
Linux requires the curl binary to be installed on your system (in one of:
, , , , , or ). -
Depending on the number of gists you have, there can be a considerable delay the first time your list of gists is fetched. Subsequent requests will be cached and should be a bit faster (although the GitHub API’s ETags are currently not correct; once they fix that, it should speed things up). In the meantime, if there are gists that you open frequently, open them on GitHub and “Star” them, then access them via the Open/Copy Starred Gist commands.
-
Setting the file type for syntax highlighting when opening a gist in the editor does not work in Linux. I could get it to work with significant effort, so if you desperately want it, open an issue.
Usage
The first time you run one of the commands, it will ask you for your GitHub username and password in order to create a GitHub API access token, which gets saved in the Sublime GitHub user settings file. Your username and password are not stored anywhere, but if you would rather generate the access token yourself, see the “Generating Your Own Access Token” section below.
The following commands are available in the Command Palette:
-
GitHub: Switch Accounts
Switch to another GitHub account (see Adding Additional Accounts below)
-
GitHub: Private Gist from Selection
Create a private gist from the currently selected text (or, if nothing is selected,
the contents of the active editor. -
GitHub: Public Gist from Selection
Create a public gist from the currently selected text (or, if nothing is selected,
the contents of the active editor. -
GitHub: Copy Gist to Clipboard
Displays a quick select panel listing all of your gists, and selecting one will
copy the contents of that gist to your clipboard. -
GitHub: Copy Starred Gist to Clipboard
Displays a quick select panel listing only your starred gists, and selecting one will
copy the contents of that gist to your clipboard. -
GitHub: Open Gist in Editor
Displays a quick select panel listing all of your gists, and selecting one will
open a new editor tab with the contents of that gist. -
GitHub: Open Starred Gist in Editor
Displays a quick select panel listing only your starred gists, and selecting one will
open a new editor tab with the contents of that gist. -
GitHub: Open Gist in Browser
Displays a quick select panel listing all of your gists, and selecting one will
open that gist in your default web browser. -
GitHub: Open Starred Gist in Browser
Displays a quick select panel listing only your starred gists, and selecting one will
open that gist in your default web browser. -
GitHub: Update Gist
Update the gist open in the current editor.
The following commands require the Git plugin, available through the Package Manager. After installing, restart Sublime Text.
Note: These commands use the currently checked out branch to generate GitHub URLs. Each command also has a corresponding version, such as GitHub: Blame (master), that always uses the master branch, regardless of which branch is checked out locally. All commands except GitHub: Edit have a corresponding “permalink” version too, like GitHub: Blame (permalink), that uses the most recent commit on the current branch (more info).
-
GitHub: Open Remote URL in Browser
Open the current file’s location in the repository in the browser. If you have any lines selected, they will be highlighted in the browser. The default protocol is ‘https’. The default remote used is » (no remote). If you want to change either of those set them in your GitHub.sublime-settings file for your specific account.
-
GitHub: Copy Remote URL to Clipboard
Put the url of the current file’s location in the repository into the clipboard. If you have any lines selected, they will be included in the URL and highlighted when opened in a browser.
-
GitHub: Blame
Open the GitHub blame view of the current file in the browser. If you have any lines selected, they will be highlighted in the browser.
-
GitHub: History
Open the GitHub commit history view of the current file in the browser.
-
GitHub: View
Alias for GitHub: Open Remote URL in Browser
-
GitHub: Edit
Open the current file for editing on GitHub. I’m not sure why you’d want to do that, but it was easy enough to add.
Setup
Activate the by calling from Sublime Text quick menu.
Options
open your Sublime Text “user settings” and add what you need from below.
* note that not all the settings are available in both themes.
// tabs "Seti_tabs_small" // tabs height = 35 "Seti_tabs_med" // tabs height = 40 "Seti_tabs_big" // tabs height = "seti=45" / "seti_orig=54" "Seti_tabs_no_min_width" // (issues/223) "Seti_tab_font_12" // tab font size = 12 "mouse_wheel_tabswitch" // scroll through opened tabs "Seti_no_scroll_icons" // remove the l/r arrows, effective when ("enable_tab_scrolling": true) "Seti_no_under_bar" // remove the small colored bar under the un-saved tabs "not available with accents" "Seti_bold_slctdtab_labels" // make active tab label font in bold "Seti_use_system_title_bar" // use the new tabset feature (>=3127) // tabs unsaved bar ("Seti_accent_*": false) "Seti_yellow_tab" "Seti_red_tab" "Seti_indigo_tab" "Seti_purple_tab" "Seti_teal_tab" "Seti_lime_tab" "Seti_seablue_tab" // tab close button ("Seti_accent": false) "Seti_yellow_tabclose" "Seti_red_tabclose" "Seti_indigo_tabclose" "Seti_purple_tabclose" "Seti_teal_tabclose" "Seti_lime_tabclose" // tab label "Seti_blue_label" "Seti_yellow_label" "Seti_red_label" "Seti_indigo_label" "Seti_purple_label" "Seti_teal_label" "Seti_lime_label" // scrollbar "Seti_SB_med" // scrollbars width / height = 6 "Seti_SB_big" // scrollbars width / height = 10 "Seti_blue_scrollbar" "Seti_yellow_scrollbar" "Seti_red_scrollbar" "Seti_indigo_scrollbar" "Seti_purple_scrollbar" "Seti_teal_scrollbar" "Seti_lime_scrollbar" "Seti_seablue_scrollbar" // sidebar // icons "Seti_ClosedFolder_same" // same icon as the "Opened folder" "Seti_ClosedFolder_remove" // remove closed_folder icon "Seti_ClosedFolder_dots" // change closed_folder icon to dot "Seti_ClosedFolder_anim" // animate sidebar folder icons "Seti_sb_no_icons" // (issues/133) "Seti_sb_blank" // (issues/133) // padding "Seti_sb_small_padding" // sidebar entries padding = 3 "Seti_sb_big_padding" // sidebar entries padding = 10 "Seti_sb_tree_med" // sidebar tree padding = 15 "Seti_sb_tree_small" // sidebar tree padding = 10 "Seti_sb_tree_tiny" // (issues/88) "Seti_sb_tree_miny" // (issues/88) "Seti_show_group_arrows" // show the folder/group arrows in sidebar // labels "Seti_bold_slctdfile_labels" // make the sidebar selected file text in bold "Seti_sidebar_font_size_12" // (issues/115) "Seti_sidebar_font_size_13" // (issues/115) "Seti_sidebar_font_size_14" // (issues/115) "Seti_sidebar_font_Ubuntu" // (issues/115) "Seti_sidebar_font_Fira" // (issues/115) "Seti_sidebar_font_Hack" // (issues/115) "Seti_sidebar_font_Source" // (issues/115) "Seti_heading_font_12" // heading font size = 12 // heading "Seti_bold_heading" // make heading font in bold "Seti_no_heading" // remove the "folder,group 1,etc.." "Seti_top_heading_big" // sidebar top header img big "Seti_top_heading_small" // sidebar top header img small "Seti_top_heading_anim" // sidebar top header img animate on hover "not available with accents" "Seti_alt_tree_row" // alternative sidebar row highlight // view "Seti_pad_5" // use with line_padding_bottom / line_padding_top = 5 "Seti_pad_3" // use with line_padding_bottom / line_padding_top = 3 "Seti_panel_nrml" // remove the padding top/down from quick panel "Seti_dark_fold_button" // change the fold arrow to black // map "Seti_yellow_map" "Seti_red_map" "Seti_indigo_map" "Seti_purple_map" "Seti_teal_map" "Seti_lime_map" "Seti_seablue_map" // status bar "Seti_yellow_statusbar" "Seti_red_statusbar" "Seti_indigo_statusbar" "Seti_purple_statusbar" "Seti_teal_statusbar" "Seti_lime_statusbar" "Seti_seablue_statusbar" // accents "Seti_accent" // general options for accents "Seti_accent_yellow" "Seti_accent_red" "Seti_accent_indigo" "Seti_accent_purple" "Seti_accent_teal" "Seti_accent_lime" "Seti_accent_seablue"
Usage
All commands are accessible from the Command Palette using prefix
Trimmer, and in the Main Menu under -> -> Trimmer command.
- Command Palette screenshot
- Main Menu screenshot
The default key binding will trim trailing whitespace at the end of each of
line (entire file).
- OS X:
- Linux:
- Windows:
Trimmer Command API
Command | Description | Context |
---|---|---|
trim whitespace at the end of each line | entire file | |
trim whitespace at the start of each line | selection, or entire file | |
trim whitespace at the start and end of each line | selection, or entire file | |
trim whitespace from selection(s) | selection | |
delete empty, whitespace only lines | selection, or entire file | |
collapse multiple consecutive empty lines into one empty line | selection, or entire file | |
collapse multiple consecutive spaces into one space | selection, or entire file | |
trim empty, whitespace only lines at the beginning and end of the file | entire file | |
remove all blank space characters (tab, cr, ff, vt, space) | selection, or entire file | |
consecutive spaces reduced, empty lines removed and lines trimmed | selection, or entire file | |
replace smart characters (smart quotes, em/en dash, ellipsis, nbsp) | selection, or entire file | |
convert a string to a token by collapsing consecutive spaces, and trimming leading and trailing spaces | selection, or entire file | |
delete empty, whitespace only html and xml tags | selection, or entire file | |
remove code comments and collapse lines | selection, or entire file |
Горячие клавиши Sublime Text
Несколько часто используемых в Sublime Text 3 горячих клавиш:
Alt+Shift+f — выравнивание кода (reindent);Ctrl+f Alt+enter — выделить все найденные слова;Super+Alt+. — переход к выбранному классу в CSS в Sublime Text 3;Ctrl+/ — закомментировать / раскомментировать HTML;Ctrl+Shift + D — дублировать строку или выделение;Ctrl+K+U — преобразовать в прописные буквы (выделен фрагмент текста);Ctrl+K+L — преобразовать в строчные буквы (выделен фрагмент текста);Shift+Ctrl+g — обернуть выделение в div;Ctrl+ — передвигаем выделенный код влево или вправо;Ctrl+Shift+p — открываем меню команд;Ctrl+` — открывает в Sublime Text консоль.
Поделиться
Configuring
For adding additional library paths (Django and extra libs paths for
Python or extra paths to look for .js files for JavaScript for example),
either add those paths as folders to your Sublime Text project or
modify SublimeCodeIntel User settings. User settings can be configured
in the User File Settings:
Do NOT edit the default SublimeCodeIntel settings. Your changes will be
lost when SublimeCodeIntel is updated. ALWAYS edit the user
SublimeCodeIntel settings by selecting “Preferences->Package
Settings->SublimeCodeIntel->Settings — User”. Note that individual
settings you include in your user settings will completely replace
the corresponding default setting, so you must provide that setting in
its entirety.
Available settings:
-
A list of disabled languages can be set using
“disabled_languages”. Ex. - Live autocomplete can be disabled by setting “live” to
false. - Information for more settings is available in the
file in the package.
Плагины Sublime text 3
Нажмите ctrl+shift+P и снова напишите слово “install” и выберите графу Package Control: Install Package.
Выбор графы Package Control: Install Package открывает список доступных пакетов или plugins Sublime Text 3.
Emmet
Самый первый плагин для Sublime Text 3 — Emmet (с двумя m). Начните вписывать его название и увидите подсказку. В названии не должно быть никаких дополнительных слов. Нам нужно скачать Emmet к Sublime Text 3.
Кликаем по нему и дожидаемся открытия вкладки с сообщением о завершении установки, и просьбой перезапустить редактор Sublime text.
Как работает Emmet можно продемонстрировать на простом примере.
Создайте новый файл с расширением html в Sublime Text 3. Сделать это быстро можно тапнув два раза в строке вкладок, что откроет новую вкладку. Далее жмем сtrl+shift+S и сохраняем наш файл с любым именем и расширением — html.
Теперь emmet будет знать с каким языком мы хотим работать.
Для того, чтобы открыть начальный шаблон любой html страницы, будет достаточно поставить — ! и нажать tab.
Этот прием работает и с тегами. Достаточно набрать имя тега и нажать tab и он развернется в открывающий и закрывающий тег. И это еще не все. Подробный список доступных сокращений и возможных комбинаций можно увидеть на официальной странице Emmet.
All Autocomplete
Продолжим установку плагинов в Sublime Text.
Снова нажмите ctrl+shift+P и выберите “Package Control: Install” и введите название следующего плагина — All Autocomplete.
Это дополнение дает подсказки, когда мы начинаем набирать текст. Подсказки он берет из текста текущего файла.
AutoFileName
Следующий плагин называется AutoFileName. Он позволит нам подгружать имена файлов, которые находятся в папке с нашим сайтом, чтобы нам не приходилось вручную набирать пути к файлам или копировать их названия.
BracketHighlighter
Устанавливаем в Sublime Text еще одно дополнение, которое называется BracketHighlighter.
Снова нажмите ctrl+shift+P, введите install-package и название плагина BracketHighlighter. Он будет подсвечивать открывающие и закрывающие теги, открывающие скобки и закрывающие скобки и так далее.
Подсветка цвета
Очень помогает в разработке подсветка цвета в Sublime Text 3. Установите плагин в Sublime Text — Color Highlighter и вы будете видеть, а не только догадываться какой цвет означает например код — #fe9c10. Для установки в Sublime Text 3 — Color Highlighter, используйте тот же подход — через install package.
Плагины для Python
Для разработчиков на языке Python в Sublime Text 3 рекомендую установить плагин Anaconda. Его возможности:
- Автодополнение кода Python;
- Python linting (подчеркивание как синтаксических ошибок, так и нарушения PEP8);
- Документация Python;
- McCabe — проверка сложности;
- и много чего еще.
Установка выглядит аналогично.
Нажмите ctrl+shift+P, пишем слово “install” и выбираем графу “Package Control: Install Package”. Далее пишем — Anaconda и выбираем для установки этот пакет.
В завершении установки Sublime Text откроет вкладку с приветствием.
Еще один плагин для Python в Sublime Text 3 — Djaneiro. Установка по старой схеме.
Usage
Open any VEX code and choose VEX using menu at the right bottom corner of
the editor. By default, it will be automatically set on all files.
If you don’t want to change from ANSI C to VEX every time you open some VEX
library with extension, there is “Open all with current extension as…”
action in the same menu.
When you start to type VEX function name, it will prompt you with suggestions.
You can choose one and use and keys to navigate back and
forth. Snippets are also available for common keywords: if, else, for,
foreach, while.
To show docs for the function:
Tools → Command Pallette → VEX: Show Documentation for Function Under Cursor
Shortcut: .
For the rest, check Sublime Text Documentation, it has many small features
that make textual editing easy and powerful.
Syntax Check
If you configured VCC path, you can do syntax check in the editor and see
errors. It doesn’t require Houdini to run on background.
Tools → Build With… →
VEX Build
Use this variant if you write a custom shader and define context function
with return type like: surface, displace, cvex, etc. This is what VCC
expects by default, and probably least useful for Houdini user this days.
VEX Build — As a Library
If you write a custom library to include it in your code.
VEX Build — As a Snippet
If you write wrangle. Most common choice.
See some code examples in the add-on development repo.
VCC has no idea about attribute bindings, libraries got automatically compiled
within CVEX context, snippets are just functions internally, and VCC does not
expect to see a surface shader there. Therefore three variants. So, if you try
to do syntax check and error messages make a little sense, like this:
Check if correct build variant is used. Error 1088 is a common error, but in
case of wrong build variant chosen, there won’t be visible syntax problems.
Adding Additional Accounts
If have multiple GitHub accounts, or have a private GitHub installation, you can add the other
accounts and switch between them whenever you like.
Go to the GitHub user settings file (Preferences -> Package Settings -> GitHub -> Settings — User),
and add another entry to the dictionary. If it is another GitHub account, copy the
for the default GitHub entry (if you don’t see it, you can get it from Preferences ->
Package Settings -> GitHub -> Settings — Default, or in the example below), and just give the
account a different name. If you’re adding a private GitHub installation, the will be
whatever the base url is for your private GitHub, plus “/api/v3”. For example:
"accounts": { "GitHub": { "base_uri": "https://api.github.com", "github_token": "..." }, "YourCo": { "base_uri": "https://github.yourco.com/api/v3", "github_token": "" } }
Don’t worry about setting the –that will be set for you automatically, after you
switch accounts (Shift-Cmd-P, “GitHub: Switch Accounts”).