You are not logged in.

#1 2025-06-01 15:47:36

bala451987
Member
Registered: 2025-01-22
Posts: 38

Configuring VIM

I'm using Arch Linux with XFCE and would like to configure Vim for development purposes. I couldn’t find a .vimrc file, though I did find .viminfo. I’m looking to install useful plugins and set up Vim properly for development. Could someone please guide me through the process of successfully configuring it?

Offline

#2 2025-06-01 16:45:10

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,477
Website

Re: Configuring VIM


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Online

#3 2025-06-02 03:33:52

bala451987
Member
Registered: 2025-01-22
Posts: 38

Re: Configuring VIM

I understand that Vim’s user-specific configuration is typically located in

~/.vimrc

, and user Vim files reside in

~/.vim/

. Global configurations are in

/etc/vimrc

, and files like

defaults.vim

and archlinux.vim are found in /usr/share/vim/.

However, I don’t see the

~/.vimrc

file or the ~/.vim/ directory in my home folder. On the other hand, the global files do exist. When I checked

/etc/vimrc

, I noticed the following lines:

" do not load defaults if ~/.vimrc is missing
"let skip_defaults_vim=1 

Given this, should I manually create my own ~/.vimrc file and ~/.vim/ directory if I want to customize Vim for my user?

Last edited by bala451987 (2025-06-02 03:35:36)

Offline

#4 2025-06-02 03:42:26

dakota
Member
Registered: 2016-05-20
Posts: 417

Re: Configuring VIM

bala451987 wrote:

Given this, should I manually create my own ~/.vimrc file and ~/.vim/ directory if I want to customize Vim for my user?

Yes.

For example my ~/.vimrc

$ cat .vimrc 
~~~~~~~~~~~~~~~~
filetype plugin on
filetype indent on
syntax enable
set number
set noswapfile
set hlsearch
set ignorecase
set incsearch
set background=dark
colorscheme sorbet

... and my ~/.vim/ folder only has a single folder called "colors" which contains

ls ~/.vim/colors/
~~~~~~~~~~~~~~~~
elflord.vim  koehler.vim  modest.vim  solarized.vim  sorbet.vim  test.vim  torte.vim

Cheers,

Last edited by dakota (2025-06-02 03:49:36)


"Before Enlightenment chop wood, carry water. After Enlightenment chop wood, carry water." -- Zen proverb

Offline

#5 2025-06-02 03:48:35

bala451987
Member
Registered: 2025-01-22
Posts: 38

Re: Configuring VIM

But i don't find either .vim .vimrc at the home folder. So should i create one or to edit the file with in /etc/vimrc.

Last edited by bala451987 (2025-06-02 03:56:12)

Offline

#6 2025-06-02 05:21:44

cloverskull
Member
Registered: 2018-09-30
Posts: 277

Re: Configuring VIM

Create the ~/.vimrc from scratch in your home folder. Don't change the one in /etc/ - this should be a user level configuration, not a global one.

Offline

#7 2025-06-02 06:18:57

bala451987
Member
Registered: 2025-01-22
Posts: 38

Re: Configuring VIM

Yes created and given the above text within it and now my next question is, how can i add plugins for example any plugins like tree-view and s on.

Offline

#8 2025-06-02 07:28:37

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

Re: Configuring VIM

By reading the wiki: https://wiki.archlinux.org/title/Vim#Plugins
https://slash7.com/2006/12/22/vampires/

Vim is extensively documented ( https://www.vim.org/docs.php ) and there's also https://vim.fandom.com/wiki/Vim_Tips_Wiki but the learning curve for the editor is steep.

If your plan is to ask a question for every step on the road ("ok, now how do I exit vim?"), the only usable feasible is to use sth. like nano or mcedit as console text editor.

Offline

#9 2025-06-02 07:36:44

bala451987
Member
Registered: 2025-01-22
Posts: 38

Re: Configuring VIM

Thanks Seth. Understand. I am beginner. I have some basic comments how to use vim. But i think in the aspects of configuration could be careful.

Offline

Board footer

Powered by FluxBB