Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving lines with alt + arrow breaks indentation and formatting #534

Open
1 of 3 tasks
ankitsinghaniyaz opened this issue Nov 12, 2017 · 3 comments
Open
1 of 3 tasks
Labels
bug language-config https://code.visualstudio.com/api/language-extensions/language-configuration-guide upstream

Comments

@ankitsinghaniyaz
Copy link

Info

  • Platform: Linux
  • Vetur version: 0.11.1
  • VS Code version: 1.18.0

Problem

Using Alt + Arrow keys to move lines up and down doesn't do the right indentation/formating

Reproducible Case

Write a few nested blocks in template section like so:

<template>
  <el-container>
    <el-header class="nav">
      <div class="brand">
        <h2><strong>Shareito</strong></h2>
      </div>
      <div class="menu-wrapper">
        <el-menu default-active="1" class="no-border-bottom" mode="horizontal">
          <el-menu-item index="1">Activity</el-menu-item>
          <el-menu-item index="2">Integrations</el-menu-item>
          <el-menu-item index="3" class="no-border-bottom">
            <a href="/team/invite">
              <el-button type="primary">Add User</el-button>
            </a>
          </el-menu-item>
        </el-menu>
      </div>
    </el-header>
    <el-main>
      <!-- all content goes here -->
      <slot></slot>
    </el-main>
    <el-footer>
      <!-- add content here as we need -->
    </el-footer>
  </el-container>
</template>

Now use the arrow + up/down key to move any line, the formatting seems to be broken, the line is not indented to the right position.

@octref
Copy link
Member

octref commented Nov 12, 2017

Yes, you need to reformat the template region after moving lines.

@ctf0
Copy link

ctf0 commented Sep 7, 2018

@octref cant we have support like the docs says ?

@octref
Copy link
Member

octref commented Sep 7, 2018

@ctf0 Thanks — I gave it a try. Seems it does not work correctly for embedded languages. I'll open an issue in VS Code to track this.

@octref octref added bug upstream language-config https://code.visualstudio.com/api/language-extensions/language-configuration-guide and removed question labels Sep 7, 2018
@octref octref reopened this Sep 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug language-config https://code.visualstudio.com/api/language-extensions/language-configuration-guide upstream
Projects
None yet
Development

No branches or pull requests

3 participants