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

后端 未结 5 1936
甜味超标
甜味超标 2021-02-01 00:48

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

I\'m aware of G + o combo.

5条回答
  •  鱼传尺愫
    2021-02-01 01:10

    echo >> myfile.txt && vim -c 'startinsert' + myfile.txt
    

    You can also save the above command in a script and then use $1 instead of myfile.txt, name your script myvim ( or whatever you like ) and always open your files and start writing away instantly.

    myvim myfile.txt
    

提交回复
热议问题