Spacevim: How do I set vim's settings?

Created on 15 Sep 2018  ·  14Comments  ·  Source: SpaceVim/SpaceVim

I want to add cursorcolumn with its highlight command

here is what I had in vimrc

set cursorcolumn
:hi CursorColumn cterm=NONE ctermbg=238 guibg=238 guifg=white

Where should I write it now?
~/.vimrc doesn't seem to be sourced

P.S. I tried to do like this https://github.com/SpaceVim/SpaceVim/issues/1704#issuecomment-388600338 but it's not working too

Most helpful comment

add your command in ~/.SpaceVim/vimrc

All 14 comments

I have tried with neovim, add

set cursorcolumn
:hi CursorColumn cterm=NONE ctermbg=238 guibg=238 guifg=white

to bootstrap function, set cursorcolumn works well, the highlight does not work, It is because colorscheme always change the the highlight of the CursorColumn.

and in vim8, you can not use the color number 238, and I get this error

E254: Cannot allocate color 238

add your command in ~/.SpaceVim/vimrc

pleace read the documentation of SpaceVim, and you should check :h SpaceVim in vim.

SpaceVim document actually does not address how to set base-vim settings (like for ctrl-p).

Some one needs to address this. I don't see how I can continue using spacevim without a number of my custom setting I've gotten used to over the years. I have a hard time accepting that there isn't a way to add a native vim setting, someone just needs to document how to do or else I need to dedicate probably half a day of hacking to figure it out

you should read bootstrap function section in spacevim document.


wsdjeg

-------- 原始邮件 --------
主题:Re: [SpaceVim/SpaceVim] How do I set vim's settings? (#2167)
发件人:Anthony Carathimas
收件人:SpaceVim/SpaceVim
抄送:Wang Shidong ,State change

Some one needs to address this. I don't see how I can continue using spacevim without a number of my custom setting I've gotten used to over the years. I have a hard time accepting that there isn't a way to add a native vim setting, someone just needs to document how to do or else I need to dedicate probably half a day of hacking to figure it out


You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHubhttps://github.com/SpaceVim/SpaceVim/issues/2167?email_source=notifications&email_token=ADEITEREBI57NYHWHQTCQ33P5TMPBA5CNFSM4FVJELB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZFDFJA#issuecomment-508179108, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ADEITEXRTIP6DBEA3CVEK6TP5TMPBANCNFSM4FVJELBQ.

Same question here.

I've tried the approach of https://github.com/SpaceVim/SpaceVim/issues/1853#issuecomment-398883972

_~/.SpaceVim.d/autoload/myconfig.vim_
set colorcolumn=80

In _~/.SpaceVim.d/init.toml_ I use bootstrap_after = "myconfig#after" but this doesn't help. My goal is to always display the colorcolumn.

Disclaimer: Spacevim noob + vim beginner. :grimacing:

@haukebruno Try this:

  1. add bootstrap_after = "myconfig#after" to options in ~/.SpaceVim.d/init.toml
  2. In ~/.SpaceVim.d/autoload/myconfig.vim add:
function! myspacevim#after() abort
  set noro
  and other commands
endfunction

then open new vim ;D

Thanks @qins
This works like a charm, I appreciate that :)

Note for users of neovim, the file to edit is .SpaceVim/init.vim

Seems also .SpaceVim/config/neovim.vim is also fine.

You should not edit any file in ~/.SpaceVim, use bootstrap function instead.

Mmh, ok, so you recommend the qins solution then rather, right?

To use vimscript, you need to read the bootstrap function doc. in bootstrap function, you can use vimscript instead of toml.

Was this page helpful?
0 / 5 - 0 ratings