Sublime Text - Preferences: verschil tussen versies

Uit De Vliegende Brigade
Naar navigatie springen Naar zoeken springen
 
Regel 7: Regel 7:
 
* Edit and safe the file on the right. Make sure that everything is within one set of <code>{</code> and <code>}</code> symbols.
 
* Edit and safe the file on the right. Make sure that everything is within one set of <code>{</code> and <code>}</code> symbols.
  
''' Example '''
+
=== Example - Correct ===
  
Correct:
 
 
<pre>
 
<pre>
 
{
 
{
Regel 24: Regel 23:
 
</pre>
 
</pre>
  
Incorrect:
+
=== Example - Incorrect ===
  
 
<pre>
 
<pre>

Huidige versie van 14 jun 2024 om 08:30

To change preferences in Sublime Text:

General

  • Go to Preferences » Settings
  • Two files will now open: Default settings on the left and user settings on the right
  • Edit and safe the file on the right. Make sure that everything is within one set of { and } symbols.

Example - Correct

{
   // "draw_white_space": "all",
   // 
   "font_size": 10,

   // Added: 2024.06.14
   //
   "tab_size": 3,
   "translate_tabs_to_spaces": false,
   "detect_indentation": false
}

Example - Incorrect

{
   // "draw_white_space": "all",
   // 
   "font_size": 10,
}
{
   // Added: 2024.06.14
   //
   "tab_size": 3,
   "translate_tabs_to_spaces": false,
   "detect_indentation": false
}

Language-specific

If you want to ensure that these settings apply to all file types or only specific ones, you can create or modify syntax-specific settings. For instance, if you want to set these preferences only for Python files:

  • Open a Python File: Open any Python file in Sublime Text
  • Open Syntax-Specific Settings:
    • Go to Preferences in the top menu
    • Select Settings - Syntax Specific
  • Modify Settings: As before.