vim - Detect Backspace in VimL -
i'm attempting detect whenever backspace hit when typing in specific scenario in vim. i'm using getchar() grab general characters user input. ideally, i'd detect backspace keystroke in manner. thinking of using stty somehow, i'm not of yet. suggestions?
if using getchar can check whether user typed backspace using
let char=getchar() if char is# "\<bs>" … endif
. assumes vim configured (only terminal vim, gvim not have problem). of time is, in place of fixing terminfo or, more likely, using set <bs>={<c-v><bs>}
, users map characters produced when pressing <bs>
. can’t helped.
Comments
Post a Comment