Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6750073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:45:54+00:00 2026-05-26T12:45:54+00:00

If there exists a tool to automatically prettify my js code then I would

  • 0

If there exists a tool to automatically prettify my js code then I would much rather use that package.

I want to expand everything such that a statement like this:

var n=x+(y+(z/k))-123;

turns into:

var n = x + (y + (z / k)) - 123;

However, for the moment, I want to convert all my cramped =, ==, and ===, statements into padded versions of themselves.

I tried using something like :%s/[^ ]==[^ ]/ == /g but the problem with that is that it clips the preceeding and proceeding character.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T12:45:55+00:00Added an answer on May 26, 2026 at 12:45 pm

    In Vim, you could use something like:

    :%s!\s*\([!<>=/*+-]\+\)\s*! \1 !g
    

    Explanation:

    • s – substitute
    • ! – start pattern
    • \s* – zero or more whitespace
    • \( – start group
    • [!<>=/*+-]\+ – one or more of !<>=/*+-
    • \) – end of group
    • \s* zero or more whitespace
    • ! end of pattern, beginning of replacement
    • <space>\1<space> – the matched group padded by space
    • ! – End of replacement
    • g – globally on a line

    But if you want to prettify code and stick to a defined coding standard, you’re better off using a tool like Artistic Style.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In the code there exists exactly one type that implements IResourceConverter. That's what the
I would like to know if there exists any tool (like a profiler), or
Is there a development tool plugin for Safari much like how there exists the
There exists an RSS feed with over 1000 items. I want to create a
I have recently found out that there exists a method called nth_element in the
As far as I remember there exists an Eclipse plugin that reveals ids of
Is there any software, plugin or technique that would allow creating/exporting PNG-like GIFs with
Is there a free/open source tool to verify wether a domain exists in c#?
I am looking for a tool that'll take either a .java source code file,
I need this PHP code converted to C#. Is there a tool or a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.