DEV Community

Cover image for My basic vim setup
Ethan
Ethan

Posted on

10 1

My basic vim setup

Introduction

Hello :)

Just thought I'd share my .vimrc settings from my recently installed Arch Linux machine.
I've never actually thought too deep about what each of the options do so I decided to look each of them up.


Very very basic .vimrc

Well then here's my very simple .vimrc file:
I'll try to explain what each option does below.

set nocompatible
syntax on
set modelines=0
set number
set encoding=utf-8
set wrap

set tabstop=2
set shiftwidth=2
set softtabstop=2
set autoindent
set copyindent
set expandtab
set noshiftround

set hlsearch
set incsearch
set showmatch
set smartcase

set hidden
set ttyfast
set laststatus=2

set showcmd
set background=dark
Enter fullscreen mode Exit fullscreen mode

Very very basic explanation

nocompatable because I don't need "vi" compatability.

Enabling syntax makes it easy to read code via vim.

I don't need modelines so I have set it to 0

Enabling number allows me to see the line number of each line.

After that I have my tab spaces etc set up and search highlighting.

hidden causes unsaved files to be hidden instead of closed when opening a new file.

ttyfast improves smoothness when there is multiple windows.

laststatus is set to 2 so that the last window will always have a status line.

showcmd shows the command ;) recommended to switch this off if your terminal is slow.

background is set to dark as I tend to like dark themes/backgrounds

Next I'm looking into installing some plugins. If you have any recommendations please let me know. :)

AWS Industries LIVE! Stream

Watch AWS Industries LIVE!

Watch Industries LIVE! to find out how the AWS cloud helps solve real-world business challenges.

Learn More

Top comments (0)

Jetbrains image

Is Your CI/CD Server a Prime Target for Attack?

57% of organizations have suffered from a security incident related to DevOps toolchain exposures. It makes sense—CI/CD servers have access to source code, a highly valuable asset. Is yours secure? Check out nine practical tips to protect your CI/CD.

Learn more

👋 Kindness is contagious

Dive into this informative piece, backed by our vibrant DEV Community

Whether you’re a novice or a pro, your perspective enriches our collective insight.

A simple “thank you” can lift someone’s spirits—share your gratitude in the comments!

On DEV, the power of shared knowledge paves a smoother path and tightens our community ties. Found value here? A quick thanks to the author makes a big impact.

Okay