¿Ir a la primera línea de un archivo en vim?


¿Cómo voy a la primera línea de un archivo en vim ?

Author: Jean, 2011-04-01

3 answers

En modo de comando (presione Esc si no está seguro) puede usar:

  • gg,
  • :1,
  • 1G,
  • o 1gg.
 316
Author: Lazer,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-08-11 23:28:31

Escriba "gg" en el modo de comando. Esto lleva el cursor a la primera línea.

 26
Author: andrew,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2011-03-31 23:01:10

Si está utilizando gvim, puede presionar Ctrl + Home para ir a la primera línea. Del mismo modo, Ctrl + End va a la última línea.

 2
Author: Bharat Lagali,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-08-11 23:25:57