A mechanism includes a first push button at one side and a spring-biased second push button at the other side such that pressing the first push button will lock a slide bar of a vise and a fixed jaw carrier thereof by inserting a first pin of the first push button into one positioning hole of the slide bar, pressing the second push button to insert a second pin thereof into one positioning hole by pushing the first pin out of one positioning hole with the spring being compressed, and releasing the second push button will cause the spring to expand to push the second push button outwardly and push the second pin out of one positioning hole for unlocking the slide bar.