Update query vim api and unit test