1

I'm using nerdcommenter alongside neovim, and every time I comment out a block of code with <leader>cc, the code isn't really spaced out:

fn main() {
    //println!("Hello, world!");
}

I want to get an output of something like this:

fn main() {
    // println!("Hello, world!");
}

Is there a command or configuration that I'm missing out on? (I haven't configured nerdcommenter at all in my vimrc)

Ken White
  • 123,280
  • 14
  • 225
  • 444
paxous
  • 119
  • 10
  • That option is in the [doc](https://github.com/preservim/nerdcommenter/blob/master/doc/nerdcommenter.txt#L761). – jdhao Nov 14 '22 at 02:33

1 Answers1

1

See the plugin docs : use g:NERDSpaceDelims configuration option

" Add spaces after comment delimiters by default
let g:NERDSpaceDelims = 1

Or for Neovim with Lua configuration :

vim.g.NERDSpaceDelims = 1
lcheylus
  • 1,217
  • 8
  • 21