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

Feature request: Prettifying of YAML "document here" #9

Open
phmarek opened this issue Nov 16, 2023 · 1 comment
Open

Feature request: Prettifying of YAML "document here" #9

phmarek opened this issue Nov 16, 2023 · 1 comment

Comments

@phmarek
Copy link

phmarek commented Nov 16, 2023

Sometimes - one trigger is a space before a newline, but there seem to be others as well - my "document here" in YAML (Dockerfiles, shell scripts, etc.) get "reformatted" into a long string containing \n and other escape sequences.

Like

foo: |
  this is "a"
  text
  # with comments

and after reloading I get

foo: "this is \"a\"\ntext\n# with comments"

Needless to say, this is awful to work with.

So I'd like to ask for a keybinding that reformats the current element to the nice form above.

If Kapply detects trailing whitespace it would be great if it asked whether to remove it, abort, or ignore, as well ; )

@rottencandy
Copy link
Owner

I'm not able to reproduce this. Multiline strings that start with | are being preserved with formatting for me.

Could it be kubectl version again?

Does kubectl get -o yaml ... also return formatted string? That is what the plugin uses when fetching & reloading.

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

No branches or pull requests

2 participants