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

Text reflow doesn't respect tabs #3929

Closed
aykevl opened this issue Jul 30, 2019 · 0 comments
Closed

Text reflow doesn't respect tabs #3929

aykevl opened this issue Jul 30, 2019 · 0 comments
Labels

Comments

@aykevl
Copy link

aykevl commented Jul 30, 2019

When reflowing lines that are indented using tabs (using gq for example), tabs are replaced by spaces.

Steps to reproduce the behavior:

  1. Select a few commented lines with Shift V, for example the two commented lines in the following code (note the tabs at the beginning):
    	// Gather the list of parameters for every call we're going to
    	// make.
    	callParams := make([]llvm.Value, call.OperandsCount()-1)
    	for i := range callParams {
    		callParams[i] = call.Operand(i)
    	}
  2. Press g q
  3. Notice how the line has become the following, with a single space for indentation completely breaking indentation:
     // Gather the list of parameters for every call we're going to make.
    	callParams := make([]llvm.Value, call.OperandsCount()-1)
    	for i := range callParams {
    		callParams[i] = call.Operand(i)
    	}

I would expect this to become like the following:

	// Gather the list of parameters for every call we're going to make.
	callParams := make([]llvm.Value, call.OperandsCount()-1)
	for i := range callParams {
		callParams[i] = call.Operand(i)
	}

Screenshot after reflowing:

Screenshot at 2019-07-30 17-58-27

Environment:

  • Extension (VsCodeVim) version: 1.9.0
  • VSCode version: 1.36.1
  • OS: Linux (Debian Stretch)

Some settings that might be relevant:

    "window.zoomLevel": 1,
    "editor.fontSize": 13,
    "editor.renderWhitespace": "boundary",
    "vim.searchHighlightColor": "rgba(255, 255, 0, 0.5)",
    "vim.hlsearch": true,
    "editor.wordWrap": "on",
    "editor.wrappingIndent": "deepIndent",
    "editor.minimap.enabled": false,
    "editor.hover.enabled": false,
    "[html]": {
        "editor.tabSize": 2,
    },
    "files.insertFinalNewline": true

I'm testing this with Go, which basically always uses tabs for indentation so this is a real problem for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants