title: In vim, how to check the #ifdef macro I am currently inside?
body: <p>I use vim/cscope/ctags to browse C source code. Many a times I find a macro is defined is twice or even more times using <code>#ifdef</code>s and I am looking at the definition I don't want.</p>
  
  <p>So my question is, is there any shortcut in vim using which I can find out if the line I am looking at is inside a <code>#ifdef</code> macro ?</p>
  
  <p>I can get the list of all definitions using <code>:tselect</code> but I am looking for some shortcut like the one (below example) I use for finding the function I am in.</p>
  
  <pre><code>" Show function name                                                               
  fun! ShowFuncName()                                                                
          let lnum = line(".")                                                       
          let col = col(".")                                                         
          echohl ModeMsg                                                             
          echo getline(search("^[^ \t#/]\\{2}.*[^:]\s*$", 'bW'))                     
          echohl None                                                                
          call search("\\%" . lnum . "l" . "\\%" . col . "c")                        
  endfun                                                                             
  map f :call ShowFuncName() &lt;CR&gt;     
  </code></pre>
  
  <p>Thanks.</p>