אחד הכלים העוצמתיים והשימושים ביותר בסביבת העבודה של לינוקס הוא כלי ה-VI. כלי זה משמש לצורך עריכה של קבצים בדומה ל-Notepad בסביבת Windows רק עם יכולות חזקות יותר. אחת הבעיות שמשתמשי לינוקס מתחילים חוששים ממנה היא איך לגשת ולערוך קבצים בכלי ה-VI. לצורך כך המדריך הבא יציג איך לבצע עריכה ושמירה בעורך של ה-VI.
נתחיל קודם בהתקנת מערכת VI על סביבת העבודה שלנו.
sudo yum -y install vim
לאחר ביצוע התקנת הכלי נפתח קובץ חדש
vi testfile
לאחר שייצרנו קובץ חדש לעריכה נכתובת מס' שורות בתוך העורך. לצורך תחילת הכתיבה יש ללחוץ על "shift + c".
לצורך סיום עריכת הקובץ נלחץ על כפתור "esc" במקלדת. במידה ונרצה לבצע שמירה של הקובץ נלחץ על כפתור "shift + : + x" פעולה זו תשמור את הקובץ ותוציא אותנו החוצה.
פעולות נוספות שניתן לבצע ב-VI הם:
" shfit + : + wq " – מבצע יציאה מלאה תוך שמירת הקובץ. " shfit + : + q " – מבצע יציאה ללא שמירה. " shift + : q + ! " – מבצע יציאה ושמירה גם אם השינויים האחרונים לא נשמרו.
פעולות שניתן לביצוע בזמן עריכה (טרם כתיבת הפקודות):
a – הוספת טקסט מימין למיקום ההסמן. A – הוספת טקסט בסוף השורה בה נמצא הסמן. i – הוספת טקסט במקום בו נמצא הסמן. I – הוספת טקסט בתחילת השורה בה נמצא הסמן. o – הוספת טקסט יצירת שורה חדשה מתחת לשורה בה נמצא הסמן. O – הוספת טקסט תוך יצירת שורה חדשה מעל השורה בה נמצא הסמן.
3 Comments
magnificent publish, very informative. I ponder why the other specialists of this sector don't
understand this. You should continue your writing.
I'm sure, you have a great readers' base already!
I've been browsing online more than three hours today, yet I never found any interesting article
like yours. It's pretty worth enough for me. In my view, if all website
owners and bloggers made good content as you did,
the net will be a lot more useful than ever before.
magnificent publish, very informative. I ponder why the other specialists of this sector don't
understand this. You should continue your writing.
I'm sure, you have a great readers' base already!
My page: male skin care
Wow, awesome blog layout! How long have you been blogging for?
you make blogging look easy. The overall look of your site is wonderful,
as well as the content!
my web site; mediterranean diet
I've been browsing online more than three hours today, yet I never found any interesting article
like yours. It's pretty worth enough for me. In my view, if all website
owners and bloggers made good content as you did,
the net will be a lot more useful than ever before.
Also visit my web-site – carslot88, http://carslot88-ion-Slot.Flazio.com,