'vi' Editor for noobs, A beginner's guide.
'VI' is abbreviation for the visual
. visual
is command for another editor(line editor) in UNIX that is Extended(EX).
vi Editor is the spinal cord of Linux terminal, it has been inside it thriving for years.
Now it comes with name of VIM where IM stands for improved.
It is cross platform and is found on every Linux distro.
If you have freshly installed Linux and now want your feet wet in it, its time to master terminal because this is something which will give you ease with any Linux platform.
VI editor is not just another text editor, it has its own importance in the hearts of shell scriptors. If used with full capabilities it is none less than IDE(Integrated development environment) or in fact is an IDE.
It is licensed under GNU and open source is backing is responsible for its continuing growth. vi editor is text editor but graphical avatar gVim is also available.
Here are some tips for using VI or VIM editor:
- For opening vi editor first open terminal and write:
vi filename
Now hit i for insert.
- For exiting writing mode hit escape.
- Write
man vi
any time for help pages for vi.
Shift+G
will take you to the last line.- If finished with your work you can save your work by hitting
:w
orEsc+Z+Z
.
- If don't want to save the work and simply quit then
:q
.
:wq
for t\quick save and exit.
yy
is used for copying andp
for pasting.
:n
moves to nth line.
:s/search_string/replacement_string/
s
is for searching.Line number can also be specified after colon for the replacement.
%s
will do the same purpose.:g
will search whatever specified and commit specified action
:g/search pattern/command
- Contrary to above
:v/string/d
This will delete every line which does no contain specified string, d deletes the string.
:g/^$/d
It deletes every empty line.
Ain't it enough for a beginner.
For Vi, Vim or gVim click :
DOWNLOAD
- Share this on del.icio.us
- Digg this!
- Stumble upon something good? Share it on StumbleUpon
- Share this on Reddit
- Add this to Google Bookmarks
- Tweet This!
- Share this on Facebook
- Share this on Mixx
- Subscribe
- Buzz up!
- Share this on Linkedin
- Submit this to DesignFloat
- Share this on Technorati
- Submit this to Script & Style
- Post this to MySpace
- Share this on Blinklist
- Share this on FriendFeed
- Seed this on Newsvine