improved trigger text detection
vastly improved cursor placement after snippet insert