With vimscript, this is easy to do:
if getline(line_number_1) ==# getline(line_number_2) echo 'hello' endif
where * line_number_1 * and * line_number_2 * are integers. You can calculate the current line number using line('.') .
See :help getline() and help line() . More complete documentation help eval.txt .
Benoit
source share