23

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
  • 331
  • 1
  • 2
  • 5

5 Answers5

10

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.

Evans
  • 101
  • 1
  • 2
4

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
  • 141
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.

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
  • 565