vim: add relativeNumber option
Beside absolute numbering vim can display additional column with line numbering relative to current cursor postion.
This commit is contained in:
parent
383f7acc05
commit
5d33444519
|
@ -19,11 +19,19 @@ in
|
||||||
default = null;
|
default = null;
|
||||||
description = "Whether to show line numbers.";
|
description = "Whether to show line numbers.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
relativeNumber = mkOption {
|
||||||
|
type = types.nullOr types.bool;
|
||||||
|
default = null;
|
||||||
|
description = "Whether to show relative line numbers column.";
|
||||||
|
};
|
||||||
|
|
||||||
expandTab = mkOption {
|
expandTab = mkOption {
|
||||||
type = types.nullOr types.bool;
|
type = types.nullOr types.bool;
|
||||||
default = null;
|
default = null;
|
||||||
description = "Whether to convert tabs into spaces.";
|
description = "Whether to convert tabs into spaces.";
|
||||||
};
|
};
|
||||||
|
|
||||||
tabSize = mkOption {
|
tabSize = mkOption {
|
||||||
type = types.nullOr types.int;
|
type = types.nullOr types.int;
|
||||||
default = null;
|
default = null;
|
||||||
|
@ -65,6 +73,7 @@ in
|
||||||
optionalInteger = name: val: optionalString (val != null) "set ${name}=${toString val}";
|
optionalInteger = name: val: optionalString (val != null) "set ${name}=${toString val}";
|
||||||
customRC = ''
|
customRC = ''
|
||||||
${optionalBoolean "number" cfg.lineNumbers}
|
${optionalBoolean "number" cfg.lineNumbers}
|
||||||
|
${optionalBoolean "relativenumber" cfg.relativeNumber}
|
||||||
${optionalBoolean "expandtab" cfg.expandTab}
|
${optionalBoolean "expandtab" cfg.expandTab}
|
||||||
${optionalInteger "tabstop" cfg.tabSize}
|
${optionalInteger "tabstop" cfg.tabSize}
|
||||||
${optionalInteger "shiftwidth" cfg.tabSize}
|
${optionalInteger "shiftwidth" cfg.tabSize}
|
||||||
|
|
Loading…
Reference in a new issue