如何在所有文件的spacemacs中获得混合行编号(相对行号,但当前行显示绝对行号而不是0)?
我尝试在user-config中设置相对行号,但这似乎不起作用,并且无法弄清楚如何在相对模式中替换0:
(global-linum-mode)
(setq-default dotspacemacs-line-numbers 'relative)
Run Code Online (Sandbox Code Playgroud)
Str*_*bra 20
该dotspacemacs-line-numbers变量已存在于您.spacemacs的dotspacemacs/init函数中.如果不是这种情况,您可以.spacemacs在帮助下将您更新到最后一个模板SPC f e D.
将其值更改为'relative,如:
;; If non nil line numbers are turned on in all `prog-mode' and `text-mode'
;; derivatives. If set to `relative', also turns on relative line numbers.
;; (default nil)
dotspacemacs-line-numbers 'relative
Run Code Online (Sandbox Code Playgroud)
然后删除你在中添加的两行dotspacemacs/user-config.您所需要的只是如上所述更改变量,它将负责为您应用更改:-)