Box-Of-Hats / Bem-VSCode-Extension

A VSCode extension for helping with inserting BEM (Block-Element-Modifier) classes.
BSD 3-Clause "New" or "Revised" License
29 stars 5 forks source link

shortcut for repeating name of element under a certain block #66

Open renjithnk opened 4 months ago

renjithnk commented 4 months ago

I have a block called 'header'. It has an element inside called 'main-logo'. The 'main-logo' has couple of child elements. So, for each of the child element, I need to manually type the element name 'main-logo' over and over again. So let me know is there any shortcut to avoid this repeating manual typing of 'main-logo' in each child element under 'main-logo' element. The code is as follows.

Bem Helper Shortcut Code: .header>.-main-logo>.-main-logo-container>.-main-logo-link>.-main-logo-image|bem

Result:


        <div class="header__main-logo">
            <div class="header__main-logo-container">
                <div class="header__main-logo-link">
                    <div class="header__main-logo-image"></div>
                </div>
            </div>
        </div>
    </div>```