# vim - text editor

# Favourite config

edit config

```bash
vi ~/.vimrc

```

```ini
syntax on
colorscheme desert
highlight Comment ctermfg=Cyan guifg=Cyan

```

# Changing the scheme

Inside of editor

```vim
:colorscheme [tab]

```

Once happy, add to the config

# Indent text in vim

## Using VISUAL mode

before you want to ensure you prefer TABs or SPACEs (and you not prefer TABs).

```
set expandtab

```

Define depth of indention.

```vim
:set shiftwidth=2

```

Enable VISUAL mode `V`, select text, press `>`

## without VISUAL mode

Enable numbering

```vim
:set number

```

Command below will indent lines 9--16 by width configured above.

```vim
9,16>

```

(I use it to correct 2 spaces into 4 spaces.)

undo is your friend, press `u`