----- 
maTeidotonE
best viewed with NetSurf
My programs Games Other programs
GNU/Linux Computers & programming Music & movies
Other topics What's new + README Contact
---------------------------------------------------------------------------------------
Updated 2025-12-05
Vi IMproved text editor
Vi is the default text editor that always comes with GNU/Linux or some UNIX operating system:
 
Vi IMproved Typing vi Vi "Type :q<Enter> to exit"

Vi Press i (insert mode) and type text Vi Press Escape and type w: filename, then Enter, to save the text file

The help page says "Getting started: Do the Vim tutor, a 30-minute interactive course for the basic commands, see vimtutor.", so...

:q<Enter>
vimtutor


vimtutor Welcome to the VIM Tutor vimtutor Lesson 1.3: [...] ** Press x to delete the character under the cursor. **

A few commands in vi
 
Open n files:

vi file_1 file_2 ... file_n

Display the list of opened files:

:buffers<Enter>

or

:files<Enter>

Go to the next or previous file:

:n<Enter>
:N<Enter>

Search for phrase:

/phrase<Enter>

Then with n search it again, or with N - in the opposite direction.
 
Modify every occurrence of a text in the whole file:

:%s/original/modified/g<Enter>

Select wrapping the lines or not:

:set wrap<Enter>
:set nowrap<Enter>

Delete a line:

dd

or 3 lines:

3dd

Undo:

u

Redo:

Ctrl + r

Visual:

v

Then select the text with the arrows, press y (from yank) and p (from put) where you want to copy it.
---------------------------------------------------------------------------------------
© 2025 Matei. No cookies®