You are not logged in.

#1 2023-10-14 14:58:55

b42
Member
Registered: 2023-07-20
Posts: 203

[SOLVED]vim and neovim

I have been using vim and I just installed neovim. I have found that neovim uses the same .vimrc file for its configuration, if so, why do I get completely different colors for the same file on vim and neovim?

Last edited by b42 (2023-10-15 20:55:25)

Offline

#2 2023-10-14 17:35:29

frostschutz
Member
Registered: 2013-11-15
Posts: 1,648

Re: [SOLVED]vim and neovim

vim and nvim don't use the same configuration (compare /usr/share/vim vs. /usr/share/nvim)

vim by default just uses your terminal color scheme (so colors depend on your terminal configuration), and nvim by default sets rgb colors directly (if terminal supports it)

thus nvim ignores your terminal color scheme

Offline

#3 2023-10-15 09:10:52

b42
Member
Registered: 2023-07-20
Posts: 203

Re: [SOLVED]vim and neovim

where can I find neovim config file like .vimrc?

Offline

#4 2023-10-15 09:33:59

hcjl
Member
From: berlin
Registered: 2007-06-29
Posts: 330

Offline

#5 2023-10-15 09:44:09

b42
Member
Registered: 2023-07-20
Posts: 203

Re: [SOLVED]vim and neovim

that is the thing I even dir nvim does not exist under ~/.config/ on my system

Offline

#6 2023-10-15 10:41:19

hcjl
Member
From: berlin
Registered: 2007-06-29
Posts: 330

Re: [SOLVED]vim and neovim

man mkdir

Offline

#7 2023-10-15 12:51:20

b42
Member
Registered: 2023-07-20
Posts: 203

Re: [SOLVED]vim and neovim

I know how to make a directory.

Does it mean if I create ~/.config/nvim nvim config file will pop up automatically ?

Offline

#8 2023-10-15 13:17:36

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,653

Re: [SOLVED]vim and neovim

Automagically filled with what content?
It's a config file. The purpose is to configure the application. The entity doing that configuration would be you?

Offline

#9 2023-10-15 14:42:36

b42
Member
Registered: 2023-07-20
Posts: 203

Re: [SOLVED]vim and neovim

So my question is, if ~/.config/nvim does not exist, where does nvim pull its configuration from?

Offline

#10 2023-10-15 15:00:58

hcjl
Member
From: berlin
Registered: 2007-06-29
Posts: 330

Re: [SOLVED]vim and neovim

That's exactly described in the link I posted in #4. Read!

Offline

#11 2023-10-15 19:50:33

b42
Member
Registered: 2023-07-20
Posts: 203

Re: [SOLVED]vim and neovim

okay, sorry I found it.

what do I put in init.vim to have my cursor where I left it before I closed the file?

Offline

#12 2023-10-15 20:09:16

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,653

Re: [SOLVED]vim and neovim

https://www.google.com/search?q=vim%20r … 20position and what does that have to do w/ neovim or anything in this thread?

Offline

Board footer

Powered by FluxBB