Linux with Operating System Concepts



Download 5,65 Mb.
Pdf ko'rish
bet63/254
Sana22.07.2022
Hajmi5,65 Mb.
#840170
1   ...   59   60   61   62   63   64   65   66   ...   254
Bog'liq
Linux-with-Operating-System-Concepts-Fox-Richard-CRC-Press-2014

Line Motions
W/B (forward /backward 1 word)
E/e (forward to end of word/punctuation)
w/b (forward/backward to next word word or to punctuation)
Word1 Word2
Word4.
Word3-is -hyphenated 
Page Motions
Control+u - back 1 screen
Control+b - back 1/2 screen
Control+f - forward 1 screen
Control+d - forward 1/2 screen
H - move cursor to top of screen
M - move cursor to middle of screen
L - move cursor to bottom of screen
FIGURE 5.1 
Cursor movements in vi.


Linux Applications

163
in, use dd. The commands 
dd

dw,
and 
db
cut the items into a buffer. The command 
yy
copies the current line into a buffer. To retrieve the contents of the buffer, use 
p
or 
P
(put 
or paste) where 
p
pastes in a line immediately above the line of the cursor’s position and 
P
pastes in a line immediately after the line of the cursor’s position. The combination of 
dd
/
dw
/
db
and 
p
/
P
perform cut and paste while 
yy
and 
p
/
P
perform copy and paste. Another 
interesting command is 
xp
, which transposes the current and next character. In fact, it is 
a combination of the 
x
command to delete the current character and 
p
to insert the item 
in the buffer immediately after the current character. So, for instance, if you have abc and 
the cursor is under b, typing 
xp
deletes b and pastes it after c. The command 
J
joins the 
current line and the next line, thus removing the line break (\n) from the end of the cur-
rent line.
There are several different search options. The search allows you to input either a string 
or a single character to search for. In the case of a string, the string can be literal charac-
ters or a regular expression (we cover regular expressions in the next chapter). To search 
forward from the cursor on for 
string
, use 
/string <
enter
>
and to search backward
use 
?
string

. Once an instance of 
string
has been found, you can continue to 
the search using /
<
enter
>
or 

<
enter
>
for additional forward or backward searches, 
respectively.
You can search for a single character but only on the current line. The commands are 
f
char

F
char

t
char
,
and 
T
char
where 
f
and 
t
search forward for the character 
char

positioning the cursor on the character or immediately before the character, respectively, 
and 
F
and 
T
search backward on the line for the character 
char
, positioning the cursor on 
the character or immediately before the character, respectively. The command 
;
is used to 
repeat the last 
f

F

t
, or 
T
command. You can also search forward or backward in a docu-
ment for a parenthesis. If the cursor is resting on an open or close paren, the % key will 
move the cursor to the corresponding close or open paren. For instance, if you have “the 
value of x (heretofore unknown) is not a concern” and the cursor is on the ‘)’, pressing % 
will move it to the ‘(‘.
All file commands start with a 
:
and are followed by one or more characters to denote 
the command. To open the file 

Download 5,65 Mb.

Do'stlaringiz bilan baham:
1   ...   59   60   61   62   63   64   65   66   ...   254




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish