aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/if_lua.txt16
-rw-r--r--runtime/doc/index.txt1
-rw-r--r--runtime/doc/motion.txt6
-rw-r--r--runtime/doc/quickref.txt1
-rw-r--r--runtime/doc/usr_25.txt9
5 files changed, 29 insertions, 4 deletions
diff --git a/runtime/doc/if_lua.txt b/runtime/doc/if_lua.txt
index 8528085f47..d527a91a93 100644
--- a/runtime/doc/if_lua.txt
+++ b/runtime/doc/if_lua.txt
@@ -588,6 +588,22 @@ vim.schedule({callback}) *vim.schedule()*
Schedules {callback} to be invoked soon by the main event-loop. Useful
to avoid |textlock| or other temporary restrictions.
+vim.fn.{func}({...})
+ Call vimL function {func} with arguments. {func} can be both builtin
+ functions and user functions. To call autoload functions, use the
+ syntax `vim.fn['some#function']({...})`
+
+ Note: unlike vim.api.|nvim_call_function| this converts values directly
+ between vimL values and lua values. If the vimL function returns a
+ float, it will be representeted directly as a lua number. Both empty
+ lists and dictonaries will be represented by an empty table.
+
+ Note: vim.fn keys are generated on demand. So `pairs(vim.fn)`
+ does NOT work to enumerate all functions.
+
+vim.call({func}, {...})
+ Call vim script function {func}. Equivalent to `vim.fn[func]({...})`
+
vim.type_idx *vim.type_idx*
Type index for use in |lua-special-tbl|. Specifying one of the
values from |vim.types| allows typing the empty table (it is
diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt
index 9e7051b437..7221888074 100644
--- a/runtime/doc/index.txt
+++ b/runtime/doc/index.txt
@@ -767,6 +767,7 @@ tag char note action in Normal mode ~
|gn| gn 1,2 find the next match with the last used
search pattern and Visually select it
|gm| gm 1 go to character at middle of the screenline
+|gM| gM 1 go to character at middle of the text line
|go| go 1 cursor to byte N in the buffer
|gp| ["x]gp 2 put the text [from register x] after the
cursor N times, leave the cursor after it
diff --git a/runtime/doc/motion.txt b/runtime/doc/motion.txt
index 97c7d1cc43..9e24ee0320 100644
--- a/runtime/doc/motion.txt
+++ b/runtime/doc/motion.txt
@@ -219,6 +219,12 @@ g^ When lines wrap ('wrap' on): To the first non-blank
gm Like "g0", but half a screenwidth to the right (or as
much as possible).
+ *gM*
+gM Like "g0", but to halfway the text of the line.
+ With a count: to this percentage of text in the line.
+ Thus "10gM" is near the start of the text and "90gM"
+ is near the end of the text.
+
*g$* *g<End>*
g$ or g<End> When lines wrap ('wrap' on): To the last character of
the screen line and [count - 1] screen lines downward
diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt
index 87cb9b54f5..dfa7218bdf 100644
--- a/runtime/doc/quickref.txt
+++ b/runtime/doc/quickref.txt
@@ -47,6 +47,7 @@ N is used to indicate an optional count that can be given before the command.
|g$| N g$ to last character in screen line (differs from "$"
when lines wrap)
|gm| gm to middle of the screen line
+|gM| gM to middle of the line
|bar| N | to column N (default: 1)
|f| N f{char} to the Nth occurrence of {char} to the right
|F| N F{char} to the Nth occurrence of {char} to the left
diff --git a/runtime/doc/usr_25.txt b/runtime/doc/usr_25.txt
index 3a58af6412..2efb67e55f 100644
--- a/runtime/doc/usr_25.txt
+++ b/runtime/doc/usr_25.txt
@@ -346,12 +346,13 @@ scroll:
g0 to first visible character in this line
g^ to first non-blank visible character in this line
- gm to middle of this line
+ gm to middle of screen line
+ gM to middle of the text in this line
g$ to last visible character in this line
- |<-- window -->|
- some long text, part of which is visible ~
- g0 g^ gm g$
+ |<-- window -->|
+ some long text, part of which is visible in one line ~
+ g0 g^ gm gM g$
BREAKING AT WORDS *edit-no-break*