21

I like the code coloring in Github so that keywords gets highlighted when view source code.

But in Bitbucket i see very light color and almost no diff between codes , keywords etc.

very bad color coding for all languages

Is there any way to chnage that or its default for all

user2424160
  • 311
  • 2
  • 5

5 Answers5

8

A Chrome extension called "Refined Bitbucket" provides the syntax highlighting you ask for:

Install it from the Chrome web store and it will automatically make changes to BitBucket's Pull Request pages to implement syntax highlighting, amongst many other features.

It's also available for Firefox.

Greg Dubicki
  • 335
  • 3
  • 10
Evans
  • 81
  • 1
  • 1
  • Explaining HOW a given utility or software tool fixes a problem is required when suggesting such solutions to questions here. Merely linking a software product and saying "it works" just looks very spammy, and so such posts are generally discouraged. Please include a how-to and explanation to make this a better and more useful answer that looks less like spam. – music2myear Apr 25 '19 at 15:22
  • 3
    @music2myear thanks for the feedback however Im not sure how to action it. It's a chrome extension so I don't think i need to explain how to install it. Then it adds syntax highlighting as the question asked. Not sure how I can add clarification? – Evans Apr 26 '19 at 09:13
  • Adding to your answer just what you've placed in this comment would be a few very large steps in the right direction. – music2myear Apr 26 '19 at 14:42
2

Unfortunately, the answer is no, you cannot customize the colors used for code highlighting on Bitbucket. Several other users have asked about this (see here), and Atlassian staff have stated that it is not available. Unfortunately, it appears that they are unlikely to implement it given that the issue has been marked as resolved. Although the link I provided you is from a post from 2011, there is no additional evidence I was able to find that suggested any other discussions have taken place regarding the feature.

DaveTheMinion
  • 5,488
  • 25
  • 61
  • 99
  • This answer is now out of date. Although not possible natively, there is a chrome extension called Refined Bitbucket that achieves the desired result. See @Evan's answer. – Will Sheppard Oct 08 '19 at 14:10
0

I've found that "Refined Bitbucket" ruins the diff and so I can't use it. But fortunately...

There is a browser extension called Bitbucket Syntax Highlighting that was recently created. Currently supports chrome and firefox. It keeps the diff intact. (Disclaimer I am the creator of the project haha. Submit an issue if you run into any issues)

0

One such option is provided at BCloud ticket:

Hack to fix the issue:

When you're on a page for a file, click the 'Edit' button, then click 'Cancel' to stop editing and view the file source again. This time it will show a much nicer view, with syntax highlighting, full-page width, and no annoying nested scrolling frame for the file. This is at the same URL just with ?mode=edit in the query and the actual edit cancelled. With some more browser-level hackery it may be even possible to set this view as the default for files. TL;DR: BB already has a very nice file view, with full syntax highlighting even for Scala. They just choose to use the broken view by default.

Atur
  • 545
  • 5
  • 11
0

Finally, this has been implemented. It is a "Beta" feature at the moment, nammed "Enable syntax highlighting in diffs": https://bitbucket.org/account/settings/features/

Zwyx
  • 101
  • 3