DEV Community

Cover image for VIM setup
Peter Vivo
Peter Vivo

Posted on

3

VIM setup

I am VS-Code user, but time-to-time I need to work with terminal, even on windows where I use gitbash because that is close to linux shell, which is important when you find yourself some ssh situation for example.
By the way each of those environment vim was installed.
At first time vim seems a very weird. But few round later this editor seems very useful tool for us.

I use this basic setup for vim:

syntax on
set tabstop=2
set shiftwidth=2
set softtabstop=2
set autoindent
set smartindent
set termguicolors
set number
set mouse=a
set cursorline
set encoding=utf-8
set hlsearch
set incsearch
set ignorecase
colorscheme slate
Enter fullscreen mode Exit fullscreen mode

copy this code and:

vim ~/.vimrc
Enter fullscreen mode Exit fullscreen mode

press: p - paste
press: : - change to command mode
write: wq - quit with write.

Few useful vim shortkey:

:q - quit
:q! - quit without save
:e filename - open file
:Ex - open selected file
:help - self doc

Fine coding!

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs