title: VIM 7 and cscope: Using "cscope find f" inside a keyboard mapping for switching between files
body: <p>I usually hop between files on my cscope-indexed codebase by using </p>
  
  <pre><code>:cscope find f &lt;filename&gt;
  </code></pre>
  
  <p>I'm trying to define a keyboard shortcut to prevent me having to type ":cscope find f" everytime. Pressing this shortcut would bring up an input prompt, to which I'll enter part of a filename in the cscope database. If there are multiple files, it would show up the list of files, from which I can select the file I want to go to. I've got to this much so far, but since I'm not at all proficient with VIM scripting, I'm unable to complete it. (what I've coded so far is taken from another question, thanks to <a href="https://stackoverflow.com/users/349708/eelvex">Eelvex</a>) .</p>
  
  <p>Could someone correct the below script for me ? 
  I'm getting numerous errors while I try to use this shortcut</p>
  
  <pre><code>function! GetPat()
    call inputsave()
    let filename = input("Enter filename: ")
    call inputrestore()
    return filename
  endfunction
  map ` :cscope find f '.GetPat().'&lt;CR&gt;
  </code></pre>