Find the answer to your Linux question:
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 29
Hi, is that any command to select the whole vim editor document? AND what is the command to go to the last line of the page...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Dec 2005
    Location
    Singapore
    Posts
    234

    vim editor


    Hi,
    is that any command to select the whole vim editor document?
    AND what is the command to go to the last line of the page
    Proper Planing is a way of success

  2. #2
    Banned
    Join Date
    Jul 2004
    Posts
    947
    dare i say...
    Code:
    man vim

  3. #3
    Linux Newbie
    Join Date
    Dec 2005
    Location
    Singapore
    Posts
    234
    Quote Originally Posted by the_guy_dressed_in_black
    dare i say...
    Code:
    man vim
    trying very....hard to find
    Proper Planing is a way of success

  4. $spacer_open
    $spacer_close
  5. #4
    Linux User
    Join Date
    Sep 2003
    Posts
    254

    Re: vim editor

    Quote Originally Posted by thcc2
    Hi,
    AND what is the command to go to the last line of the page
    G and u should go to the main website www.vim.org u've got some more docs to play with vim.
    Vim is a nice toy but to be used to it u should play a little with it

  6. #5
    Linux Newbie
    Join Date
    Dec 2005
    Location
    Singapore
    Posts
    234

    Re: vim editor

    Quote Originally Posted by Gnux
    Quote Originally Posted by thcc2
    Hi,
    AND what is the command to go to the last line of the page
    G and u should go to the main website www.vim.org u've got some more docs to play with vim.
    Vim is a nice toy but to be used to it u should play a little with it
    Thks, that is a vi tutorial i think, but that is not for vim, i still perfer vim because it is more colourful
    Proper Planing is a way of success

  7. #6
    Just Joined!
    Join Date
    Aug 2005
    Location
    Berkshire, UK
    Posts
    80
    Look a bit more carefully.
    VIM 'has all the features of vi' which is why you can use vi commands, and there is copious documentation (as has been said already) and hints on how to use the online help facility.
    Also explained is other site docs, and a pointer to a downloadable manual for VIM 5.7 as a PDF file

  8. #7
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,252
    Indeed, vim is simply an enhanced vi, and maintains all vi commands.

    As far as selecting the entire file, for what purpose? If you want to copy the whole thing into the buffer, you might try:
    Code:
    ggmaGy'a
    Which will copy the entire file to be pasted with 'p'. To delete the entire file, do the same thing as above, but replace 'y' with 'd'.

  9. #8
    Linux Newbie
    Join Date
    Dec 2005
    Location
    Singapore
    Posts
    234
    Quote Originally Posted by Cabhan
    Indeed, vim is simply an enhanced vi, and maintains all vi commands.

    As far as selecting the entire file, for what purpose? If you want to copy the whole thing into the buffer, you might try:
    Code:
    ggmaGy'a
    Which will copy the entire file to be pasted with 'p'. To delete the entire file, do the same thing as above, but replace 'y' with 'd'.
    while i press the Esc key and type
    Code:
    :ggmaGy'a
    it gives me an error that this is not the vim command
    Proper Planing is a way of success

  10. #9
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,252
    Right. You don't want to type a colon first. Just press Esc then type those characters.
    Code:
    gg  --  Go to first line
    ma  --  Make a mark called "a"
    G   --  Go to the last line
    y'a  --  Yank (copy) everything from the current location (last line) to mark a (which is on the first line)

  11. #10
    Linux Guru smolloy's Avatar
    Join Date
    Apr 2005
    Location
    CA, but from N.Ireland
    Posts
    2,414
    Here's a link for you. CLICK HERE

    I know it's for vi, but as has been said before, anything that works for vi will work for vim. You need to spend some time using vim before it makes sense, but just keep trying. There are millions of help documents out there. Google is the key.
    Registered Linux user #388328 || Registered LFS user #15880
    AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
    Need instant help? Try us on IRC -- #linuxforums on freenode

Page 1 of 3 1 2 3 LastLast

Posting Permissions

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