Lines Matching refs:with
8 changing text means deleting the text and replacing it with other text using
10 commands with the "." command.
91 Delete {count} lines, starting with [range]
95 These commands delete text. You can repeat them with the `.` command
110 J Join [count] lines, with a minimum of two lines.
117 {Visual}J Join the highlighted lines, with a minimum of two
122 gJ Join [count] lines, with a minimum of two lines.
126 {Visual}gJ Join the highlighted lines, with a minimum of two
131 Join [range] lines. Same as "J", except with [!]
135 join the current line with the line below it.
139 Join {count} lines, starting with [range] (default:
141 with [!] the join does not insert or delete any
150 there is trailing white space or the next line starts with a ')'. These
167 an existing character, starting with the character
181 there is no text to delete (e.g., with "cTx" when the
226 - You can end Insert and Replace mode with <Esc>.
256 :{range}c[hange][!] Replace lines of text with some different text.
267 r{char} Replace the character under the cursor with {char}.
269 character. To replace with a real <CR>, use CTRL-V
270 <CR>. CTRL-V <NL> replaces with a <Nul>.
273 line below or above is used, just like with |i_CTRL-E|
274 and |i_CTRL-Y|. This also works with a count, thus
278 with [count] {char}s. When {char} is a <CR> or <NL>,
280 five characters with a single line break.
292 gr{char} Replace the virtual characters under the cursor with
295 details. As with |r| a count may be given.
296 {char} can be entered like with |r|.
419 - When 'nrformats' includes "bin", Vim assumes numbers starting with '0b' or
421 - When 'nrformats' includes "octal", Vim considers numbers starting with a '0'
426 - When 'nrformats' includes "hex", Vim assumes numbers starting with '0x' or
431 under or after the cursor. This is useful to make lists with an alphabetic
438 For numbers with leading zeros (including all octal and hexadecimal numbers),
441 There is one exception: When a number that starts with a zero is found not to
446 Note that when 'nrformats' includes "octal", decimal numbers with leading
447 zeros cause mistakes, because they can be confused with octal numbers.
449 Note similarly, when 'nrformats' includes "bin", binary numbers with a leading
456 1. Create the first list entry, make sure it starts with a number.
500 with [range] (default current line |cmdline-ranges|).
513 with [range] (default current line |cmdline-ranges|).
527 '#' with a zero value, shift right does not affect lines starting with '#'
529 This can be changed with the 'cino' option, see |cino-#|.
533 made out of spaces with the same indent made out of <Tab>s (and a few spaces
557 option). You can repeat filter commands with ".". Vim does not recognize a
558 comment (starting with '"') after the `:!` command.
574 {filter}. Vim replaces the optional bangs with the
591 given with the 'equalprg' option. When the 'equalprg'
600 == Filter [count] lines like with ={motion}.
603 {Visual}= Filter the highlighted lines like with ={motion}.
626 with {string}.
632 [count] lines, starting with the last line in [range].
644 Repeat last :substitute with same search pattern and
656 Repeat last substitute with same substitute string
657 but with last used search pattern. This is like
667 g& Synonym for `:%s//~/&` (repeat last substitute with
668 last search pattern on all lines with the same flags).
669 For example, when you first do a substitution with
690 [c] Confirm each substitution. Vim highlights the matching string (with
745 [r] Only useful in combination with `:&` or `:s` without arguments. `:&r`
752 For `:s` with an argument this already happens: >
756 < The last commands will replace "green" with "red". >
760 < The last command will replace "blue" with "red".
779 For compatibility with Vi these two exceptions are allowed:
797 When the {string} starts with "\=" it is evaluated as an expression, see
803 When {string} is equal to "%" and '/' is included with the 'cpoptions' option,
807 & \& replaced with the whole matched pattern *s/\&*
808 \& & replaced with &
809 \0 replaced with the whole matched pattern *\0* *s/\0*
810 \1 replaced with the matched pattern in the first
812 \2 replaced with the matched pattern in the second
815 \9 replaced with the matched pattern in the ninth
817 ~ \~ replaced with the {string} of the previous
819 \~ ~ replaced with ~ *s/\~*
840 the |substitute()| function with the following exceptions:
856 not compatible with Vi and older versions of Vim, where the "\u" would cancel
875 When using parentheses in combination with '|', like in \([ab]\)\|\([cd]\),
888 These commands repeat the previous `:substitute` command with the given flags.
917 Substitute with an expression *sub-replace-expression*
919 When the substitute string starts with "\=" the remainder is interpreted as an
924 can get one with a double-quote string: "\n". Prepend a backslash to get a
933 When the result is a |List| then the items are joined with separating line
938 matched text can be accessed with "submatch(0)". The text matched with the
939 first pair of () with "submatch(1)". Likewise for further sub-matches in ().
947 This replaces an end-of-line with a new line containing the value of $HOME. >
950 This replaces each 'E' character with a euro sign. Read more in |<Char->|.
972 <Tab> with new strings of white-space using the new
979 spaces with tabs where appropriate.
980 With 'expandtab' on, Vim replaces all tabs with the
998 with tabstops at 8 but edited with tabstops set at 4. Warning: white space
1011 an uppercase character to append with delete and yank.
1012 Registers ".", "%", "#" and ":" only work with put.
1064 with `zp`. (for {Visual} see |Visual-mode|)
1072 Yank {count} lines, starting with last line number
1093 pasting with the middle mouse button: >
1125 previous expression. You can see it with ":dis =".
1146 combination with |v_zy|.
1149 by first getting the text into a register with a yank, delete or change
1150 command, then inserting the register contents with a put command. You can
1156 You can repeat the put commands with "." (except for :put) and undo them. If
1161 exchange two characters with the command sequence "xp". You can exchange two
1162 lines with the command sequence "ddp". You can exchange two words with the
1163 command sequence "deep" (start with the cursor in the blank space before the
1170 replace the selected text with the contents of the register. Whether this
1192 yanked or deleted. Vim may replace some <Tab> characters with spaces to make
1224 Vim fills this register with text deleted with the "d", "c", "s", "x" commands
1225 or copied with the yank "y" command, regardless of whether or not a specific
1232 which does not specify a register. Additionally you can access it with the
1239 Vim fills these registers with text from yank and delete commands.
1241 unless the command specified another register with ["x].
1245 made for the delete operator with these movement commands: |%|, |(|, |)|, |`|,
1258 except when the command specifies a register with ["x].
1267 These are '%', '#', ':' and '.'. You can use them only with the "p", "P",
1268 and ":put" commands and with CTRL-R.
1271 with the insert mode commands CTRL-A and CTRL-@). Note: this
1272 doesn't work with CTRL-R on the command-line. It works a bit
1296 It can also accept a match with an existing buffer name: >
1310 result of the expression. If you end it with <Esc>, Vim abandons the
1312 expression (like with the "/" command).
1340 {only available when compiled with the |+dnd| feature, currently only with the
1353 It is writable with `:let`, you can change it to have 'hlsearch' highlight
1360 You can write to a register with a `:let` command |:let-@|. Example: >
1400 Formatting is done with one of three methods:
1410 length is the screen width (with a maximum width of
1436 gww Format the current line as with "gw".
1439 {Visual}gw Format the highlighted text as with "gw". (for
1446 the cursor. This allows you to repeat formatting repeated with ".". This
1447 works well with "gqj" (format current and next line) and "gq}" (format until
1449 the first formatted line (as with using a filter command).
1459 Formatting does not change empty lines (but it does change lines with only
1476 For example, the XML filetype plugin distributed with Vim in the $VIMRUNTIME
1519 There is no command in Vim to right justify text. You can do it with
1531 type of comment used in shell scripts, starting with "#".
1533 lines. An example is this list with dashes.
1548 n Nested comment. Nesting with mixed parts is allowed. If 'comments'
1549 is "n:),n:>" a line starting with "> ) >" is a comment.
1562 l Left align. Used together with 's' or 'e', the leftmost character of
1563 start or end will line up with the leftmost character from the middle.
1577 When together with 's' or 'e': add {digit} amount of offset to an
1597 A three-piece comment must always be given as start,middle,end, with no other
1610 middle-comment leader with the end-comment leader and apply any specified
1613 When there is a match with a middle part, but there also is a matching end
1615 without requiring the middle part to end with a space.
1633 backwards perspective; the result is that the same alignment flag used with
1643 indent alignments. However, 'indentexpr' has the ability to work better with
1647 "b:*" Includes lines starting with "*", but not if the "*" is
1650 "n:>" Includes a line starting with ">", ">>", ">>>", etc.
1651 "fb:-" Format a list that starts with "- ".
1653 By default, "b:#" is included. This means that a line that starts with
1654 "#include" is not recognized as a comment line. But a line that starts with
1660 default setting is "tcq". You can separate the option letters with commas for
1676 q Allow formatting of comments with "gq".
1694 well together with "2".
1750 intended to complement 'joinspaces' and |cpo-J|, for prose with
1751 sentences separated by two spaces. For example, with 'textwidth' set
1776 'textwidth' is still useful for formatting with "gq".
1780 Opening a new line before or after "/*" or "*/" (with 'r' or 'o' present in
1782 happens with formatting and auto-wrapping. Opening a line after a line
1783 starting with "/*" or "*" and containing "*/", will cause no comment leader to
1793 All of this should be really cool, especially in conjunction with the new
1799 < for Mail/news (format all, don't start comment with "o" command): >
1815 specifically for one file with a |modeline|.
1817 - Set 'formatoptions' to "aw2tq" to make text with indents like this:
1837 deleting the last line of a paragraph with |dd|, the paragraph will be
1838 joined with the next one.
1843 - Formatting a long paragraph and/or with complicated indenting may be slow.
1880 if Vim was compiled with Floating point support.
1901 the text matched with {pattern} is skipped, so that
1935 Note that using `:sort` with `:global` doesn't sort the matching lines, it's
1942 process you may end up with duplicated lines. This also depends on the system