Tech C**P
15 subscribers
161 photos
9 videos
59 files
304 links
مدرس و برنامه نویس پایتون و لینوکس @alirezastack
Download Telegram
Display line numbers in vim. If a file is open with vim press ESC (if you are in insert mode) and then press colon (:) and type:

set number


The above command will print line numbers in front of each line.

Now if you want to hide line numbers you just need to press colon again and type:

set nonumber


#vim #tricks #line_number #nonumber #number
If you grep a keyword in a text file and wants to print line number of the found keyword use -n with your grep command:

grep -n "hello world" *

#linux #grep #line_number