Find the answer to your Linux question:
Results 1 to 2 of 2
today, i begin to learn linux, i think it's a dear diary moment.now i want someone to help me with the following questions. 1,i access my server via secureCRT, when ...
  1. #1
    Just Joined!
    Join Date
    Mar 2010
    Posts
    14

    VI and vim and how to set default character?

    today, i begin to learn linux, i think it's a dear diary moment.now i want someone to help me with the following questions.

    1,i access my server via secureCRT, when i typed the
    Code:
    vim
    in it, it shows
    Code:
    -bash: vim: command not found
    . how to install the vim? my linux version is centos.

    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
    ?how to rename the file, which i created by VI and had some contents in the file.

    many thanks.

  2. #2
    Trusted Penguin elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    2,298
    1:
    Try vi instead of vim (it should be installed) but to install depends on your architecture

    run the command
    Code:
    yum search vim-enhanced
    and then you install what-ever-the-package-name-was; for 64 bit that would be
    Code:
    yum install vim-enhanced.x86_64
    if my memory serves

    2:
    Add
    Code:
    set enc=utf-8
    to your .vimrc file

    3:
    I think Shift + Insert will paste from another program else p will put while in command mode

    4:
    That will create a directory, try touch instead.

    And a clue to the last question... Riddle me this, Riddle me that, if I rename a file, where's the old one at?

    (Sorry watched the 1966 Batman movie again last night)
    If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)


    My new blog. It's probably not as good as I think it is.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...