insert code when selecting code snippet