Spacevim: [NEWBIE QUESTION] How to disable relative numbering

Created on 23 Jun 2018  路  6Comments  路  Source: SpaceVim/SpaceVim

Hi Team,

I just discovered SpaceVim and it looks really awesome, thank you guys!.
I am trying to figure it out _How to disable relative numbering?_ but it seems I am doing wrong.

Based on what I could find out, it should be just a matter of setting
let g:spacevim_relativenumber = 0 and done.

Here https://vi.stackexchange.com/questions/15651/line-number-order-is-broken it says that I should set this into ~/.SapceVim.d/init.toml. However the expression let g:var = value is not valid toml syntax.

The SpaceVim documentation refers to using the command :h SpaceVim-config which says that custom settings must be placed in ~/.SapceVim.d/init.vim, however after creating such file, lines continue counting relative from the cursor position.

I also read, in the previously linked documentation, that I can set relativenumber (without the spacevim_ prefix) inside the [options] section of the init.toml file. However, as I also plan to set other variables so I would like to know how to use init.vim file.

Thank you in advance,
Mictian

Most helpful comment

Here https://vi.stackexchange.com/questions/15651/line-number-order-is-broken it says that I should set this into ~/.SapceVim.d/init.toml. However the expression let g:var = value is not valid toml syntax.

in that question it should be ~/.SpaceVim.d/init.vim. the toml file is a new version fo SpaceVim's config file.

SpaceVim will check if the toml exist, if there is a toml file, it will not load the init.vim. so if you use ~/.SpaceVim.d/init.vim only, it should works.

I recommand to use toml as the default config. to disable relative number, you can add this to init.toml, ( under the [options] section).

  relativenumber = false

All 6 comments

Here https://vi.stackexchange.com/questions/15651/line-number-order-is-broken it says that I should set this into ~/.SapceVim.d/init.toml. However the expression let g:var = value is not valid toml syntax.

in that question it should be ~/.SpaceVim.d/init.vim. the toml file is a new version fo SpaceVim's config file.

SpaceVim will check if the toml exist, if there is a toml file, it will not load the init.vim. so if you use ~/.SpaceVim.d/init.vim only, it should works.

I recommand to use toml as the default config. to disable relative number, you can add this to init.toml, ( under the [options] section).

  relativenumber = false

Hi,
Thank you!

And how should I set other variables, let say just to put an example let no_buffers_menu=1 ? This one is not spacevim_ prefixed.

Regards,
Mictain

you can use bootstrap func, please see #1853 and #1807

Totally clear now! Thank you very much :smile:

I also discovered SpaceVim recently (awesome!).

I want to note for posterity that relative numbers seem odd at first, but if you give it a chance, you'll understand it actually makes your life easier (see relative jumping: https://jeffkreeftmeijer.com/vim-number/ ).

Yeah, when relative number is on, line jumping will be easier.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

s97712 picture s97712  路  4Comments

everettjf picture everettjf  路  5Comments

wsdjeg picture wsdjeg  路  4Comments

dzintars picture dzintars  路  3Comments

onerciller picture onerciller  路  5Comments