vim
Vi IMproved (vim)
vi 호환 text editor, 유용한 소스 코드 편집 기능이 많이 추가된 vi 확장판. 초기에는 Vi IMitation
을 뜻했다고 한다.
일반적인 에디터나 워드 프로세서와 방향 조작부터 다르고 단축키를 무조건 사용해야하는 데 너무 많아서 어렵다. 그런데 아는 만큼 생산성이 늘어난다.
vimtutor
vim 을 설치하게 되면 같이 설치된다.
vimtutor
명령을 수행하면 아래와 같이 vim editor에서 tutorial 문서를 하나 열어주는데 읽어가면서 바로바로 따라해볼 수 있다.
===============================================================================
= W e l c o m e t o t h e V I M T u t o r - Version 1.7 =
===============================================================================
Vim is a very powerful editor that has many commands, too many to
explain in a tutor such as this. This tutor is designed to describe
enough of the commands that you will be able to easily use Vim as
an all-purpose editor.
The approximate time required to complete the tutor is 25-30 minutes,
depending upon how much time is spent with experimentation.
ATTENTION:
The commands in the lessons will modify the text. Make a copy of this
file to practise on (if you started "vimtutor" this is already a copy).
It is important to remember that this tutor is set up to teach by
use. That means that you need to execute the commands to learn them
properly. If you only read the text, you will forget the commands!
Now, make sure that your Shift-Lock key is NOT depressed and press
the j key enough times to move the cursor so that Lesson 1.1
completely fills the screen.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 1.1: MOVING THE CURSOR
** To move the cursor, press the h,j,k,l keys as indicated. **
^
k Hint: The h key is at the left and moves left.
< h l > The l key is at the right and moves right.
j The j key looks like a down arrow.
v
1. Move the cursor around the screen until you are comfortable.
2. Hold down the down key (j) until it repeats.
Now you know how to move to the next lesson.
3. Using the down key, move to Lesson 1.2.
NOTE: If you are ever unsure about something you typed, press <ESC> to place
you in Normal mode. Then retype the command you wanted.
NOTE: The cursor keys should also work. But using hjkl you will be able to
move around much faster, once you get used to it. Really!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 1.2: EXITING VIM
!! NOTE: Before executing any of the steps below, read this entire lesson!!
1. Press the <ESC> key (to make sure you are in Normal mode).
2. Type: :q! <ENTER>.
This exits the editor, DISCARDING any changes you have made.
3.
...
..
.