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

Suggestion: A second command to do the opposite - reformat a multiline function onto a single line #8

Open
jgale opened this issue Jun 29, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@jgale
Copy link

jgale commented Jun 29, 2022

I'd love to have a second command that can do the opposite of Multiliner - reformat a multi-line call into a single line.

Background: Our company style guide says if a function call is under 120 chars it should be a single line, otherwise split up like Multiliner does. Often times when refactoring I'm deleting a bunch of parameters and the call would fit on a single line. I'd love a command to be able to reformat it quickly onto one line to check if it fits.

PS: This is incredible, I've been periodically searching for something like this for ages. Thank you so much for making it! You are going to save me a few minutes every day.

@aheze aheze added the enhancement New feature or request label Jun 29, 2022
@aheze
Copy link
Owner

aheze commented Jun 29, 2022

Sounds good, I'll add a Singleliner command. It would probably also be good if the extension could reformat the entire file and determine if it should apply Singleliner or Multiliner depending on the number of chars

@aheze aheze closed this as completed Jun 29, 2022
@aheze aheze reopened this Jun 29, 2022
@aheze
Copy link
Owner

aheze commented Jun 29, 2022

Or maybe the number of parameters - anything more than 3 could be multiline

@aheze aheze closed this as completed Jun 29, 2022
@aheze
Copy link
Owner

aheze commented Jun 29, 2022

BRUH I clicked command enter and it closed it

@aheze aheze reopened this Jun 29, 2022
@jgale
Copy link
Author

jgale commented Jun 29, 2022

Or maybe the number of parameters - anything more than 3 could be multiline

My preference would be number of characters, sometimes thing have long names or short names and fit easily.

Thanks so much for considering, and thanks again! This makes me so happy.

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

No branches or pull requests

2 participants