2015-09-12

:set relativenumber

Recently I found a setting in vim -- :set relativenumber, that gives a better life. From most tutorials or .vimrc references, I usually see :set number to show line number for better tracking codes. With only line number, however, I need to calculate range of codes in mind for deleting or yanking and often get wrong number. With :set relativenumber, there is no need to manually calculate line numbers. All relative line distances, either up-side or down-side, from current line are shown on side-bar. This is helpful to manipulate several lines of text at one time.