If you have vim >= 7 (I think) you can use autocmd with an event SwapExists. There you can do all from very simple things to very complicated.
Here is a simple example to put in your ~/.vimrc:
autocmd SwapExists * let v:swapchoice = "o"
If a swap file exists, this event will be triggered. The autocmd above will simply open the file in read only mode.
If v:swapchoice gets a value in an autocmd it will not prompt you what you want to do. The values you can use is listed here v:swapchoice.
For a very advanced autocmd see here: editexisting.vim
The script there can already be on your server from the installation of vim, search for editexisting.vim.
You can position the cursor on the first match using the -s (script) option. According to the vim manual:
-s{scriptin}
The script file {scriptin} is read. The characters in the file are interpreted as if you had typed them. The same can be done with the command ":source!{scriptin}". If the end of the file is reached before the editor exits, further characters are read from the keyboard.
You could use a temporary file with the keystrokes, or even (if you are using bash) process substitution. For example:
#!/bin/bash
vim -s <(printf '/c\n') tmp.txt
This approach works with more complicated searches than a single character.
Best Answer
There are many ways:
Using the intercative shell in vim
When in the editor -
Using Bang(!)
As DopeGhoti suggested -
From this link.
Add this to your
~/.vimrc
Then,in vim,
Again from the same link in #3
Use this command: