Movatterモバイル変換
[0]ホーム
The Wayback Machine - https://web.archive.org/web/20200729064500/http://vimdoc.sourceforge.net/htmldoc/usr_01.html
Vim documentation: usr_01
main help file
*usr_01.txt*For Vim version 7.3. Last change: 2010 Nov 03 VIM USER MANUAL - byBramMoolenaar About the manualsThis chapter introduces the manuals available with Vim. Read this to know theconditions under which the commands are explained.|01.1|Two manuals|01.2|Vim installed|01.3|Using the Vimtutor|01.4|Copyright Next chapter: |usr_02.txt| The first steps in VimTable of contents: |usr_toc.txt|==============================================================================*01.1*Two manualsThe Vim documentation consists of two parts:1. TheUser manual Task oriented explanations, from simple to complex. Reads from start to end like abook.2. The Reference manual Precise description of how everything in Vim works.The notation used in these manuals is explained here: |notation|JUMPING AROUNDThe text contains hyperlinks between the two parts, allowing you to quicklyjump between the description of an editing task and a precise explanation ofthe commands andoptions used for it. Use these two commands:PressCTRL-] to jump to a subject under the cursor.PressCTRL-O to jump back (repeat to go further back).Many links are in vertical bars, like this: |bars|. The bars themselves maybe hidden or invisible, see below. An option name, like'number', a commandin doublequotes like ":write" and any otherword can also be usedas a link.Try it out: Move the cursor toCTRL-] and pressCTRL-] on it.Other subjects can be found with the ":help" command, see |help.txt|.Thebars and stars are usually hidden with the |conceal| feature. They alsouse |hl-Ignore|, using the same color for the textas the background. You canmake them visible with::set conceallevel=0:hi link HelpBar Normal:hi link HelpStar Normal==============================================================================*01.2*Vim installedMost of the manuals assume that Vim has been properly installed. If youdidn'tdo that yet, or if Vim doesn't run properly (e.g., files can't be foundor in theGUI themenusdo not show up) first read the chapter oninstallation: |usr_90.txt|.*not-compatible*The manuals often assume you are using Vim with Vi-compatibility switchedoff. For most commands this doesn't matter, but sometimes it is important,e.g., for multi-levelundo. Aneasy way to make sure you are using anicesetup is to copy the examplevimrc file. By doing this inside Vim you don'thave to check out where it is located. How todo this depends on the systemyou are using:Unix::!cp -i $VIMRUNTIME/vimrc_example.vim ~/.vimrcMS-DOS,MS-Windows,OS/2::!copy $VIMRUNTIME/vimrc_example.vim $VIM/_vimrcAmiga::!copy $VIMRUNTIME/vimrc_example.vim $VIM/.vimrcIf the file already exists you probably want to keep it.If you start Vim now, the'compatible' option should be off. You can check itwith this command::set compatible?If it responds with "nocompatible" you are doing well. If the response is"compatible" you are in trouble. You will have to find out why the option isstill set. Perhaps the file you wrote above is not found. Use this commandto find out::scriptnamesIf your file is not in the list, check its location and name. If it is in thelist, there must be some other place where the'compatible' option is switchedback on.For more info see |vimrc| and |compatible-default|.Note:This manual is about using Vim in the normal way. There is analternative called "evim" (easy Vim). This is still Vim, but used ina way that resembles a click-and-type editor like Notepad. It alwaysstays inInsert mode, thus it feels very different. It is notexplained in the user manual, since it should be mostlyselfexplanatory. See |evim-keys| for details.==============================================================================*01.3*Using the Vimtutor*tutor* *vimtutor*Instead of reading the text (boring!) you can use thevimtutor to learn yourfirst Vim commands. This is a 30 minute tutorial that teaches the most basicVim functionality hands-on.OnUnix, if Vim has been properly installed, you can start it from the shell:vimtutorOnMS-Windows you can find it in the Program/Vim menu. Or executevimtutor.bat in the$VIMRUNTIME directory.This will make a copy of thetutor file, so that you can edit it withoutthe risk of damaging the original. There are a few translated versions of thetutor. To find out if yours isavailable, use the two-letter language code. For French:vimtutor frOnUnix, if you prefer using theGUI version of Vim, use "gvimtutor" or"vimtutor -g" instead of "vimtutor".For OpenVMS, if Vim has been properly installed, you can startvimtutor from aVMS prompt with:@VIM:vimtutorOptionally add the two-letter language codeas above.On other systems, you have todo a little work:1. Copy thetutor file. You cando this with Vim (it knows where to find it):vim -u NONE -c 'e $VIMRUNTIME/tutor/tutor' -c 'w! TUTORCOPY' -c 'q' This will write the file "TUTORCOPY" in the current directory. To use atranslated version of thetutor, append the two-letter language code to thefilename. For French:vim -u NONE -c 'e $VIMRUNTIME/tutor/tutor.fr' -c 'w! TUTORCOPY' -c 'q' 2. Edit the copied file with Vim:vim -u NONE -c "set nocp" TUTORCOPY The extra arguments make sure Vim is started in a good mood.3. Delete the copied file when you are finished with it:del TUTORCOPY ==============================================================================*01.4*Copyright*manual-copyright*The Vim user manual and reference manual are Copyright (c) 1988-2003 byBramMoolenaar. This material may be distributed only subject to the terms andconditions set forth in the Open Publication License, v1.0 or later. Thelatest version is presently available at:http://www.opencontent.org/openpub/People who contribute to the manuals must agree with the abovecopyrightnotice.*frombook*Parts of the user manual come from thebook "Vi IMproved - Vim" by SteveOualline (published by New Riders Publishing, ISBN: 0735710015). The OpenPublication License applies to thisbook. Only selected parts are includedand these have been modified (e.g., by removing the pictures, updating thetext for Vim 6.0 and later, fixing mistakes). The omission of the |frombook|tag does not mean that the text does not come from thebook.Many thanks to Steve Oualline and New Riders for creating thisbook andpublishing it under the OPL! It has been a great help whilewriting the usermanual. Not only by providing literal text, but also by setting the tone andstyle.If you make money through selling the manuals, you are strongly encouraged todonate part of the profit to help AIDS victims inUganda. See |iccf|.==============================================================================Next chapter: |usr_02.txt| The first steps in VimCopyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:top -main help file
[8]ページ先頭