aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/doc/usr_07.txt2
-rw-r--r--runtime/doc/usr_08.txt2
-rw-r--r--runtime/doc/usr_09.txt4
-rw-r--r--runtime/doc/usr_12.txt2
-rw-r--r--runtime/indent/sh.vim6
5 files changed, 9 insertions, 7 deletions
diff --git a/runtime/doc/usr_07.txt b/runtime/doc/usr_07.txt
index 3fc600d977..cbd81c6b91 100644
--- a/runtime/doc/usr_07.txt
+++ b/runtime/doc/usr_07.txt
@@ -355,7 +355,7 @@ a sentence to the f register (f for First): >
"fyas
The "yas" command yanks a sentence like before. It's the "f that tells Vim
-the text should be place in the f register. This must come just before the
+the text should be placed in the f register. This must come just before the
yank command.
Now yank three whole lines to the l register (l for line): >
diff --git a/runtime/doc/usr_08.txt b/runtime/doc/usr_08.txt
index 575921fc4f..ef91bf9c0a 100644
--- a/runtime/doc/usr_08.txt
+++ b/runtime/doc/usr_08.txt
@@ -45,7 +45,7 @@ top one:
+----------------------------------+
What you see here is two windows on the same file. The line with "====" is
-that status line. It displays information about the window above it. (In
+the status line. It displays information about the window above it. (In
practice the status line will be in reverse video.)
The two windows allow you to view two parts of the same file. For example,
you could make the top window show the variable declarations of a program, and
diff --git a/runtime/doc/usr_09.txt b/runtime/doc/usr_09.txt
index bf3399e379..d345116f08 100644
--- a/runtime/doc/usr_09.txt
+++ b/runtime/doc/usr_09.txt
@@ -60,7 +60,7 @@ THE WINDOW TITLE
At the very top is the window title. This is drawn by your window system.
Vim will set the title to show the name of the current file. First comes the
name of the file. Then some special characters and the directory of the file
-in parens. These special character can be present:
+in parens. These special characters can be present:
- The file cannot be modified (e.g., a help file)
+ The file contains changes
@@ -202,7 +202,7 @@ the "real clipboard" are called clipboard, you'll have to get used to that.
To put text on the real clipboard, select a few different words in one of
the gVims you have running. Then use the Edit/Copy menu entry. Now the text
has been copied to the real clipboard. You can't see this, unless you have
-some application that shows the clipboard contents (e.g., KDE's klipper).
+some application that shows the clipboard contents (e.g., KDE's Klipper).
Now select the other gVim, position the cursor somewhere and use the
Edit/Paste menu. You will see the text from the real clipboard is inserted.
diff --git a/runtime/doc/usr_12.txt b/runtime/doc/usr_12.txt
index 9078f4748a..e87ed81c97 100644
--- a/runtime/doc/usr_12.txt
+++ b/runtime/doc/usr_12.txt
@@ -278,7 +278,7 @@ command: >
The line range "%" is used, thus this works on the whole file. The pattern
that the ":substitute" command matches with is "\s\+$". This finds white
space characters (\s), 1 or more of them (\+), before the end-of-line ($).
-Later will be explained how you write patterns like this |usr_27.txt|.
+Later will be explained how you write patterns like this, see |usr_27.txt|.
The "to" part of the substitute command is empty: "//". Thus it replaces
with nothing, effectively deleting the matched white space.
diff --git a/runtime/indent/sh.vim b/runtime/indent/sh.vim
index ae4f4b53c4..fd9a6a9c92 100644
--- a/runtime/indent/sh.vim
+++ b/runtime/indent/sh.vim
@@ -3,10 +3,11 @@
" Maintainer: Christian Brabandt <cb@256bit.org>
" Previous Maintainer: Peter Aronoff <telemachus@arpinum.org>
" Original Author: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2017-05-02
+" Latest Revision: 2017-08-08
" License: Vim (see :h license)
" Repository: https://github.com/chrisbra/vim-sh-indent
" Changelog:
+" 20170808: - better indent of line continuation
" 20170502: - get rid of buffer-shiftwidth function
" 20160912: - preserve indentation of here-doc blocks
" 20160627: - detect heredocs correctly
@@ -117,7 +118,8 @@ function! GetShIndent()
endfunction
function! s:is_continuation_line(line)
- return a:line =~ '\%(\%(^\|[^\\]\)\\\|&&\|||\)$'
+ return a:line =~ '\%(\%(^\|[^\\]\)\\\|&&\|||\||\)' .
+ \ '\s*\({\s*\)\=\(#.*\)\=$'
endfunction
function! s:find_continued_lnum(lnum)