comparison runtime/doc/usr_02.txt @ 18719:99586852c2db

Update runtime files Commit: https://github.com/vim/vim/commit/0c0734d527a132edfb4089be48486586424b3f41 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Nov 26 21:44:46 2019 +0100 Update runtime files
author Bram Moolenaar <Bram@vim.org>
date Tue, 26 Nov 2019 21:45:05 +0100
parents 5c5908e81e93
children af69c9335223
comparison
equal deleted inserted replaced
18718:710efe6952f4 18719:99586852c2db
1 *usr_02.txt* For Vim version 8.1. Last change: 2017 Mar 14 1 *usr_02.txt* For Vim version 8.1. Last change: 2019 Nov 21
2 2
3 VIM USER MANUAL - by Bram Moolenaar 3 VIM USER MANUAL - by Bram Moolenaar
4 4
5 The first steps in Vim 5 The first steps in Vim
6 6
253 Type "u" to undo the last delete. That delete removed the g, so the undo 253 Type "u" to undo the last delete. That delete removed the g, so the undo
254 restores the character. 254 restores the character.
255 255
256 g intelligent turtle ~ 256 g intelligent turtle ~
257 257
258 The next u command restores the next-to-last character deleted: 258 The next "u" command restores the next-to-last character deleted:
259 259
260 ng intelligent turtle ~ 260 ng intelligent turtle ~
261 261
262 The next u command gives you the u, and so on: 262 The next "u" command gives you the u, and so on:
263 263
264 ung intelligent turtle ~ 264 ung intelligent turtle ~
265 oung intelligent turtle ~ 265 oung intelligent turtle ~
266 young intelligent turtle ~ 266 young intelligent turtle ~
267 young intelligent turtle ~ 267 young intelligent turtle ~
373 373
374 Note: 374 Note:
375 Unlike many other editors, Vim does not automatically make a backup 375 Unlike many other editors, Vim does not automatically make a backup
376 file. If you type "ZZ", your changes are committed and there's no 376 file. If you type "ZZ", your changes are committed and there's no
377 turning back. You can configure the Vim editor to produce backup 377 turning back. You can configure the Vim editor to produce backup
378 files, see |07.4|. 378 files; see |07.4|.
379 379
380 380
381 DISCARDING CHANGES 381 DISCARDING CHANGES
382 382
383 Sometimes you will make a sequence of changes and suddenly realize you were 383 Sometimes you will make a sequence of changes and suddenly realize you were
396 message and refuse to exit: 396 message and refuse to exit:
397 397
398 E37: No write since last change (use ! to override) ~ 398 E37: No write since last change (use ! to override) ~
399 399
400 By specifying the override, you are in effect telling Vim, "I know that what 400 By specifying the override, you are in effect telling Vim, "I know that what
401 I'm doing looks stupid, but I'm a big boy and really want to do this." 401 I'm doing looks stupid, but I really want to do this."
402 402
403 If you want to continue editing with Vim: The ":e!" command reloads the 403 If you want to continue editing with Vim: The ":e!" command reloads the
404 original version of the file. 404 original version of the file.
405 405
406 ============================================================================== 406 ==============================================================================
549 549
550 7) Command line editing and arguments start with c_. Help for using the 550 7) Command line editing and arguments start with c_. Help for using the
551 command argument %: > 551 command argument %: >
552 :help c_% 552 :help c_%
553 553
554 8) Ex-commands always start with ":", so to go to the :s command help: > 554 8) Ex-commands always start with ":", so to go to the ":s" command help: >
555 :help :s 555 :help :s
556 556
557 9) Commands specifically for debugging start with ">". To go to the help 557 9) Commands specifically for debugging start with ">". To go to the help
558 for the "cont" debug command: > 558 for the "cont" debug command: >
559 :help >cont 559 :help >cont
560 560
561 10) Key combinations. They usually start with a single letter indicating 561 10) Key combinations. They usually start with a single letter indicating
562 the mode for which they can be used. E.g.: > 562 the mode for which they can be used. E.g.: >
563 :help i_CTRL-X 563 :help i_CTRL-X
564 < takes you to the family of Ctrl-X commands for insert mode which can be 564 < takes you to the family of CTRL-X commands for insert mode which can be
565 used to auto complete different things. Note, that certain keys will 565 used to auto-complete different things. Note, that certain keys will
566 always be written the same, e.g. Control will always be CTRL. 566 always be written the same, e.g. Control will always be CTRL.
567 For normal mode commands there is no prefix and the topic is available at 567 For normal mode commands there is no prefix and the topic is available at
568 :h CTRL-<Letter>. E.g. > 568 :h CTRL-<Letter>. E.g. >
569 :help CTRL-W 569 :help CTRL-W
570 < In contrast > 570 < In contrast >
571 :help c_CTRL-R 571 :help c_CTRL-R
572 < will describe what the Ctrl-R does when entering commands in the Command 572 < will describe what the CTRL-R does when entering commands in the Command
573 line and > 573 line and >
574 :help v_Ctrl-A 574 :help v_CTRL-A
575 < talks about incrementing numbers in visual mode and > 575 < talks about incrementing numbers in visual mode and >
576 :help g_CTRL-A 576 :help g_CTRL-A
577 < talks about the g<C-A> command (e.g. you have to press "g" then <Ctrl-A>). 577 < talks about the "g<C-A>" command (e.g. you have to press "g" then
578 Here the "g" stand for the normal command "g" which always expects a second 578 <CTRL-A>). Here the "g" stand for the normal command "g" which always
579 key before doing something similar to the commands starting with "z" 579 expects a second key before doing something similar to the commands
580 starting with "z"
580 581
581 11) Regexp items always start with /. So to get help for the "\+" quantifier 582 11) Regexp items always start with /. So to get help for the "\+" quantifier
582 in Vim regexes: > 583 in Vim regexes: >
583 :help /\+ 584 :help /\+
584 < If you need to know everything about regular expressions, start reading 585 < If you need to know everything about regular expressions, start reading
645 particular help page: > 646 particular help page: >
646 :help usr_24.txt 647 :help usr_24.txt
647 < Also if you want to access a certain chapter in the help, the chapter 648 < Also if you want to access a certain chapter in the help, the chapter
648 number can be accessed directly like this: > 649 number can be accessed directly like this: >
649 :help 10.1 650 :help 10.1
650 < goes to chapter 10.1 in |usr_10.txt| and talks about recording macros. 651 < which goes to chapter 10.1 in |usr_10.txt| and talks about recording
652 macros.
651 653
652 19) Highlighting groups. Always start with hl-groupname. E.g. > 654 19) Highlighting groups. Always start with hl-groupname. E.g. >
653 :help hl-WarningMsg 655 :help hl-WarningMsg
654 < talks about the WarningMsg highlighting group. 656 < talks about the WarningMsg highlighting group.
655 657
656 20) Syntax highlighting is namespaced to :syn-topic e.g. > 658 20) Syntax highlighting is namespaced to :syn-topic. E.g. >
657 :help :syn-conceal 659 :help :syn-conceal
658 < talks about the conceal argument for the :syn command. 660 < talks about the conceal argument for the ":syn" command.
659 661
660 21) Quickfix commands usually start with :c while location list commands 662 21) Quickfix commands usually start with :c while location list commands
661 usually start with :l 663 usually start with :l
662 664
663 22) Autocommand events can be found by their name: > 665 22) Autocommand events can be found by their name: >
686 26) Error and Warning codes can be looked up directly in the help. So > 688 26) Error and Warning codes can be looked up directly in the help. So >
687 :help E297 689 :help E297
688 < takes you exactly to the description of the swap error message and > 690 < takes you exactly to the description of the swap error message and >
689 :help W10 691 :help W10
690 < talks about the warning "Changing a readonly file". 692 < talks about the warning "Changing a readonly file".
691 Sometimes however, those error codes are not described, but rather are 693 Sometimes, however, those error codes are not described, but rather are
692 listed at the Vim command that usually causes this. So: > 694 listed at the Vim command that usually causes this. So: >
693 :help E128 695 :help E128
694 < takes you to the |:function| command 696 < takes you to the |:function| command
695 697
696 698