Searching from end of file using VIM

Type G$?XXXX

  • G to go to the end of the file
  • $ to go to the end of the line
  • ? to search backwards
  • XXXX being what you want to search for

You could also do gg?XXXX which goes to the start of the file, then searches backwards, wrapping around to the end of the file. However for large files it can be slow to seek to the start of the file and then immediately to the end of the file.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)