Brackets: Question: Automatic close tags

Created on 2 Nov 2018  ·  5Comments  ·  Source: adobe/brackets

I am new to web development, new to brackets and ... _oh well_ ... new to GitHub. I hope that its correct to ask a question in the issues :-/

If I write a tag, lets say and then auto complete it, it will automaticly close the tag with . The function is very helpfull, but not always. Sometimes I edit some text afterwards. If I then add the tag at the beginning, it will automaticly add the close-tag directly after the open-tag. Result: I have to delete the close-tag by hand.

Now the question: Is there a shortcut to auto-complete a tag but DO NOT auto-close the tag directly after so I can put the close-tag where I want to? 👍

Thank you beforehand! :)

All 5 comments

Nopes @Cheesygambit . But you can disable autocomplete. One more thing if you are talking about html tags then you can set something like autocomplete will happen only when you will start typing close tag i.e. 'Open Preference File.

Thank you for your response!

It doesn't seem to work for me :/
Here is my brackets.json

{
    "brackets-eslint.gutterMarks": true,
    "brackets-eslint.useLocalESLint": false,
    "fonts.fontSize": "13px",
    "fonts.fontFamily": "'SourceCodePro-Medium', MS ゴシック, 'MS Gothic', monospace",
    "useTabChar": true,
    "tabSize": 4,
    "themes.theme": "monokai-corail",
    "noDistractions": false,
    "styleActiveLine": true,
    "closeBrackets": true,
    "extensions.sort": "downloadCount",
    "closeTags.whenOpening": false,
    "dragDropText": true,
    "indentLineComment": false,
    "highlightMatches": false
}

I aso tried to only write

"whenOpening": false,

But that doesnt work either.

```

You need to write something like this. You could use the following four options.

// Sets the tag closing options
"closeTags": {
// An array of tags that should not be auto-closed
"dontCloseTags": [],

    // An array of tags that when opened has a blank line
    "indentTags": [],

    // Close when / of closing tag is typed
    "whenClosing": true,

    // Close when > of opening tag is typed
    "whenOpening": true
},

You can copy from defaultpreference.json which gets opened in left split on clicking Debug->Open Preference File

Ah! Okay I understand :)
Thank you for your help!

Closing this issue. Feel free to reopen if you still have any concerns.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

10polarbears picture 10polarbears  ·  3Comments

AgamlaRage picture AgamlaRage  ·  4Comments

zaggino picture zaggino  ·  4Comments

macjabeth picture macjabeth  ·  3Comments

theman1616 picture theman1616  ·  4Comments