MJay

vi / vim: Jump To End Of File Command(Scrap) 본문

Linux

vi / vim: Jump To End Of File Command(Scrap)

MJSon 2017. 7. 4. 18:40

vi / vim: Jump To End Of File Command

Posted on August 6, 2010in Categories , , last updated August 14, 2013

I‘m using vim as a text editor and editing a large code file written in python. How do I jump to end of file using vim text editor under Apple Mac OS X Unix operating systems?

You can save a lot of time by using appropriate movement commands in vi or vim text editor. For large file the cursor keys are not the best choice. To move to end of file just type G (press ESC and type capital G):
G
Sample outputs (jumping from 1st line to line # 82):

vim-eol.gif.webp

Fig.01: vi/vim command demo for EOL jump

You can jump back to beginning of file by typing any one of the following command
1G
OR
gg
You can jump to line number 700 (press ESC type 700G)
700G

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin and a trainer for the Linux operating system/Unix shell scripting. He has worked with global clients and in various industries, including IT, education, defense and space research, and the nonprofit sector. Follow him on Twitter, Facebook, Google+.


'Linux' 카테고리의 다른 글

HTOP에 대해서 알아보기  (0) 2017.07.14
I/O 란  (0) 2017.07.14
ScalaPack 설치 과정  (0) 2017.06.19
dpkg란  (0) 2017.06.05
Python Console 값 파일 text로 저장하기  (0) 2017.06.05