title: Vim: How to go to the declaration (of a class, method, function, variable, etc)
body: <p>Right now I am working on a file which uses many classes, methods, functions, variables, etc. Is it possible to go to the declaration of all of them? Please, take into account that some of those declarations are in the same file but others are in other files (which may not be opened and you do not know where the declarations are but they do exist). What would happen if the declaration is one level up in the directory? and what about if it is one level down?</p>
  
  <p>Is this done in a different way according to the programming language we are talking about or the procedure to find the declarations is the same regardless of the language?</p>
  
  <p>I have been reading and it seems the solution is related to tags. However, I would like to know how this can be achieved (step by step), especially taking into account that we are talking, in some cases, of definitions in other files. </p>
  
  <p>I know this can be done with IDEs but I would like to know how much different this can be achieved with vim. </p>
  
  <p>I only have a fresh install of Vim. I have not installed any plugins yet but willing to do if it is necessary. Perhaps this can be done without and with plugins. </p>
  
  <p>Thanks in advance!</p>