Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim - how to start inserting at the end of the file in one step

Tags:

vim

Is there a single shortcut to start inserting in the new line at end of the file?

I'm aware of G + o combo.

like image 516
sumek Avatar asked Nov 06 '08 09:11

sumek


People also ask

How do I scroll to the end of a file in vim?

Move cursor to end of file in vim In short press the Esc key and then press Shift + G to move cursor to end of file in vi or vim text editor under Linux and Unix-like systems.

How do you add a word at the end of each line in vim?

In visual block mode, you can press I to insert text at the same position in multiple lines, and you can press A to append text to each line in a block.

How do I start vim in insert mode?

To go into INSERT mode from COMMAND mode, you type i . To go back to COMMAND mode, you type the esc key. vim starts out in COMMAND mode. Over time, you will likely spend more time in COMMAND mode than INSERT mode.

How do you append to the end of the line in vi )?

Type A to add text to the end of a line. To see how this command works, position the cursor anywhere on a text line and type A . The cursor moves to the end of the line, where you can type your additions. Press Esc when you are finished.


1 Answers

There's also the command line option "+":

 vim + myfile.txt 

Will open myfile.txt and do an automatic G for you.

like image 64
Cyber Oliveira Avatar answered Sep 18 '22 13:09

Cyber Oliveira