title: Vim: nnoremap to a method inside a method
body: <p>I have an object, which has a function, that can activate a remap with a method.
  This remaps some key to another method.
  However when I tried my attempt below, it will tell, that it doesn't know what <code>self</code> is, which seems obvious, as a remap just parses some text, but I can't figure out how else to do it.</p>
  
  <p>I could just do what <code>activate()</code> does outside of a function, however this attempt here would save me quite some work.</p>
  
  <pre><code>" the prototype
  let Object = {}
  
  " constructor
  function! Object.new()
      let newObject = copy(self)
      return newObject
  endfunction
  
  function! Object.activate()
      nnoremap a :call self.foo()
  endfunction
  
  function! Object.foo()
      ...
  endfunction
  </code></pre>