[英]Gitlab, how to change tabulation size on code review
While reviewing the code with gitlab merge request web page, tabulation is 8 spaces. 在使用gitlab合并请求网页查看代码时,制表符为8个空格。
It makes the code difficult to read. 它使代码难以阅读。 How could I move it to 1 or 2 spaces ?
如何将其移动到1或2个空格?
It seems to be impossible to achieve that by available GitLab settings, but this can be hacked using Greasemonkey / Tampermonkey browser extension: 似乎不可能通过可用的GitLab设置来实现,但是可以使用Greasemonkey / Tampermonkey浏览器扩展来破解:
// ==UserScript==
// @name Custom tab-width
// @version 1
// @grant none
// @include https://your.gitlab.server.com/*/diffs*
// ==/UserScript==
var style = document.createElement("style");
style.type = "text/css";
style.innerHTML = "span.line {tab-size:2; -moz-tab-size:2;}";
document.head.appendChild(style);
or by any other stylish-like extensions which allow you to attach any custom css rules to web pages: 或通过任何其他类似时尚的扩展程序,使您可以将任何自定义CSS规则附加到网页:
span.line {tab-size:2; -moz-tab-size:2;}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.