[vim keymap] Define a vim option, register beforeSelectionChange handler

Issue #1084
Issue #1630