Make your Shell more comfortable

Published: by Creative Commons Licence

Time to read: 1 minute

My checklist for being more comfortable when dealing with new shells on new systems.

That annoying bell

If you want to disable the annoying bell sound in the shell or vi but cannot disable it via the terminal program than it is possible to disable it in the shell of the system.

Disable shell bell sounds in ~/.inputrc:

set bell-style none

Disable vi bell sounds in ~/.vimrc:

set visualbell
set t_vb=

Disable zsh bell sound in .zshrc:

unsetopt beep


Better vi colors

Often the colors in vi are too dark for a black background. You can change the colorset. Here is the one which I like most of the default sets.

Change vi colorset in ~/.vimrc:

colorscheme elflord

The undiscovered filetype

Sometimes you have a file with a wrong or without an extension. You can manually set the filetype within vi. Let’s assume you have a conf file:

:set syntax=conf


:set filetype=conf

Copy / Paste stairs

You possible had the situation where pasting something into vi results in nasty indent stairs because vi indents each line more than the last? You can get rid of this if you set vi to paste mode before:

:set paste