Birmingham mumbai


Integrated Development Environment



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

Integrated Development Environment
 (
IDE
). In the example we 
just used, we were able to find and replace all occurrences of a string with another 
string. This was also an example of the types of tasks we carry out in command 
mode, which allows us to manipulate text and enter more advanced commands. 
With this admittedly contrived example, you can immediately see the value of 
having multiple modes in 
vim
.


Chapter 5
[
 127 
]
I've been using 
vim
 for about 8 years or so, because I can never seem to figure out 
how to exit it. Okay, to be fair, that joke is getting to be a bit old now. If you've 
already been using Ubuntu or any other Linux distribution for a while, that joke 
probably made you cringe a little. If that was the first time you've seen it, then I'm 
glad I was the one that introduced you to it—for some reason, 
vim
 has a reputation 
of being difficult to exit. But that's not really true at all, it's actually quite easy. In 
command mode, you simply enter 
:q
 to exit the editor:
:q
If you've made changes, the 
:q
 command won't let you exit, but you can force exit 
if you add an exclamation mark, so the command becomes 
:q!
. If you'd also like to 
save changes while exiting, add 
w
, so the command inside 
vim
 would become:
:wq
Essentially, we're exiting the editor (
q
) and writing the file at the same time (
w
). In 
command mode, commands start with a colon (
:
) and then the actual command. 
There are so many commands available that it's impossible to talk about them all 
in one chapter. What I'll do, then, is mention some that I consider to be the most 
important.
First, it's actually possible to run a shell command without leaving 
vim
 by using the 
following command:
:!
The exclamation mark allows you to run a command, and then you type the actual 
command. For example:
:! ls -l /var/log
The previous example will show you the contents of the 
/var/log directory
, and 
then you can press 
Enter
 to return back to 
vim
. The 
:sp
 command is short for 
split
:
:sp /path/to/file


Managing Files and Directories

Download 15,21 Mb.

Do'stlaringiz bilan baham:
1   ...   171   172   173   174   175   176   177   178   ...   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