centos vi and vim.
today, i begin to learn linux, i think it's a dear diary meoment.now i want someone to help me with the following questions.
1,i access my server via secureCRT, when i typed the Code:
vim Code:
-bash: vim: command not found 2, when i typed some chinese characters in VI, it shows unnormal. maybe i should set the default character to UTF-8. but i don't know how to set it. 3,i want to copy a html file code to VI, how do i do? 4,how to create a file. like this? Code:
mkdir filename many thanks. |
1. about the VI i don't know, when i want to edit a file or make a file i just type
Code:
vi filename 3. you copy text into a file you're editing like, select the text you want to copy, hit CTRL+C and when you are in the VI press the RIGHT MOUSE BUTTON. anyways, this works for me 4.you create a file with Code:
touch filename Code:
vi filename Code:
mkdir filename i hope this helped you a little bit further ;) |
i have installed the vim. but it looks like the same as vi. when i typied vi or vim, the screen both show
Quote:
|
if they are the same, then i don't think there is any difference between them...
so choose one of them and you'll be fine.. |
Quote:
In other distros (like Arch), "vi" is actaully the original "vi" and you can install "vim" separately. |
[QUOTE=runeveryday;4352823]today, i begin to learn linux, i think it's a dear diary meoment.now i want someone to help me with the following questions.
1,i access my server via secureCRT, when i typed the Code:
vim Code:
-bash: vim: command not found 2, when i typed some chinese characters in VI, it shows unnormal. maybe i should set the default character to UTF-8. but i don't know how to set it. 3,i want to copy a html file code to VI, how do i do? Quote:
To create an empty file, use the "touch" command. Also, opening an editor with the name of a non-existant file will usually create it. Quote:
|
vi vs vim;
As per post #5, in most distros, the vi cmd is aliased to vim (different to a symlink). HOWEVER, vi is usually also actually installed as well. Try 'which vi' to find it if you really want vi not vim. Or try 'which vim' and search the reported dir for vi. HTH |
If CentOS behaves like Fedora, running vi will get you a minimal version of vim, whereas running vim gets you the full-blown editor. One obvious difference is syntax highlighting - vim does it; vi doesn't.
|
All times are GMT -5. The time now is 12:13 AM. |