Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Using vi on unix...

  • 15-02-2002 10:38am
    #1
    Posts: 0


    I don't want to take away posts from the poll on vi or emacs but after seeing that, I was wondering if anyone could help in starting to use vi...i type vi at the command line and all this ~ comes up at the side of the screen.

    I can't type anything or do anything unless i suspend the process.
    Could anyone point me in the right direction of actually getting somewhere with it, as there must be something for it to do, apart from displaying scores of ~ ?

    Thanks :)


Comments

  • Closed Accounts Posts: 662 ✭✭✭Ba$tard


    Moonhawk,

    You are in VI then.... ~ denotes a null line.

    Pressing 'I' (insert) or 'A' (append) will put you to type mode.
    Type away then....

    Pressing escape will bring you back to command mode, where you can do a : then w (write) and then q (to quit)

    Go on and read the Vi documentation.....plenty of fun...
    Very easy when you get used to it ;)


  • Registered Users, Registered Users 2 Posts: 14,149 ✭✭✭✭Lemming


    follow these two links. Quick, clean and to the point about using vi :)

    Intro to vi
    Using vi

    Have fun


  • Closed Accounts Posts: 5,564 ✭✭✭Typedef


    You are probably in command mode.

    for example;

    Typedef@Uber_Slackware$ vi hello.c

    vi starts and we are probably in command mode ok, so in command mode we can do lots of fun things like type i if I want to input or a if I want to append or whatever vi command you want to use, if we make a mistake press escape now type :viusage, this should give you some information on vi's usage /or something\


  • Closed Accounts Posts: 5,564 ✭✭✭Typedef


    viman.gif


  • Closed Accounts Posts: 296 ✭✭moist


    If you have vim installed you can use
    the command vimtutor to start the vim tutor funnily enough :)
    Its a little bit more friendly than vi, and also has a lot more features.

    Also you should try to get yourself a decent vimrc theres a minimal sample on www.vim.org
    In the meantime there are 2 commands that really make things easier
    set bs=2
    set nocompatible
    

    Stick that (append?) in ~/.vimrc


  • Advertisement
  • Closed Accounts Posts: 7,563 ✭✭✭leeroybrown


    When in Vi:

    At any time you want to use an editor command hit the Escape key.

    Then i for insert

    dd for delete the current line

    :w to write to file

    :q to quit

    :q! to quit without saving.


Advertisement