First of all, you need to know the "keycode" of your «Caps Lock» key,
for this you can use:
Just press the «Caps Lock» key and you will se a message containing the "keycode".
Now add this to your ~/.Xmodmap file, if you don't have it, you can create it.
keycode YourKeyCode = Escape
Now you can load the file:
And that's all.
You can use an nearest «Esc» key with Vim.