Birmingham mumbai



Download 15,21 Mb.
Pdf ko'rish
bet178/482
Sana13.01.2022
Hajmi15,21 Mb.
#355107
1   ...   174   175   176   177   178   179   180   181   ...   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)

[
 130 
]
Again, 
vim
 is a somewhat advanced editor. Learning the basic functions is fairly 
easy, so knowing how to open, edit, close, and save files is something you can learn 
fairly quickly. The feature set of 
vim
 is so vast that I'm still learning new tricks many 
years after I started using it. To make sure you understand the basics though, let's 
summarize the basic workflow of 
vim
 to help you memorize it. It looks something 
like this:
1.  Open Vim by either typing 
vim
 by itself, or with a filename: 
vim
.
2. 
You start in 
command mode
. This mode is great for running 
vim
 commands. 
Press the 
Insert
 or the 
i
 keys to switch to 
insert mode
.
3.  While in insert mode, you can edit the text by typing with your keyboard and 
moving the cursor around with the arrow keys.
4. 
When you're done editing the file, press 
Esc
 to return to command mode.
5.  To exit without saving changes, enter the 
:q
 or 
:q!
 command. If you do want 
to save changes, enter 
:w
 by itself to save and remain in the editor, or 
:wq
 to 
save and quit 
vim
 at the same time.
Entire books can be written about 
vim
 (and there have been), so it would be outside 
the scope of this book to go into exhaustive detail. In fact, I even have a dedicated 
video tutorial series about it at 
www.learnlinux.tv
 if you're interested in learning 
more. But for now, I'll leave you with a few more useful tips that I think you should 
know.
While in command mode, you can press the 
x
 key to delete a single character, 
wherever the cursor is. You can press the 
d
 letter key 
twice
 in succession to delete an 
entire line. When you do this, that line is also copied into the paste buffer; you can 
paste that line by pressing 
p
.
In addition, I mentioned several times that you can switch to insert mode by pressing 
i
 or 
Insert
. You can also do so by pressing the 
a
 letter key with or without holding 
Shift
. If you don't hold 
Shift
, you'll enter insert mode one character to the right. This 
isn't very useful to me, but typing a capital 
A
 is something I find myself doing a lot, 
which enters you into insert mode while also taking you to the very end of the line. 
Since I often want to start typing after the end of a sentence, this works well for me.
Also, while in command mode, you can type 
Shift
 + 
g
 for a capital 
G
 to immediately 
go to the very end of the file. Alternatively, you can press the 
g
 key 
twice
 in 
succession to move to the very top of the file.


Chapter 5

Download 15,21 Mb.

Do'stlaringiz bilan baham:
1   ...   174   175   176   177   178   179   180   181   ...   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