/usr/share/doc/vim/html/intro.html is in vim-doc 2:8.0.1453-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 | <HTML>
<HEAD>
<META HTTP-EQUIV="Content-type" content="text/html; charset=ISO-8859-1">
<TITLE>Vim documentation: intro</TITLE>
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>Vim documentation: intro</H1>
<A NAME="top"></A>
<A HREF="index.html">main help file</A>
<HR>
<PRE>
*<A NAME="intro.txt"></A><B>intro.txt</B>* For Vim version 8.0. Last change: 2018 Jan 24
VIM REFERENCE MANUAL by <A HREF="#Bram">Bram</A> <A HREF="#Moolenaar">Moolenaar</A>
Introduction to Vim *<A NAME="ref"></A><B>ref</B>* *<A NAME="reference"></A><B>reference</B>*
1. Introduction |<A HREF="#intro">intro</A>|
2. Vim on the internet |<A HREF="#internet">internet</A>|
3. Credits |<A HREF="#credits">credits</A>|
4. Notation |<A HREF="#notation">notation</A>|
5. Modes, introduction |<A HREF="#vim-modes-intro">vim-modes-intro</A>|
6. Switching from mode to mode |<A HREF="#mode-switching">mode-switching</A>|
7. The window contents |<A HREF="#window-contents">window-contents</A>|
8. Definitions |<A HREF="#definitions">definitions</A>|
==============================================================================
1. Introduction *<A NAME="intro"></A><B>intro</B>*
Vim stands for <A HREF="#Vi">Vi</A> IMproved. It used to be <A HREF="#Vi">Vi</A> IMitation, but there are so many
improvements that a name change was appropriate. Vim is a text editor which
includes almost all the commands from the <A HREF="os_unix.html#Unix">Unix</A> program "<A HREF="#Vi">Vi</A>" and a lot of new
ones. It is very useful for editing programs and other plain text.
All commands are given with the keyboard. This has the advantage that you
can keep your fingers on the keyboard and your eyes on the screen. For those
who want <A HREF="motion.html#it">it</A>, there is mouse support and a <A HREF="gui.html#GUI">GUI</A> version with scrollbars and
<A HREF="gui.html#menus">menus</A> (see |<A HREF="gui.html">gui.txt</A>|).
An overview of this manual can be found in the file "help.txt", |<A HREF="index.html">help.txt</A>|.
It can be accessed from within Vim with the <A HREF="helphelp.html#<Help>"><Help></A> or <A HREF="helphelp.html#<F1>"><F1></A> key and with the
|<A HREF="helphelp.html#:help">:help</A>| command (just type ":help", without the <A HREF="help.html#bars">bars</A> or <A HREF="quotes.html#quotes">quotes</A>).
The <A HREF="options.html#'helpfile'">'helpfile'</A> option can be set to the name of the help file, in <A HREF="change.html#case">case</A> <A HREF="motion.html#it">it</A>
is not located in the default place. You can jump to subjects like with <A HREF="tagsrch.html#tags">tags</A>:
Use <A HREF="tagsrch.html#CTRL-]">CTRL-]</A> to jump to a subject under the cursor, use <A HREF="tagsrch.html#CTRL-T">CTRL-T</A> to jump back.
Throughout this manual the differences between <A HREF="#Vi">Vi</A> and Vim are mentioned in
curly braces, like this: {Vi does not have on-line help}. See |<A HREF="vi_diff.html">vi_diff.txt</A>|
for a summary of the differences between Vim and <A HREF="#Vi">Vi</A>.
This manual refers to Vim on various machines. There may be small differences
between different computers and terminals. Besides the remarks given in this
document, there is a separate document for each supported system, see
|<A HREF="help.html#sys-file-list">sys-file-list</A>|.
*<A NAME="pronounce"></A><B>pronounce</B>*
Vim is pronounced <A HREF="motion.html#as">as</A> one <A HREF="motion.html#word">word</A>, like Jim, not vi-ai-em. It's written with a
capital, since it's a name, again like Jim.
This manual is a reference for all the Vim commands and <A HREF="options.html#options">options</A>. This is not
an introduction to the use of <A HREF="#Vi">Vi</A> or Vim, <A HREF="motion.html#it">it</A> gets a bit complicated here and
there. For beginners, there is a hands-on |<A HREF="usr_01.html#tutor">tutor</A>|. To learn using Vim, read
the user manual |<A HREF="usr_toc.html">usr_toc.txt</A>|.
*<A NAME="book"></A><B>book</B>*
There are many books on <A HREF="#Vi">Vi</A> that contain a section for beginners. There are
two books I can recommend:
"Vim - <A HREF="#Vi">Vi</A> Improved" by Steve Oualline
This is the very first <A HREF="#book">book</A> completely dedicated to Vim. It is very good for
beginners. The most often used commands are explained with pictures and
examples. The <A HREF="various.html#less">less</A> often used commands are also explained, the more advanced
features are summarized. There is a comprehensive index and a quick
reference. Parts of this <A HREF="#book">book</A> have been included in the user manual
|<A HREF="usr_01.html#frombook">frombook</A>|.
Published by New Riders Publishing. ISBN: 0735710015
For more information try one of these:
<A HREF="http://iccf-holland.org/click5.html">http://iccf-holland.org/click5.html</A>
<A HREF="http://www.vim.org/iccf/click5.html">http://www.vim.org/iccf/click5.html</A>
"Learning the <A HREF="#Vi">Vi</A> editor" by Linda Lamb and Arnold Robbins
This is a <A HREF="#book">book</A> about <A HREF="#Vi">Vi</A> that includes a chapter on Vim (in the sixth edition).
The first steps in <A HREF="#Vi">Vi</A> are explained very well. The commands that Vim adds are
only briefly mentioned. There is also a German translation.
Published by O'Reilly. ISBN: 1-56592-426-6.
==============================================================================
2. Vim on the <A HREF="#internet">internet</A> *<A NAME="internet"></A><B>internet</B>*
*<A NAME="www"></A><B>www</B>* *<A NAME="WWW"></A><B>WWW</B>* *<A NAME="faq"></A><B>faq</B>* *<A NAME="FAQ"></A><B>FAQ</B>* *<A NAME="distribution"></A><B>distribution</B>* *<A NAME="download"></A><B>download</B>*
The Vim pages contain the most recent information about Vim. They also
contain links to the most recent version of Vim. The <A HREF="#FAQ">FAQ</A> is a <A HREF="eval.html#list">list</A> of
Frequently Asked Questions. Read this if you have problems.
Vim home page: <A HREF="http://www.vim.org/">http://www.vim.org/</A>
Vim FAQ: <A HREF="http://vimdoc.sf.net/">http://vimdoc.sf.net/</A>
Downloading: <A HREF="ftp://ftp.vim.org/pub/vim/MIRRORS">ftp://ftp.vim.org/pub/vim/MIRRORS</A>
Usenet News group where Vim is discussed: *<A NAME="news"></A><B>news</B>* *<A NAME="usenet"></A><B>usenet</B>*
comp.editors
This group is also for other editors. If you write about Vim, don't forget to
mention that.
*<A NAME="mail-list"></A><B>mail-list</B>* *<A NAME="maillist"></A><B>maillist</B>*
There are several mailing lists for Vim:
<vim@vim.org> *<A NAME="vim-use"></A><B>vim-use</B>* *<A NAME="vim_use"></A><B>vim_use</B>*
For discussions about using existing versions of Vim: Useful mappings,
questions, answers, where to get a specific version, etc. There are
quite a few people watching this <A HREF="eval.html#list">list</A> and answering questions, also
for beginners. Don't hesitate to ask your question here.
<vim-dev@vim.org> *<A NAME="vim-dev"></A><B>vim-dev</B>* *<A NAME="vim_dev"></A><B>vim_dev</B>* *<A NAME="vimdev"></A><B>vimdev</B>*
For discussions about <A HREF="change.html#changing">changing</A> Vim: New features, porting, patches,
beta-test versions, etc.
<vim-announce@vim.org> *<A NAME="vim-announce"></A><B>vim-announce</B>* *<A NAME="vim_announce"></A><B>vim_announce</B>*
Announcements about new versions of Vim; also for beta-test versions
and ports to different systems. This is a read-only <A HREF="eval.html#list">list</A>.
<vim-mac@vim.org> *<A NAME="vim-mac"></A><B>vim-mac</B>* *<A NAME="vim_mac"></A><B>vim_mac</B>*
For discussions about using and improving the <A HREF="os_mac.html#Macintosh">Macintosh</A> version of
Vim.
See <A HREF="http://www.vim.org/maillist.php">http://www.vim.org/maillist.php</A> for the latest information.
NOTE:
- You can only send <A HREF="message.html#messages">messages</A> to these lists if you have subscribed!
- You need to send the <A HREF="message.html#messages">messages</A> from the same location <A HREF="motion.html#as">as</A> where you subscribed
from (to avoid spam mail).
- Maximum message size is 40000 characters.
*<A NAME="subscribe-maillist"></A><B>subscribe-maillist</B>*
If you want to join, send a message to
<A HREF="mailto:vim-subscribe@vim.org"><vim-subscribe@vim.org></A>
Make sure that your "From:" address is correct. Then the <A HREF="eval.html#list">list</A> server will
give you help on how to subscribe.
*<A NAME="maillist-archive"></A><B>maillist-archive</B>*
For more information and archives look on the Vim <A HREF="#maillist">maillist</A> page:
<A HREF="http://www.vim.org/maillist.php">http://www.vim.org/maillist.php</A>
Bug reports: *<A NAME="bugs"></A><B>bugs</B>* *<A NAME="bug-reports"></A><B>bug-reports</B>* *<A NAME="bugreport.vim"></A><B>bugreport.vim</B>*
There are two ways to report bugs, both work:
1. Send bug reports to: Vim Developers <A HREF="mailto:vim-dev@vim.org"><vim-dev@vim.org></A>
This is a <A HREF="#maillist">maillist</A>, you need to become a member first and many people will
see the message. If you don't want that, e.g. because <A HREF="motion.html#it">it</A> is a security
issue, send it to <A HREF="mailto:bugs@vim.org"><bugs@vim.org></A>, this only goes to the Vim maintainer
(that's <A HREF="#Bram">Bram</A>).
2. Open an issue on GitHub: https://github.com/vim/vim/issues
The text will be forwarded to the <A HREF="#vim-dev">vim-dev</A> <A HREF="#maillist">maillist</A>.
Please be brief; all the time that is spent on answering mail is subtracted
from the time that is spent on improving Vim! Always give a reproducible
example and try to find out which settings or other things trigger the bug.
Preferably start Vim with:
<B> vim --clean -u reproduce.vim</B>
Where reproduce.vim is a <A HREF="usr_41.html#script">script</A> that reproduces the problem. Try different
machines, if relevant (is this an <A HREF="os_win32.html#MS-Windows">MS-Windows</A> specific bug perhaps?).
Send me patches if you can!
It will help to include information about the version of Vim you are using and
your setup. You can get the information with this command:
<B> :so $VIMRUNTIME/bugreport.vim</B>
This will create a file "bugreport.txt" in the current directory, with a lot
of information of your environment. Before sending this out, check if <A HREF="motion.html#it">it</A>
doesn't contain any confidential information!
If Vim crashes, please try to find out where. You can find help on this here:
|<A HREF="debug.html">debug.txt</A>|.
In <A HREF="change.html#case">case</A> of doubt or when you wonder if the problem has already been fixed but
you can't find a fix for <A HREF="motion.html#it">it</A>, become a member of the <A HREF="#vim-dev">vim-dev</A> <A HREF="#maillist">maillist</A> and ask
your question there. |<A HREF="#maillist">maillist</A>|
*<A NAME="year-2000"></A><B>year-2000</B>* *<A NAME="Y2K"></A><B>Y2K</B>*
Since Vim internally doesn't use dates for editing, there is no year 2000
problem to worry about. Vim does use the time in the form of seconds since
January 1st 1970. It is used for a time-stamp check of the edited file and
the swap file, which is not critical and should only cause warning <A HREF="message.html#messages">messages</A>.
There might be a year 2038 problem, when the seconds don't fit in a 32 bit int
anymore. This depends on the compiler, libraries and operating system.
Specifically, time_t and the ctime() function are used. And the time_t is
stored in four bytes in the swap file. But that's only used for <A HREF="print.html#printing">printing</A> a
file date/time for <A HREF="recover.html#recovery">recovery</A>, <A HREF="motion.html#it">it</A> will never affect normal editing.
The Vim <A HREF="eval.html#strftime()">strftime()</A> function directly uses the <A HREF="eval.html#strftime()">strftime()</A> system function.
<A HREF="eval.html#localtime()">localtime()</A> uses the time() system function. <A HREF="eval.html#getftime()">getftime()</A> uses the time
returned by the stat() system function. If your system libraries are year
2000 compliant, Vim is too.
The user may create scripts for Vim that use external commands. These might
introduce <A HREF="#Y2K">Y2K</A> problems, but those are not really part of Vim itself.
==============================================================================
3. Credits *<A NAME="credits"></A><B>credits</B>* *<A NAME="author"></A><B>author</B>* *<A NAME="Bram"></A><B>Bram</B>* *<A NAME="Moolenaar"></A><B>Moolenaar</B>*
Most of Vim was written by Bram Moolenaar <A HREF="mailto:Bram@vim.org"><Bram@vim.org></A>.
Parts of the documentation come from several <A HREF="#Vi">Vi</A> manuals, written by:
W.N. Joy
Alan P.W. Hewett
<A HREF="motion.html#Mark">Mark</A> Horton
The Vim editor is based on Stevie and includes (ideas from) other software,
worked on by the people mentioned here. Other people helped by sending me
patches, suggestions and giving feedback about what is good and bad in Vim.
Vim would never have become what <A HREF="motion.html#it">it</A> is now, without the help of these people!
Ron Aaron <A HREF="os_win32.html#Win32">Win32</A> <A HREF="gui.html#GUI">GUI</A> changes
Mohsin Ahmed <A HREF="editing.html#encryption">encryption</A>
Zoltan Arpadffy work on <A HREF="os_vms.html#VMS">VMS</A> port
Tony Andrews Stevie
Gert van Antwerpen changes for DJGPP on <A HREF="os_msdos.html#MS-DOS">MS-DOS</A>
Berkeley DB(3) ideas for swap file implementation
Keith Bostic <A HREF="#Nvi">Nvi</A>
Walter Briscoe Makefile updates, various patches
Ralf Brown SPAWNO library for <A HREF="os_msdos.html#MS-DOS">MS-DOS</A>
Robert Colon many useful remarks
Marcin Dalecki <A HREF="gui_x11.html#GTK+">GTK+</A> <A HREF="gui.html#GUI">GUI</A> port, toolbar icons, gettext()
Kayhan Demirel sent me news in <A HREF="uganda.html#Uganda">Uganda</A>
Chris <A HREF="change.html#&">&</A> John Downey xvi (ideas for multi-windows version)
Henk Elbers first <A HREF="os_vms.html#VMS">VMS</A> port
Daniel Elstner <A HREF="gui_x11.html#GTK+">GTK+</A> 2 port
Eric Fischer <A HREF="os_mac.html#Mac">Mac</A> port, <A HREF="options.html#'cindent'">'cindent'</A>, and other improvements
Benji Fisher Answering lots of user questions
Bill Foster <A HREF="gui_x11.html#Athena">Athena</A> <A HREF="gui.html#GUI">GUI</A> port
Google Lets me work on Vim one day a week
Loic Grenie xvim (ideas for multi <A HREF="windows.html#windows">windows</A> version)
Sven Guckes Vim promoter and previous <A HREF="#WWW">WWW</A> page maintainer
Darren Hiebert Exuberant <A HREF="tagsrch.html#ctags">ctags</A>
Jason Hildebrand <A HREF="gui_x11.html#GTK+">GTK+</A> 2 port
Bruce Hunsaker improvements for <A HREF="os_vms.html#VMS">VMS</A> port
Andy Kahn <A HREF="if_cscop.html#Cscope">Cscope</A> support, <A HREF="gui_x11.html#GTK+">GTK+</A> <A HREF="gui.html#GUI">GUI</A> port
Oezguer Kesim Maintainer of Vim Mailing <A HREF="eval.html#Lists">Lists</A>
Axel Kielhorn work on the <A HREF="os_mac.html#Macintosh">Macintosh</A> port
Steve Kirkendall <A HREF="#Elvis">Elvis</A>
Roger Knobbe original port to Windows NT
Sergey Laskavy Vim's help from Moscow
Felix von Leitner Previous maintainer of Vim Mailing <A HREF="eval.html#Lists">Lists</A>
David Leonard Port of <A HREF="if_pyth.html#Python">Python</A> extensions to <A HREF="os_unix.html#Unix">Unix</A>
Avner Lottem Edit in right-to-left <A HREF="windows.html#windows">windows</A>
Flemming Madsen <A HREF="options.html#X11">X11</A> <A HREF="remote.html#client-server">client-server</A>, various features and patches
Tony Mechelynck answers many user questions
Paul Moore <A HREF="if_pyth.html#Python">Python</A> interface extensions, many patches
Katsuhito Nagano Work on <A HREF="mbyte.html#multi-byte">multi-byte</A> versions
Sung-Hyun Nam Work on <A HREF="mbyte.html#multi-byte">multi-byte</A> versions
Vince Negri <A HREF="os_win32.html#Win32">Win32</A> <A HREF="gui.html#GUI">GUI</A> and generic console enhancements
Steve Oualline Author of the first Vim book |<A HREF="usr_01.html#frombook">frombook</A>|
Dominique Pelle <A HREF="debug.html#valgrind">valgrind</A> reports and many fixes
A.Politz Many bug reports and some fixes
George <A HREF="visual.html#V">V</A>. Reilly <A HREF="os_win32.html#Win32">Win32</A> port, <A HREF="os_win32.html#Win32">Win32</A> <A HREF="gui.html#GUI">GUI</A> start-off
Stephen Riehm bug collector
Stefan Roemer various patches and help to users
Ralf Schandl IBM OS/390 port
Olaf Seibert DICE and <A HREF="os_beos.html#BeBox">BeBox</A> version, <A HREF="pattern.html#regexp">regexp</A> improvements
Mortaza Shiran <A HREF="farsi.html#Farsi">Farsi</A> patches
Peter da Silva termlib
Paul Slootman <A HREF="os_os2.html#OS/2">OS/2</A> port
Henry Spencer regular expressions
Dany St-Amant <A HREF="os_mac.html#Macintosh">Macintosh</A> port
Tim Thompson Stevie
<A HREF="motion.html#G">G</A>. <A HREF="change.html#R">R</A>. (Fred) Walter Stevie
Sven Verdoolaege <A HREF="if_perl.html#Perl">Perl</A> interface
Robert Webb <A HREF="cmdline.html#Command-line">Command-line</A> completion, <A HREF="gui.html#GUI">GUI</A> versions, and
lots of patches
Ingo Wilken <A HREF="if_tcl.html#Tcl">Tcl</A> interface
Mike Williams PostScript <A HREF="print.html#printing">printing</A>
Juergen Weigert Lattice version, AUX improvements, UNIX and
<A HREF="os_msdos.html#MS-DOS">MS-DOS</A> ports, autoconf
Stefan 'Sec' Zehl Maintainer of vim.org
Yasuhiro Matsumoto many <A HREF="os_win32.html#MS-Windows">MS-Windows</A> improvements
Ken Takata fixes and features
Kazunobu Kuriyama <A HREF="gui_x11.html#GTK">GTK</A> 3
Christian Brabandt many fixes, features, user support, etc.
I wish to thank all the people that sent me bug reports and suggestions. The
<A HREF="eval.html#list">list</A> is too long to mention them all here. Vim would not be the same without
the ideas from all these people: They keep Vim alive!
*<A NAME="love"></A><B>love</B>* *<A NAME="peace"></A><B>peace</B>* *<A NAME="friendship"></A><B>friendship</B>* *<A NAME="gross-national-happiness"></A><B>gross-national-happiness</B>*
In this documentation there are several references to other versions of <A HREF="#Vi">Vi</A>:
*<A NAME="Vi"></A><B>Vi</B>* *<A NAME="vi"></A><B>vi</B>*
<A HREF="#Vi">Vi</A> "the original". Without further remarks this is the version
of <A HREF="#Vi">Vi</A> that appeared in Sun OS 4.x. "<A HREF="various.html#:version">:version</A>" returns
"Version 3.7, 6/7/85". Sometimes other versions are referred
to. Only runs under <A HREF="os_unix.html#Unix">Unix</A>. Source code only available with a
<A HREF="uganda.html#license">license</A>. More information on <A HREF="#Vi">Vi</A> can be found through:
<A HREF="http://vi-editor.org">http://vi-editor.org</A> [doesn't currently work...]
*<A NAME="Posix"></A><B>Posix</B>*
<A HREF="#Posix">Posix</A> From the IEEE standard 1003.2, Part 2: Shell and utilities.
Generally known <A HREF="motion.html#as">as</A> "<A HREF="#Posix">Posix</A>". This is a textual description of
how <A HREF="#Vi">Vi</A> is supposed to work.
See |<A HREF="vi_diff.html#posix-compliance">posix-compliance</A>|.
*<A NAME="Nvi"></A><B>Nvi</B>*
<A HREF="#Nvi">Nvi</A> The "New" <A HREF="#Vi">Vi</A>. The version of <A HREF="#Vi">Vi</A> that comes with BSD 4.4 and FreeBSD.
Very good compatibility with the original <A HREF="#Vi">Vi</A>, with a few extensions.
The version used is 1.79. "<A HREF="various.html#:version">:version</A>" returns "Version 1.79
(10/23/96)". There has been no release the last few years, although
there is a <A HREF="develop.html#development">development</A> version 1.81.
Source code is freely available.
*<A NAME="Elvis"></A><B>Elvis</B>*
<A HREF="#Elvis">Elvis</A> Another <A HREF="#Vi">Vi</A> clone, made by Steve Kirkendall. Very compact but isn't
<A HREF="motion.html#as">as</A> flexible <A HREF="motion.html#as">as</A> Vim.
The version used is 2.1. It is still being developed. Source code is
freely available.
==============================================================================
4. Notation *<A NAME="notation"></A><B>notation</B>*
When <A HREF="syntax.html#syntax">syntax</A> highlighting is used to read this, text that is not typed
literally is often highlighted with the <A HREF="eval.html#Special">Special</A> group. These are items in <A HREF="motion.html#[]">[]</A>,
<A HREF="#{}">{}</A> and <A HREF="#<>"><></A>, and <A HREF="change.html#CTRL-X">CTRL-X</A>.
Note that Vim uses all possible characters in commands. Sometimes the <A HREF="motion.html#[]">[]</A>, <A HREF="#{}">{}</A>
and <A HREF="#<>"><></A> are part of what you type, the context should make this clear.
<A HREF="motion.html#[]">[]</A> Characters in square brackets are optional.
*<A NAME="count"></A><B>count</B>* *<A NAME="[count]"></A><B>[count]</B>*
<A HREF="#[count]">[count]</A> An optional number that may precede the command to multiply
or iterate the command. If no number is given, a <A HREF="#count">count</A> of one
is used, unless otherwise noted. Note that in this manual the
<A HREF="#[count]">[count]</A> is not mentioned in the description of the command,
but only in the explanation. This was done to make the
commands easier to look up. If the <A HREF="options.html#'showcmd'">'showcmd'</A> option is on,
the (partially) entered <A HREF="#count">count</A> is shown at the bottom of the
<A HREF="windows.html#window">window</A>. You can use <Del> to erase the last digit (|<A HREF="various.html#N<Del>">N<Del></A>|).
*<A NAME="[quotex]"></A><B>[quotex]</B>*
["x] An optional <A HREF="sponsor.html#register">register</A> designation where text can be stored.
See |<A HREF="change.html#registers">registers</A>|. The <A HREF="change.html#x">x</A> is a single character between '<A HREF="insert.html#a">a</A>' and
'<A HREF="index.html#z">z</A>' or '<A HREF="insert.html#A">A</A>' and 'Z' or '"'', and in some cases (with the put
command) between '<A HREF="motion.html#0">0</A>' and '9', '<A HREF="motion.html#%">%</A>', '<A HREF="pattern.html##">#</A>', or others. The
<A HREF="change.html#uppercase">uppercase</A> and <A HREF="change.html#lowercase">lowercase</A> <A HREF="print.html#letter">letter</A> designate the same <A HREF="sponsor.html#register">register</A>,
but the <A HREF="change.html#lowercase">lowercase</A> <A HREF="print.html#letter">letter</A> is used to overwrite the previous
<A HREF="sponsor.html#register">register</A> contents, while the <A HREF="change.html#uppercase">uppercase</A> <A HREF="print.html#letter">letter</A> is used to
append to the previous <A HREF="sponsor.html#register">register</A> contents. Without the ""x" or
with """" the stored text is put into the unnamed <A HREF="sponsor.html#register">register</A>.
*<A NAME="{}"></A><B>{}</B>*
<A HREF="#{}">{}</A> Curly braces denote parts of the command which must appear,
but which can take a number of different values. The
differences between Vim and <A HREF="#Vi">Vi</A> are also given in curly braces
(this will be clear from the context).
*<A NAME="{char1-char2}"></A><B>{char1-char2}</B>*
<A HREF="#{char1-char2}">{char1-char2}</A> A single character from the range char1 to char2. For
example: {a-z} is a <A HREF="change.html#lowercase">lowercase</A> <A HREF="print.html#letter">letter</A>. Multiple ranges may be
concatenated. For example, {a-zA-Z0-9} is any alphanumeric
character.
*<A NAME="{motion}"></A><B>{motion}</B>* *<A NAME="movement"></A><B>movement</B>*
<A HREF="#{motion}">{motion}</A> A command that moves the cursor. These are explained in
|<A HREF="motion.html">motion.txt</A>|. Examples:
<A HREF="motion.html#w">w</A> to start of next <A HREF="motion.html#word">word</A>
<A HREF="motion.html#b">b</A> to begin of current <A HREF="motion.html#word">word</A>
4j four lines down
/The<CR> to next occurrence of "The"
This is used after an |<A HREF="motion.html#operator">operator</A>| command to move over the text
that is to be operated upon.
- If the motion includes a <A HREF="#count">count</A> and the <A HREF="motion.html#operator">operator</A> also has a
<A HREF="#count">count</A>, the two counts are multiplied. For example: "2d3w"
deletes six words.
- The motion can be backwards, e.g. "db" to delete to the
start of the <A HREF="motion.html#word">word</A>.
- The motion can also be a mouse click. The mouse is not
supported in every <A HREF="terminal.html#terminal">terminal</A> though.
- The "<A HREF="map.html#:omap">:omap</A>" command can be used to map characters while an
<A HREF="motion.html#operator">operator</A> is pending.
- <A HREF="#Ex">Ex</A> commands can be used to move the cursor. This can be
used to call a function that does some complicated motion.
The motion is always <A HREF="motion.html#characterwise">characterwise</A> <A HREF="motion.html#exclusive">exclusive</A>, no matter
what "<A HREF="cmdline.html#:">:</A>" command is used. This means it's impossible to
include the last character of a line without the line break
(unless <A HREF="options.html#'virtualedit'">'virtualedit'</A> is set).
If the <A HREF="#Ex">Ex</A> command changes the text before where the <A HREF="motion.html#operator">operator</A>
starts or jumps to another buffer the result is
unpredictable. It is possible to change the text further
down. Jumping to another buffer is possible if the current
buffer is not unloaded.
*<A NAME="{Visual}"></A><B>{Visual}</B>*
<A HREF="#{Visual}">{Visual}</A> A selected text area. It is started with the "<A HREF="visual.html#v">v</A>", "<A HREF="visual.html#V">V</A>", or
<A HREF="visual.html#CTRL-V">CTRL-V</A> command, then any cursor <A HREF="#movement">movement</A> command can be used
to change the end of the selected text.
This is used before an |<A HREF="motion.html#operator">operator</A>| command to highlight the
text that is to be operated upon.
See |<A HREF="visual.html#Visual-mode">Visual-mode</A>|.
*<A NAME="<character>"></A><B><character></B>*
<A HREF="#<character>"><character></A> A special character from the table below, optionally with
modifiers, or a single ASCII character with modifiers.
*<A NAME="'character'"></A><B>'character'</B>*
'<A HREF="change.html#c">c</A>' A single ASCII character.
*<A NAME="CTRL-{char}"></A><B>CTRL-{char}</B>*
<A HREF="#CTRL-{char}">CTRL-{char}</A> {char} typed <A HREF="motion.html#as">as</A> a <A HREF="#control">control</A> character; that is, typing {char}
while holding the CTRL key down. The <A HREF="change.html#case">case</A> of {char} does not
matter; thus <A HREF="change.html#CTRL-A">CTRL-A</A> and CTRL-a are equivalent. But on some
terminals, using the SHIFT key will produce another code,
don't use <A HREF="motion.html#it">it</A> then.
*<A NAME="'option'"></A><B>'option'</B>*
<A HREF="#'option'">'option'</A> An option, or parameter, that can be set to a value, is
enclosed in single <A HREF="quotes.html#quotes">quotes</A>. See |<A HREF="options.html#options">options</A>|.
*<A NAME="quotecommandquote"></A><B>quotecommandquote</B>*
"command" A reference to a command that you can type is enclosed in
double <A HREF="quotes.html#quotes">quotes</A>.
`command` New style command, this distinguishes <A HREF="motion.html#it">it</A> from other quoted
text and strings.
*<A NAME="key-notation"></A><B>key-notation</B>* *<A NAME="key-codes"></A><B>key-codes</B>* *<A NAME="keycodes"></A><B>keycodes</B>*
These names for keys are used in the documentation. They can also be used
with the "<A HREF="map.html#:map">:map</A>" command (insert the key name by pressing CTRL-K and then the
key you want the name for).
<B><FONT COLOR="PURPLE">notation meaning equivalent decimal value(s) </FONT></B>
<A HREF="#<Nul>"><Nul></A> zero CTRL-@ 0 (stored <A HREF="motion.html#as">as</A> 10) *<A NAME="<Nul>"></A><B><Nul></B>*
<A HREF="motion.html#<BS>"><BS></A> backspace <A HREF="motion.html#CTRL-H">CTRL-H</A> 8 *<A NAME="backspace"></A><B>backspace</B>*
<A HREF="motion.html#<Tab>"><Tab></A> <A HREF="#tab">tab</A> <A HREF="motion.html#CTRL-I">CTRL-I</A> 9 *<A NAME="tab"></A><B>tab</B>* *<A NAME="Tab"></A><B>Tab</B>*
*<A NAME="linefeed"></A><B>linefeed</B>*
<A HREF="motion.html#<NL>"><NL></A> <A HREF="#linefeed">linefeed</A> <A HREF="motion.html#CTRL-J">CTRL-J</A> 10 (used for <A HREF="#<Nul>"><Nul></A>)
<FF> <A HREF="#formfeed">formfeed</A> <A HREF="various.html#CTRL-L">CTRL-L</A> 12 *<A NAME="formfeed"></A><B>formfeed</B>*
<A HREF="motion.html#<CR>"><CR></A> carriage return <A HREF="motion.html#CTRL-M">CTRL-M</A> 13 *<A NAME="carriage-return"></A><B>carriage-return</B>*
<A HREF="#<Return>"><Return></A> same <A HREF="motion.html#as">as</A> <A HREF="motion.html#<CR>"><CR></A> *<A NAME="<Return>"></A><B><Return></B>*
<A HREF="#<Enter>"><Enter></A> same <A HREF="motion.html#as">as</A> <A HREF="motion.html#<CR>"><CR></A> *<A NAME="<Enter>"></A><B><Enter></B>*
<A HREF="#<Esc>"><Esc></A> <A HREF="#escape">escape</A> CTRL-[ 27 *<A NAME="escape"></A><B>escape</B>* *<A NAME="<Esc>"></A><B><Esc></B>*
<A HREF="motion.html#<Space>"><Space></A> space 32 *<A NAME="space"></A><B>space</B>*
<A HREF="#<lt>"><lt></A> less-than <A HREF="change.html#<"><</A> 60 *<A NAME="<lt>"></A><B><lt></B>*
<A HREF="#<Bslash>"><Bslash></A> <A HREF="#backslash">backslash</A> \ 92 *<A NAME="backslash"></A><B>backslash</B>* *<A NAME="<Bslash>"></A><B><Bslash></B>*
<A HREF="#<Bar>"><Bar></A> vertical <A HREF="motion.html#bar">bar</A> | 124 *<A NAME="<Bar>"></A><B><Bar></B>*
<A HREF="change.html#<Del>"><Del></A> delete 127
<A HREF="#<CSI>"><CSI></A> command sequence <A HREF="#intro">intro</A> ALT-Esc 155 *<A NAME="<CSI>"></A><B><CSI></B>*
<A HREF="#<xCSI>"><xCSI></A> CSI when typed in the <A HREF="gui.html#GUI">GUI</A> *<A NAME="<xCSI>"></A><B><xCSI></B>*
<A HREF="#<EOL>"><EOL></A> end-of-line (can be <A HREF="motion.html#<CR>"><CR></A>, <LF> or <CR><LF>,
depends on system and <A HREF="options.html#'fileformat'">'fileformat'</A>) *<A NAME="<EOL>"></A><B><EOL></B>*
<A HREF="motion.html#<Up>"><Up></A> <A HREF="#cursor-up">cursor-up</A> *<A NAME="cursor-up"></A><B>cursor-up</B>* *<A NAME="cursor_up"></A><B>cursor_up</B>*
<A HREF="motion.html#<Down>"><Down></A> <A HREF="#cursor-down">cursor-down</A> *<A NAME="cursor-down"></A><B>cursor-down</B>* *<A NAME="cursor_down"></A><B>cursor_down</B>*
<A HREF="motion.html#<Left>"><Left></A> <A HREF="#cursor-left">cursor-left</A> *<A NAME="cursor-left"></A><B>cursor-left</B>* *<A NAME="cursor_left"></A><B>cursor_left</B>*
<A HREF="motion.html#<Right>"><Right></A> <A HREF="#cursor-right">cursor-right</A> *<A NAME="cursor-right"></A><B>cursor-right</B>* *<A NAME="cursor_right"></A><B>cursor_right</B>*
<A HREF="scroll.html#<S-Up>"><S-Up></A> shift-cursor-up
<A HREF="scroll.html#<S-Down>"><S-Down></A> shift-cursor-down
<A HREF="motion.html#<S-Left>"><S-Left></A> shift-cursor-left
<A HREF="motion.html#<S-Right>"><S-Right></A> shift-cursor-right
<A HREF="motion.html#<C-Left>"><C-Left></A> control-cursor-left
<A HREF="motion.html#<C-Right>"><C-Right></A> control-cursor-right
<A HREF="helphelp.html#<F1>"><F1></A> - <A HREF="term.html#<F12>"><F12></A> function keys 1 to 12 *<A NAME="function_key"></A><B>function_key</B>* *<A NAME="function-key"></A><B>function-key</B>*
<A HREF="#<S-F1>"><S-F1></A> - <A HREF="term.html#<S-F12>"><S-F12></A> shift-function keys 1 to 12 *<A NAME="<S-F1>"></A><B><S-F1></B>*
<A HREF="helphelp.html#<Help>"><Help></A> help key
<A HREF="undo.html#<Undo>"><Undo></A> <A HREF="undo.html#undo">undo</A> key
<A HREF="insert.html#<Insert>"><Insert></A> insert key
<A HREF="motion.html#<Home>"><Home></A> home *<A NAME="home"></A><B>home</B>*
<A HREF="motion.html#<End>"><End></A> end *<A NAME="end"></A><B>end</B>*
<A HREF="scroll.html#<PageUp>"><PageUp></A> <A HREF="#page-up">page-up</A> *<A NAME="page_up"></A><B>page_up</B>* *<A NAME="page-up"></A><B>page-up</B>*
<A HREF="scroll.html#<PageDown>"><PageDown></A> <A HREF="#page-down">page-down</A> *<A NAME="page_down"></A><B>page_down</B>* *<A NAME="page-down"></A><B>page-down</B>*
<A HREF="motion.html#<kHome>"><kHome></A> keypad home (upper left) *<A NAME="keypad-home"></A><B>keypad-home</B>*
<A HREF="motion.html#<kEnd>"><kEnd></A> keypad end (lower left) *<A NAME="keypad-end"></A><B>keypad-end</B>*
<A HREF="scroll.html#<kPageUp>"><kPageUp></A> keypad <A HREF="#page-up">page-up</A> (upper right) *<A NAME="keypad-page-up"></A><B>keypad-page-up</B>*
<A HREF="scroll.html#<kPageDown>"><kPageDown></A> keypad <A HREF="#page-down">page-down</A> (lower right) *<A NAME="keypad-page-down"></A><B>keypad-page-down</B>*
<A HREF="term.html#<kPlus>"><kPlus></A> keypad + *<A NAME="keypad-plus"></A><B>keypad-plus</B>*
<A HREF="term.html#<kMinus>"><kMinus></A> keypad - *<A NAME="keypad-minus"></A><B>keypad-minus</B>*
<A HREF="term.html#<kMultiply>"><kMultiply></A> keypad * *<A NAME="keypad-multiply"></A><B>keypad-multiply</B>*
<A HREF="term.html#<kDivide>"><kDivide></A> keypad / *<A NAME="keypad-divide"></A><B>keypad-divide</B>*
<A HREF="term.html#<kEnter>"><kEnter></A> keypad Enter *<A NAME="keypad-enter"></A><B>keypad-enter</B>*
<A HREF="term.html#<kPoint>"><kPoint></A> keypad Decimal point *<A NAME="keypad-point"></A><B>keypad-point</B>*
<A HREF="term.html#<k0>"><k0></A> - <A HREF="term.html#<k9>"><k9></A> keypad 0 to 9 *<A NAME="keypad-0"></A><B>keypad-0</B>* *<A NAME="keypad-9"></A><B>keypad-9</B>*
<S-...> shift-key *<A NAME="shift"></A><B>shift</B>* *<A NAME="<S-"></A><B><S-</B>*
<C-...> control-key *<A NAME="control"></A><B>control</B>* *<A NAME="ctrl"></A><B>ctrl</B>* *<A NAME="<C-"></A><B><C-</B>*
<M-...> alt-key or meta-key *<A NAME="meta"></A><B>meta</B>* *<A NAME="alt"></A><B>alt</B>* *<A NAME="<M-"></A><B><M-</B>*
<A-...> same <A HREF="motion.html#as">as</A> <M-...> *<A NAME="<A-"></A><B><A-</B>*
<D-...> command-key (Macintosh only) *<A NAME="<D-"></A><B><D-</B>*
<t_xx> key with "xx" entry in <A HREF="term.html#termcap">termcap</A>
Note: The shifted cursor keys, the help key, and the <A HREF="undo.html#undo">undo</A> key are only
available on a few terminals. On the <A HREF="os_amiga.html#Amiga">Amiga</A>, shifted function key 10 produces
a code (CSI) that is also used by key sequences. It will be recognized only
after typing another key.
Note: There are two codes for the delete key. 127 is the decimal ASCII value
for the delete key, which is always recognized. Some delete keys send another
value, in which <A HREF="change.html#case">case</A> this value is obtained from the <A HREF="term.html#termcap">termcap</A> entry "kD". Both
values have the same effect. Also see |<A HREF="options.html#:fixdel">:fixdel</A>|.
Note: The keypad keys are used in the same way <A HREF="motion.html#as">as</A> the corresponding "normal"
keys. For example, <A HREF="motion.html#<kHome>"><kHome></A> has the same effect <A HREF="motion.html#as">as</A> <A HREF="motion.html#<Home>"><Home></A>. If a keypad key
sends the same raw key code <A HREF="motion.html#as">as</A> its non-keypad equivalent, <A HREF="motion.html#it">it</A> will be
recognized <A HREF="motion.html#as">as</A> the non-keypad code. For example, when <A HREF="motion.html#<kHome>"><kHome></A> sends the same
code <A HREF="motion.html#as">as</A> <A HREF="motion.html#<Home>"><Home></A>, when pressing <A HREF="motion.html#<kHome>"><kHome></A> Vim will think <A HREF="motion.html#<Home>"><Home></A> was pressed.
Mapping <A HREF="motion.html#<kHome>"><kHome></A> will not work then.
*<A NAME="<>"></A><B><></B>*
Examples are often given in the <A HREF="#<>"><></A> <A HREF="#notation">notation</A>. Sometimes this is just to make
clear what you need to type, but often <A HREF="motion.html#it">it</A> can be typed literally, e.g., with
the "<A HREF="map.html#:map">:map</A>" command. The rules are:
1. Any printable characters are typed directly, except <A HREF="#backslash">backslash</A> and '<A HREF="change.html#<"><</A>'
2. A <A HREF="#backslash">backslash</A> is represented with "\\", double <A HREF="#backslash">backslash</A>, or "<A HREF="#<Bslash>"><Bslash></A>".
3. A real '<A HREF="change.html#<"><</A>' is represented with "\<" or "<A HREF="#<lt>"><lt></A>". When there is no
confusion possible, a '<A HREF="change.html#<"><</A>' can be used directly.
4. "<key>" means the special key typed. This is the <A HREF="#notation">notation</A> explained in
the table above. A few examples:
<A HREF="#<Esc>"><Esc></A> Escape key
<C-G> <A HREF="editing.html#CTRL-G">CTRL-G</A>
<A HREF="motion.html#<Up>"><Up></A> cursor up key
<A HREF="tagsrch.html#<C-LeftMouse>"><C-LeftMouse></A> Control- left mouse click
<A HREF="term.html#<S-F11>"><S-F11></A> Shifted function key 11
<M-a> Meta- a ('a' with bit 8 set)
<M-A> Meta- A ('A' with bit 8 set)
<t_kd> "kd" <A HREF="term.html#termcap">termcap</A> entry (cursor down key)
If you want to use the full <A HREF="#<>"><></A> <A HREF="#notation">notation</A> in Vim, you have to make sure the '<A HREF="change.html#<"><</A>'
flag is excluded from <A HREF="options.html#'cpoptions'">'cpoptions'</A> (when <A HREF="options.html#'compatible'">'compatible'</A> is not set, <A HREF="motion.html#it">it</A> already is
by default).
<B> :set cpo-=<</B>
The <A HREF="#<>"><></A> <A HREF="#notation">notation</A> uses <A HREF="#<lt>"><lt></A> to <A HREF="#escape">escape</A> the special meaning of key names. Using a
<A HREF="#backslash">backslash</A> also works, but only when <A HREF="options.html#'cpoptions'">'cpoptions'</A> does not include the '<A HREF="motion.html#B">B</A>' flag.
Examples for <A HREF="map.html#mapping">mapping</A> <A HREF="motion.html#CTRL-H">CTRL-H</A> to the six characters "<A HREF="motion.html#<Home>"><Home></A>":
<B> :imap <C-H> \<Home></B>
<B> :imap <C-H> <lt>Home></B>
The first one only works when the '<A HREF="motion.html#B">B</A>' flag is not in <A HREF="options.html#'cpoptions'">'cpoptions'</A>. The second
one always works.
To get a literal "<A HREF="#<lt>"><lt></A>" in a <A HREF="map.html#mapping">mapping</A>:
<B> :map <C-L> <lt>lt></B>
For <A HREF="map.html#mapping">mapping</A>, abbreviation and menu commands you can then copy-paste the
examples and use them directly. Or type them literally, including the '<A HREF="change.html#<"><</A>' and
'<A HREF="change.html#>">></A>' characters. This does NOT work for other commands, like "<A HREF="options.html#:set">:set</A>" and
"<A HREF="autocmd.html#:autocmd">:autocmd</A>"!
==============================================================================
5. Modes, introduction *<A NAME="vim-modes-intro"></A><B>vim-modes-intro</B>* *<A NAME="vim-modes"></A><B>vim-modes</B>*
Vim has seven BASIC modes:
*<A NAME="Normal"></A><B>Normal</B>* *<A NAME="Normal-mode"></A><B>Normal-mode</B>* *<A NAME="command-mode"></A><B>command-mode</B>*
<A HREF="#Normal">Normal</A> mode In <A HREF="#Normal">Normal</A> mode you can enter all the normal editor
commands. If you start the editor you are in this
mode (unless you have set the <A HREF="options.html#'insertmode'">'insertmode'</A> option,
see below). This is also known <A HREF="motion.html#as">as</A> command mode.
<A HREF="visual.html#Visual">Visual</A> mode This is like <A HREF="#Normal">Normal</A> mode, but the <A HREF="#movement">movement</A> commands
extend a highlighted area. When a non-movement
command is used, <A HREF="motion.html#it">it</A> is executed for the highlighted
area. See |<A HREF="visual.html#Visual-mode">Visual-mode</A>|.
If the <A HREF="options.html#'showmode'">'showmode'</A> option is on "<A HREF="starting.html#--">--</A> VISUAL --" is shown
at the bottom of the <A HREF="windows.html#window">window</A>.
<A HREF="visual.html#Select">Select</A> mode This looks most like the <A HREF="os_win32.html#MS-Windows">MS-Windows</A> selection mode.
Typing a printable character deletes the selection
and starts <A HREF="insert.html#Insert">Insert</A> mode. See |<A HREF="visual.html#Select-mode">Select-mode</A>|.
If the <A HREF="options.html#'showmode'">'showmode'</A> option is on "<A HREF="starting.html#--">--</A> SELECT --" is shown
at the bottom of the <A HREF="windows.html#window">window</A>.
<A HREF="insert.html#Insert">Insert</A> mode In <A HREF="insert.html#Insert">Insert</A> mode the text you type is inserted into the
buffer. See |<A HREF="insert.html#Insert-mode">Insert-mode</A>|.
If the <A HREF="options.html#'showmode'">'showmode'</A> option is on "<A HREF="starting.html#--">--</A> INSERT --" is shown
at the bottom of the <A HREF="windows.html#window">window</A>.
<A HREF="cmdline.html#Command-line">Command-line</A> mode In <A HREF="cmdline.html#Command-line">Command-line</A> mode (also called <A HREF="cmdline.html#Cmdline">Cmdline</A> mode) you
<A HREF="cmdline.html#Cmdline">Cmdline</A> mode can enter one line of text at the bottom of the
<A HREF="windows.html#window">window</A>. This is for the <A HREF="#Ex">Ex</A> commands, "<A HREF="cmdline.html#:">:</A>", the <A HREF="pattern.html#pattern">pattern</A>
search commands, "<A HREF="pattern.html#?">?</A>" and "<A HREF="pattern.html#/">/</A>", and the <A HREF="change.html#filter">filter</A> command,
"<A HREF="change.html#!">!</A>". |<A HREF="cmdline.html#Cmdline-mode">Cmdline-mode</A>|
<A HREF="#Ex">Ex</A> mode Like <A HREF="cmdline.html#Command-line">Command-line</A> mode, but after entering a command
you remain in <A HREF="#Ex">Ex</A> mode. Very limited editing of the
command line. |<A HREF="#Ex-mode">Ex-mode</A>|
Terminal-Job mode Interacting with a <A HREF="channel.html#job">job</A> in a <A HREF="terminal.html#terminal">terminal</A> <A HREF="windows.html#window">window</A>. Typed
keys go to the <A HREF="channel.html#job">job</A> and the <A HREF="channel.html#job">job</A> output is displayed in
the terminal <A HREF="windows.html#window">window</A>. See |<A HREF="terminal.html#terminal">terminal</A>| about how to
switch to other modes.
There are seven ADDITIONAL modes. These are variants of the BASIC modes:
*<A NAME="Operator-pending"></A><B>Operator-pending</B>* *<A NAME="Operator-pending-mode"></A><B>Operator-pending-mode</B>*
<A HREF="#Operator-pending">Operator-pending</A> mode This is like <A HREF="#Normal">Normal</A> mode, but after an <A HREF="motion.html#operator">operator</A>
command has started, and Vim is waiting for a <A HREF="#{motion}">{motion}</A>
to specify the text that the <A HREF="motion.html#operator">operator</A> will work on.
<A HREF="insert.html#Replace">Replace</A> mode <A HREF="insert.html#Replace">Replace</A> mode is a special <A HREF="change.html#case">case</A> of <A HREF="insert.html#Insert">Insert</A> mode. You
can <A HREF="diff.html#do">do</A> the same things <A HREF="motion.html#as">as</A> in <A HREF="insert.html#Insert">Insert</A> mode, but for
each character you enter, one character of the existing
text is deleted. See |<A HREF="insert.html#Replace-mode">Replace-mode</A>|.
If the <A HREF="options.html#'showmode'">'showmode'</A> option is on "<A HREF="starting.html#--">--</A> REPLACE --" is
shown at the bottom of the <A HREF="windows.html#window">window</A>.
Virtual <A HREF="insert.html#Replace">Replace</A> mode Virtual <A HREF="insert.html#Replace">Replace</A> mode is similar to <A HREF="insert.html#Replace">Replace</A> mode, but
instead of file characters you are <A HREF="change.html#replacing">replacing</A> screen
real estate. See |<A HREF="insert.html#Virtual-Replace-mode">Virtual-Replace-mode</A>|.
If the <A HREF="options.html#'showmode'">'showmode'</A> option is on "<A HREF="starting.html#--">--</A> VREPLACE --" is
shown at the bottom of the <A HREF="windows.html#window">window</A>.
<A HREF="insert.html#Insert">Insert</A> <A HREF="#Normal">Normal</A> mode Entered when <A HREF="motion.html#CTRL-O">CTRL-O</A> given in <A HREF="insert.html#Insert">Insert</A> mode. This is
like <A HREF="#Normal">Normal</A> mode, but after executing one command Vim
returns to <A HREF="insert.html#Insert">Insert</A> mode.
If the <A HREF="options.html#'showmode'">'showmode'</A> option is on "<A HREF="starting.html#--">--</A> (insert) --" is
shown at the bottom of the <A HREF="windows.html#window">window</A>.
Terminal-Normal mode Using <A HREF="#Normal">Normal</A> mode in a <A HREF="terminal.html#terminal">terminal</A> <A HREF="windows.html#window">window</A>. Making
changes is impossible. Use an insert command, such <A HREF="motion.html#as">as</A>
"<A HREF="insert.html#a">a</A>" or "<A HREF="insert.html#i">i</A>", to return to Terminal-Job mode.
<A HREF="insert.html#Insert">Insert</A> <A HREF="visual.html#Visual">Visual</A> mode Entered when starting a <A HREF="visual.html#Visual">Visual</A> selection from <A HREF="insert.html#Insert">Insert</A>
mode, e.g., by using <A HREF="motion.html#CTRL-O">CTRL-O</A> and then "<A HREF="visual.html#v">v</A>", "<A HREF="visual.html#V">V</A>" or
<A HREF="visual.html#CTRL-V">CTRL-V</A>. When the <A HREF="visual.html#Visual">Visual</A> selection ends, Vim returns
to <A HREF="insert.html#Insert">Insert</A> mode.
If the <A HREF="options.html#'showmode'">'showmode'</A> option is on "<A HREF="starting.html#--">--</A> (insert) VISUAL --"
is shown at the bottom of the <A HREF="windows.html#window">window</A>.
<A HREF="insert.html#Insert">Insert</A> <A HREF="visual.html#Select">Select</A> mode Entered when starting <A HREF="visual.html#Select">Select</A> mode from <A HREF="insert.html#Insert">Insert</A> mode.
E.g., by dragging the mouse or <A HREF="motion.html#<S-Right>"><S-Right></A>.
When the <A HREF="visual.html#Select">Select</A> mode ends, Vim returns to <A HREF="insert.html#Insert">Insert</A> mode.
If the <A HREF="options.html#'showmode'">'showmode'</A> option is on "<A HREF="starting.html#--">--</A> (insert) SELECT --"
is shown at the bottom of the <A HREF="windows.html#window">window</A>.
==============================================================================
6. Switching from mode to mode *<A NAME="mode-switching"></A><B>mode-switching</B>*
If for any reason you <A HREF="diff.html#do">do</A> not know which mode you are in, you can always get
back to <A HREF="#Normal">Normal</A> mode by typing <A HREF="#<Esc>"><Esc></A> <A HREF="if_cscop.html#twice">twice</A>. This doesn't work for <A HREF="#Ex">Ex</A> mode
though, use "<A HREF="editing.html#:visual">:visual</A>".
You will know you are back in <A HREF="#Normal">Normal</A> mode when you see the screen flash or
hear the bell after you type <A HREF="#<Esc>"><Esc></A>. However, when pressing <A HREF="#<Esc>"><Esc></A> after using
<A HREF="motion.html#CTRL-O">CTRL-O</A> in <A HREF="insert.html#Insert">Insert</A> mode you get a beep but you are still in <A HREF="insert.html#Insert">Insert</A> mode, type
<A HREF="#<Esc>"><Esc></A> again.
*<A NAME="i_esc"></A><B>i_esc</B>*
<B><FONT COLOR="PURPLE"> TO mode </FONT></B>
<B><FONT COLOR="PURPLE"> Normal Visual Select Insert Replace Cmd-line Ex </FONT></B>
<B><FONT COLOR="PURPLE">FROM mode </FONT></B>
<A HREF="#Normal">Normal</A> <A HREF="visual.html#v">v</A> <A HREF="visual.html#V">V</A> ^V *4 *1 <A HREF="change.html#R">R</A> <A HREF="change.html#gR">gR</A> : / ? ! <A HREF="#Q">Q</A>
<A HREF="visual.html#Visual">Visual</A> *2 ^G <A HREF="change.html#c">c</A> C <A HREF="starting.html#--">--</A> : <A HREF="starting.html#--">--</A>
<A HREF="visual.html#Select">Select</A> *5 ^O ^G *6 <A HREF="starting.html#--">--</A> <A HREF="starting.html#--">--</A> <A HREF="starting.html#--">--</A>
<A HREF="insert.html#Insert">Insert</A> <A HREF="#<Esc>"><Esc></A> <A HREF="starting.html#--">--</A> <A HREF="starting.html#--">--</A> <A HREF="insert.html#<Insert>"><Insert></A> <A HREF="starting.html#--">--</A> <A HREF="starting.html#--">--</A>
<A HREF="insert.html#Replace">Replace</A> <A HREF="#<Esc>"><Esc></A> <A HREF="starting.html#--">--</A> <A HREF="starting.html#--">--</A> <A HREF="insert.html#<Insert>"><Insert></A> <A HREF="starting.html#--">--</A> <A HREF="starting.html#--">--</A>
<A HREF="cmdline.html#Command-line">Command-line</A> *3 <A HREF="starting.html#--">--</A> <A HREF="starting.html#--">--</A> <A HREF="insert.html#:start">:start</A> <A HREF="starting.html#--">--</A> <A HREF="starting.html#--">--</A>
<A HREF="#Ex">Ex</A> <A HREF="editing.html#:vi">:vi</A> <A HREF="starting.html#--">--</A> <A HREF="starting.html#--">--</A> <A HREF="starting.html#--">--</A> <A HREF="starting.html#--">--</A> <A HREF="starting.html#--">--</A>
<A HREF="starting.html#--">--</A> not possible
*1 Go from <A HREF="#Normal">Normal</A> mode to <A HREF="insert.html#Insert">Insert</A> mode by giving the command "<A HREF="insert.html#i">i</A>", "<A HREF="insert.html#I">I</A>", "<A HREF="insert.html#a">a</A>",
"<A HREF="insert.html#A">A</A>", "<A HREF="insert.html#o">o</A>", "<A HREF="insert.html#O">O</A>", "<A HREF="change.html#c">c</A>", "<A HREF="change.html#C">C</A>", "<A HREF="change.html#s">s</A>" or S".
*2 Go from <A HREF="visual.html#Visual">Visual</A> mode to <A HREF="#Normal">Normal</A> mode by giving a non-movement command, which
causes the command to be executed, or by hitting <A HREF="#<Esc>"><Esc></A> "<A HREF="visual.html#v">v</A>", "<A HREF="visual.html#V">V</A>" or "<A HREF="visual.html#CTRL-V">CTRL-V</A>"
(see |<A HREF="visual.html#v_v">v_v</A>|), which just stops <A HREF="visual.html#Visual">Visual</A> mode without side effects.
*3 Go from <A HREF="cmdline.html#Command-line">Command-line</A> mode to <A HREF="#Normal">Normal</A> mode by:
- Hitting <A HREF="motion.html#<CR>"><CR></A> or <A HREF="motion.html#<NL>"><NL></A>, which causes the entered command to be executed.
- Deleting the complete line (e.g., with <A HREF="scroll.html#CTRL-U">CTRL-U</A>) and giving a final <A HREF="motion.html#<BS>"><BS></A>.
- Hitting <A HREF="pattern.html#CTRL-C">CTRL-C</A> or <A HREF="#<Esc>"><Esc></A>, which quits the command-line without executing
the command.
In the last <A HREF="change.html#case">case</A> <A HREF="#<Esc>"><Esc></A> may be the character defined with the <A HREF="options.html#'wildchar'">'wildchar'</A>
option, in which <A HREF="change.html#case">case</A> <A HREF="motion.html#it">it</A> will start command-line completion. You can
ignore that and type <A HREF="#<Esc>"><Esc></A> again. {Vi: when hitting <A HREF="#<Esc>"><Esc></A> the command-line
is executed. This is unexpected for most people; therefore <A HREF="motion.html#it">it</A> was changed
in Vim. But when the <A HREF="#<Esc>"><Esc></A> is part of a <A HREF="map.html#mapping">mapping</A>, the command-line is
executed. If you want the <A HREF="#Vi">Vi</A> behaviour also when typing <A HREF="#<Esc>"><Esc></A>, use "<A HREF="map.html#:cmap">:cmap</A>
^V<Esc> ^V^M"}
*4 Go from <A HREF="#Normal">Normal</A> to <A HREF="visual.html#Select">Select</A> mode by:
- use the mouse to select text while <A HREF="options.html#'selectmode'">'selectmode'</A> contains "mouse"
- use a non-printable command to move the cursor while keeping the Shift
key pressed, and the <A HREF="options.html#'selectmode'">'selectmode'</A> option contains "key"
- use "<A HREF="visual.html#v">v</A>", "<A HREF="visual.html#V">V</A>" or "<A HREF="visual.html#CTRL-V">CTRL-V</A>" while <A HREF="options.html#'selectmode'">'selectmode'</A> contains "cmd"
- use "<A HREF="visual.html#gh">gh</A>", "<A HREF="visual.html#gH">gH</A>" or "g CTRL-H" |<A HREF="visual.html#g_CTRL-H">g_CTRL-H</A>|
*5 Go from <A HREF="visual.html#Select">Select</A> mode to <A HREF="#Normal">Normal</A> mode by using a non-printable command to move
the cursor, without keeping the Shift key pressed.
*6 Go from <A HREF="visual.html#Select">Select</A> mode to <A HREF="insert.html#Insert">Insert</A> mode by typing a printable character. The
selection is deleted and the character is inserted.
If the <A HREF="options.html#'insertmode'">'insertmode'</A> option is on, editing a file will start in <A HREF="insert.html#Insert">Insert</A> mode.
*<A NAME="CTRL-\_CTRL-N"></A><B>CTRL-\_CTRL-N</B>* *<A NAME="i_CTRL-\_CTRL-N"></A><B>i_CTRL-\_CTRL-N</B>* *<A NAME="c_CTRL-\_CTRL-N"></A><B>c_CTRL-\_CTRL-N</B>* *<A NAME="v_CTRL-\_CTRL-N"></A><B>v_CTRL-\_CTRL-N</B>*
Additionally the command CTRL-\ <A HREF="motion.html#CTRL-N">CTRL-N</A> or <C-\><C-N> can be used to go to
<A HREF="#Normal">Normal</A> mode from any other mode. This can be used to make sure Vim is in
<A HREF="#Normal">Normal</A> mode, without causing a beep like <A HREF="#<Esc>"><Esc></A> would. However, this does not
work in <A HREF="#Ex">Ex</A> mode. When used after a command that takes an argument, such <A HREF="motion.html#as">as</A>
|<A HREF="motion.html#f">f</A>| or |<A HREF="motion.html#m">m</A>|, the timeout set with <A HREF="options.html#'ttimeoutlen'">'ttimeoutlen'</A> applies.
When focus is in a <A HREF="terminal.html#terminal">terminal</A> <A HREF="windows.html#window">window</A>, CTRL-\ <A HREF="motion.html#CTRL-N">CTRL-N</A> goes to <A HREF="#Normal">Normal</A> mode for only
one command, see |<A HREF="terminal.html#t_CTRL-\_CTRL-N">t_CTRL-\_CTRL-N</A>|.
*<A NAME="CTRL-\_CTRL-G"></A><B>CTRL-\_CTRL-G</B>* *<A NAME="i_CTRL-\_CTRL-G"></A><B>i_CTRL-\_CTRL-G</B>* *<A NAME="c_CTRL-\_CTRL-G"></A><B>c_CTRL-\_CTRL-G</B>* *<A NAME="v_CTRL-\_CTRL-G"></A><B>v_CTRL-\_CTRL-G</B>*
The command CTRL-\ <A HREF="editing.html#CTRL-G">CTRL-G</A> or <C-\><C-G> can be used to go to <A HREF="insert.html#Insert">Insert</A> mode when
<A HREF="options.html#'insertmode'">'insertmode'</A> is set. Otherwise <A HREF="motion.html#it">it</A> goes to <A HREF="#Normal">Normal</A> mode. This can be used to
make sure Vim is in the mode indicated by <A HREF="options.html#'insertmode'">'insertmode'</A>, without knowing in
what mode Vim currently is.
*<A NAME="Q"></A><B>Q</B>* *<A NAME="mode-Ex"></A><B>mode-Ex</B>* *<A NAME="Ex-mode"></A><B>Ex-mode</B>* *<A NAME="Ex"></A><B>Ex</B>* *<A NAME="EX"></A><B>EX</B>* *<A NAME="E501"></A><B>E501</B>*
<A HREF="#Q">Q</A> Switch to "<A HREF="#Ex">Ex</A>" mode. This is a bit like typing "<A HREF="cmdline.html#:">:</A>"
commands one after another, except:
- You don't have to keep pressing "<A HREF="cmdline.html#:">:</A>".
- The screen doesn't get updated after each command.
- There is no normal command-line editing.
- Mappings and <A HREF="map.html#abbreviations">abbreviations</A> are not used.
In fact, you are editing the lines with the "standard"
line-input editing commands (<Del> or <A HREF="motion.html#<BS>"><BS></A> to erase,
<A HREF="scroll.html#CTRL-U">CTRL-U</A> to kill the whole line).
Vim will enter this mode by default if it's invoked <A HREF="motion.html#as">as</A>
"<A HREF="starting.html#ex">ex</A>" on the command-line.
Use the ":vi" command |<A HREF="editing.html#:visual">:visual</A>| to exit "<A HREF="#Ex">Ex</A>" mode.
Note: In older versions of Vim "<A HREF="#Q">Q</A>" formatted text,
that is now done with |<A HREF="change.html#gq">gq</A>|. But if you use the
|<A HREF="vimrc_example.html">vimrc_example.vim</A>| <A HREF="usr_41.html#script">script</A> "<A HREF="#Q">Q</A>" works like "<A HREF="change.html#gq">gq</A>".
*<A NAME="gQ"></A><B>gQ</B>*
<A HREF="#gQ">gQ</A> Switch to "<A HREF="#Ex">Ex</A>" mode like with "<A HREF="#Q">Q</A>", but really behave
like typing "<A HREF="cmdline.html#:">:</A>" commands after another. All command
line editing, completion etc. is available.
Use the ":vi" command |<A HREF="editing.html#:visual">:visual</A>| to exit "<A HREF="#Ex">Ex</A>" mode.
{not in Vi}
==============================================================================
7. The <A HREF="windows.html#window">window</A> contents *<A NAME="window-contents"></A><B>window-contents</B>*
In <A HREF="#Normal">Normal</A> mode and Insert/Replace mode the screen <A HREF="windows.html#window">window</A> will show the current
contents of the buffer: What You See Is What You Get. There are two
exceptions:
- When the <A HREF="options.html#'cpoptions'">'cpoptions'</A> option contains '<A HREF="motion.html#$">$</A>', and the change is within one line,
the text is not directly deleted, but a '<A HREF="motion.html#$">$</A>' is put at the last deleted
character.
- When <A HREF="insert.html#inserting">inserting</A> text in one <A HREF="windows.html#window">window</A>, other <A HREF="windows.html#windows">windows</A> on the same text are not
updated until the insert is finished.
{Vi: The screen is not always updated on slow terminals}
Lines longer than the <A HREF="windows.html#window">window</A> width will wrap, unless the <A HREF="options.html#'wrap'">'wrap'</A> option is off
(see below). The <A HREF="options.html#'linebreak'">'linebreak'</A> option can be set to wrap at a blank character.
If the <A HREF="windows.html#window">window</A> has room after the last line of the buffer, Vim will show '<A HREF="change.html#~">~</A>' in
the first column of the last lines in the <A HREF="windows.html#window">window</A>, like this:
+-----------------------+
|some line |
|last line |
|~ |
|~ |
+-----------------------+
Thus the '<A HREF="change.html#~">~</A>' lines indicate that the end of the buffer was reached.
If the last line in a <A HREF="windows.html#window">window</A> doesn't fit, Vim will indicate this with a '<A HREF="repeat.html#@">@</A>' in
the first column of the last lines in the <A HREF="windows.html#window">window</A>, like this:
+-----------------------+
|first line |
|second line |
|@ |
|@ |
+-----------------------+
Thus the '<A HREF="repeat.html#@">@</A>' lines indicate that there is a line that doesn't fit in the
<A HREF="windows.html#window">window</A>.
When the "lastline" flag is present in the <A HREF="options.html#'display'">'display'</A> option, you will not see
'<A HREF="repeat.html#@">@</A>' characters at the left side of <A HREF="windows.html#window">window</A>. If the last line doesn't fit
completely, only the part that fits is shown, and the last three characters of
the last line are replaced with "@@@", like this:
+-----------------------+
|first line |
|second line |
|a very long line that d|
|oesn't fit in the wi@@@|
+-----------------------+
If there is a single line that is too long to fit in the <A HREF="windows.html#window">window</A>, this is a
special situation. Vim will show only part of the line, around where the
cursor is. There are no special characters shown, so that you can edit all
parts of this line.
{Vi: gives an "internal error" on lines that <A HREF="diff.html#do">do</A> not fit in the window}
The '<A HREF="repeat.html#@">@</A>' occasion in the <A HREF="options.html#'highlight'">'highlight'</A> option can be used to set special
highlighting for the '<A HREF="repeat.html#@">@</A>' and '<A HREF="change.html#~">~</A>' characters. This makes <A HREF="motion.html#it">it</A> possible to
distinguish them from real characters in the buffer.
The <A HREF="options.html#'showbreak'">'showbreak'</A> option contains the <A HREF="eval.html#string">string</A> to put in front of wrapped lines.
*<A NAME="wrap-off"></A><B>wrap-off</B>*
If the <A HREF="options.html#'wrap'">'wrap'</A> option is off, long lines will not wrap. Only the part that
fits on the screen is shown. If the cursor is moved to a part of the line
that is not shown, the screen is scrolled horizontally. The advantage of
this method is that columns are shown <A HREF="motion.html#as">as</A> they are and lines that cannot fit
on the screen can be edited. The disadvantage is that you cannot see all the
characters of a line at once. The <A HREF="options.html#'sidescroll'">'sidescroll'</A> option can be set to the
minimal number of columns to scroll. {Vi: has no <A HREF="options.html#'wrap'">'wrap'</A> option}
All normal ASCII characters are displayed directly on the screen. The <A HREF="motion.html#<Tab>"><Tab></A>
is replaced with the number of spaces that <A HREF="motion.html#it">it</A> represents. Other non-printing
characters are replaced with "^{char}", where {char} is the non-printing
character with 64 added. Thus character 7 (bell) will be shown <A HREF="motion.html#as">as</A> "^G".
Characters between 127 and 160 are replaced with "~{char}", where {char} is
the character with 64 subtracted. These characters occupy more than one
position on the screen. The cursor can only be positioned on the first one.
If you set the <A HREF="options.html#'number'">'number'</A> option, all lines will be preceded with their
number. Tip: If you don't like wrapping lines to mix with the line numbers,
set the <A HREF="options.html#'showbreak'">'showbreak'</A> option to eight spaces:
"<A HREF="options.html#:set">:set</A> <A HREF="options.html#'showbreak'">showbreak</A>=\ \ \ \ \ \ \ \ "
If you set the <A HREF="options.html#'list'">'list'</A> option, <A HREF="motion.html#<Tab>"><Tab></A> characters will not be shown <A HREF="motion.html#as">as</A> several
spaces, but <A HREF="motion.html#as">as</A> "^I". A '<A HREF="motion.html#$">$</A>' will be placed at the end of the line, so you can
find trailing blanks.
In <A HREF="cmdline.html#Command-line">Command-line</A> mode only the command-line itself is shown correctly. The
display of the buffer contents is updated <A HREF="motion.html#as">as</A> soon <A HREF="motion.html#as">as</A> you go back to Command
mode.
The last line of the <A HREF="windows.html#window">window</A> is used for status and other <A HREF="message.html#messages">messages</A>. The
status <A HREF="message.html#messages">messages</A> will only be used if an option is on:
<B><FONT COLOR="PURPLE">status message option default Unix default </FONT></B>
current mode <A HREF="options.html#'showmode'">'showmode'</A> on on
command characters <A HREF="options.html#'showcmd'">'showcmd'</A> on off
cursor position <A HREF="options.html#'ruler'">'ruler'</A> off off
The current mode is "<A HREF="starting.html#--">--</A> INSERT --" or "<A HREF="starting.html#--">--</A> REPLACE --", see |<A HREF="options.html#'showmode'">'showmode'</A>|. The
command characters are those that you typed but were not used yet. {Vi: does
not show the characters you typed or the cursor position}
If you have a slow <A HREF="terminal.html#terminal">terminal</A> you can switch off the status <A HREF="message.html#messages">messages</A> to speed
up editing:
<A HREF="options.html#:set">:set</A> <A HREF="options.html#'nosc'">nosc</A> noru nosm
If there is an error, an error message will be shown for at least one second
(in reverse video). {Vi: error <A HREF="message.html#messages">messages</A> may be overwritten with other
<A HREF="message.html#messages">messages</A> before you have a chance to read them}
Some commands show how many lines were affected. Above which threshold this
happens can be controlled with the <A HREF="options.html#'report'">'report'</A> option (default 2).
On the <A HREF="os_amiga.html#Amiga">Amiga</A> Vim will run in a CLI <A HREF="windows.html#window">window</A>. The name Vim and the full name of
the current file name will be shown in the title <A HREF="motion.html#bar">bar</A>. When the <A HREF="windows.html#window">window</A> is
resized, Vim will automatically redraw the <A HREF="windows.html#window">window</A>. You may make the <A HREF="windows.html#window">window</A> <A HREF="motion.html#as">as</A>
small <A HREF="motion.html#as">as</A> you like, but if <A HREF="motion.html#it">it</A> gets too small not a single line will fit in <A HREF="motion.html#it">it</A>.
Make <A HREF="motion.html#it">it</A> at least 40 characters wide to be able to read most <A HREF="message.html#messages">messages</A> on the
last line.
On most <A HREF="os_unix.html#Unix">Unix</A> systems, resizing the <A HREF="windows.html#window">window</A> is recognized and handled correctly
by Vim. {Vi: not ok}
==============================================================================
8. Definitions *<A NAME="definitions"></A><B>definitions</B>*
buffer Contains lines of text, usually read from a file.
screen The whole area that Vim uses to work in. This can be
a <A HREF="terminal.html#terminal">terminal</A> emulator <A HREF="windows.html#window">window</A>. Also called "the Vim
window".
<A HREF="windows.html#window">window</A> A <A HREF="starting.html#view">view</A> on a buffer. There can be multiple <A HREF="windows.html#windows">windows</A> for
one buffer.
A screen contains one or more <A HREF="windows.html#windows">windows</A>, separated by status lines and with the
command line at the bottom.
+-------------------------------+
screen | <A HREF="windows.html#window">window</A> 1 | <A HREF="windows.html#window">window</A> 2 |
| | |
| | |
|= status line =|= status line =|
| <A HREF="windows.html#window">window</A> 3 |
| |
| |
|==== status line ==============|
|command line |
+-------------------------------+
The command line is also used for <A HREF="message.html#messages">messages</A>. It scrolls up the screen when
there is not enough room in the command line.
A difference is made between four types of lines:
buffer lines The lines in the buffer. This is the same <A HREF="motion.html#as">as</A> the
lines <A HREF="motion.html#as">as</A> they are read from/written to a file. They
can be thousands of characters long.
logical lines The buffer lines with <A HREF="fold.html#folding">folding</A> applied. Buffer lines
in a closed fold are changed to a single logical line:
"+-- 99 lines folded". They can be thousands of
characters long.
<A HREF="windows.html#window">window</A> lines The lines displayed in a <A HREF="windows.html#window">window</A>: A range of logical
lines with wrapping, line breaks, etc. applied. They
can only be <A HREF="motion.html#as">as</A> long <A HREF="motion.html#as">as</A> the width of the <A HREF="windows.html#window">window</A> allows,
longer lines are wrapped or truncated.
screen lines The lines of the screen that Vim uses. Consists of
the <A HREF="windows.html#window">window</A> lines of all <A HREF="windows.html#windows">windows</A>, with status lines
and the command line added. They can only be <A HREF="motion.html#as">as</A> long
<A HREF="motion.html#as">as</A> the width of the screen allows. When the command
line gets longer <A HREF="motion.html#it">it</A> wraps and lines are scrolled to
make room.
<B><FONT COLOR="PURPLE">buffer lines logical lines window lines screen lines </FONT></B>
1. one 1. one 1. +-- folded 1. +-- folded
2. two 2. +-- folded 2. five 2. five
3. three 3. five 3. six 3. six
4. four 4. six 4. seven 4. seven
5. five 5. seven 5. === status line ===
6. six 6. aaa
7. seven 7. bbb
8. ccc ccc <A HREF="change.html#c">c</A>
1. aaa 1. aaa 1. aaa 9. <A HREF="change.html#cc">cc</A>
2. bbb 2. bbb 2. bbb 10. ddd
3. ccc ccc ccc 3. ccc ccc ccc 3. ccc ccc <A HREF="change.html#c">c</A> 11. ~
4. ddd 4. ddd 4. <A HREF="change.html#cc">cc</A> 12. === status line ===
5. ddd 13. (command line)
6. ~
==============================================================================
<A HREF="#top">top</A> - <A HREF="index.html">main help file</A>
</PRE>
</BODY>
</HTML>
|