Question:
could you tell me how to use the VI text editor?
2009-05-07 13:44:12 UTC
can you tell me how to start using the vi editor. I know you press i to go into insert mode and press escape again to go into command mode and how to go up down left right is kjhl in command mode?. Can you tell me some common other things for beginners to learn
Four answers:
radhi
2009-05-08 03:31:35 UTC
How do I use the vi text editor?

The vi text editor has three modes: command mode, input mode, and ex mode.



Command mode

When starting, vi begins in command mode. If you are ever unsure which mode you're in, press Esc to return to command mode. In command mode, you can move around with the arrow keys, or by using the vi movement keys, as follows:



h left

j down

k up

l right



Several vi commands are listed in the table below:



Command Action

Ctrl-b Go back one page

Ctrl-f Go forward one page

x Delete the character the cursor is on

Shift-x Delete the character before the cursor

dd Delete the current line

Shift-d Delete everything from the cursor to the end of the line

u Undelete a line you just deleted

Shift-u Undo all changes to the current line

Shift-z-z Save your file and exit the vi editor



Note: In command mode, you can type a number before pressing a command key to repeat the command multiple times. For example, to delete eight lines from the cursor position, you could press 8 and then type dd .



Input mode

The input mode lets you insert or append text. To insert text before the cursor's current position, in command mode, press i . Similarly, to append after the cursor, you can type a . Remember that you can't move around with the cursor keys in this mode. When you're done entering text, press Esc to go back to command mode.



Ex mode

The ex mode is an extension of command mode. To get into it, press Esc and then : (the colon). The cursor will go to the bottom of the screen at a colon prompt. Write your file by entering :w and quit by entering :q . You can combine these to save and exit by entering :wq . However, if you're finished with your file, it's generally more convenient to type Shift-z-z from command mode.
?
2017-01-11 20:55:16 UTC
salam reza joon shaya elate inke oonjoori dide mishe ineke vagti adad az 2 ragami be 3 ragami (az ninety 9 be one hundred) tagrir peyda mikone formatesho khoob tarif nakardi . yani dar khooroojit ta 2 ragamo mishnase. age toonesti noe formate oon adadd haro bezar conventional. badesh hatman khooroojit be forme txt bashe ta betooni ba exel bazesh koni. bazam karam dashti geda digital mail bezan. kelas nazar 2ohdoor.
2009-05-07 14:04:35 UTC
http://www.cs.colostate.edu/helpdocs/vi.html are some basic commands. Or http://www.cs.rit.edu/~cslab/vi.html



(There's a reason it's called VILE.)
2009-05-07 13:48:40 UTC
vote plz type in Can u pray to nandi shiva's bull?


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...