Sublime Forum

Supporting multiple font faces in files to track code changes from multiple users

#1

Hi Folks

I am working on a project that involves several users. Each file gets edited by multiple users. I want to see if Sublime can help in visually locating code edits from particular user. What I mean is that in a single code file, each user’s code should look different in terms of font face , style and etc. How can I achieve this in Sublime. See attached picture as a sample.

0 Likes

#2

Sublime Text does not support multiple fonts per view.

With that said, you’d need to call git blame for the whole file use the result to add_regions to highlight the code of different users with different scopes.

Regions allow you to either highlight the code inline (underline, different background) or add icons to the gutter area. But both will fight with other plugins using those areas already, such as GitGutter or SublimeLinter.

An alternative is discussed here. The basic idea is to copy a feature of VS Code’s GitLens plugin to display a phantom text at the end of a line and add information about the author of a change in the status bar.

1 Like