Birmingham mumbai



Download 15,21 Mb.
Pdf ko'rish
bet176/482
Sana13.01.2022
Hajmi15,21 Mb.
#355107
1   ...   172   173   174   175   176   177   178   179   ...   482
Bog'liq
Mastering Ubuntu Server Gain expertise in the art of deploying, configuring, managing, and troubleshooting Ubuntu Server by Jay LaCroix (z-lib.org)

[
 128 
]
In this case, 
vim
 is able to show you more than one file at a time in the same window, 
effectively splitting the window to show you both files. With 
:split
, or 
:sp
 for short 
(both do the same thing), it will either split the file into two views (the same file open 
in each) or it will show a separate file in the other split, if you give it a filename. This 
command will split the file horizontally:
Figure 5.6: The vim text editor, with two files open in the same window
The previous screenshot 
shows two files open, 
/var/log/apt/history.log
 and 
/var/
log/syslog
. You may also notice that the status bar for each file, at the bottom, shows 
RO
. As you can probably guess, this stands for 
read only
 and displays on the screen 
because I'm viewing files that only 
root
 has access to change, and I didn't use 
sudo
.
To switch between the two files, we can press the 
w
 key twice while holding 
Ctrl

When we do that, our insertion point moves from one split to the other. To exit each 
individual buffer (or the editor itself, if we only have one file open), we can press 
Esc
 
to return to command mode, and then enter the 
:q
 or 
:q!
 command to exit without 
saving changes, or 
:wq
 to exit while also saving changes, just like before.


Chapter 5

Download 15,21 Mb.

Do'stlaringiz bilan baham:
1   ...   172   173   174   175   176   177   178   179   ...   482




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