Skip to content

Please do not re-indent the content of multiline strings/heredocs #505

Description

@vais

It could be argued that the content of multiline strings/heredocs shall not be altered when indenting. At least that's how indentation works in both Ruby and JavaScript Vim plugins. Vim-elixir currently re-indents the contents:

Before indenting:

defp sql do
  """
  SELECT *
    FROM table
   WHERE column = 123
     AND another_column = 456
  """
end

Actual (after indenting)

defp sql do
  """
  SELECT *
  FROM table
  WHERE column = 123
  AND another_column = 456
  """
end

Expected (content inside multiline string shall remain the same before and after indenting)

defp sql do
  """
  SELECT *
    FROM table
   WHERE column = 123
     AND another_column = 456
  """
end

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions