patch 9.1.1224: cannot :put while keeping indent
Problem: cannot :put while keeping indent (Peter Aronoff)
Solution: add the :iput ex command (64-bitman)
fixes: #16225
closes: #16886
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: 64-bitman <60551350+64-bitman@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt
index 301eace..c656a11 100644
--- a/runtime/doc/change.txt
+++ b/runtime/doc/change.txt
@@ -1,4 +1,4 @@
-*change.txt* For Vim version 9.1. Last change: 2024 Dec 15
+*change.txt* For Vim version 9.1. Last change: 2025 Mar 18
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1149,6 +1149,11 @@
:[line]pu[t]! [x] Put the text [from register x] before [line] (default
current line).
+ *:ip* *:iput*
+:[line]ip[ut] [x] like |:put|, but adjust indent to the current line
+
+:[line]ip[ut]! [x] like |:put|!, but adjust indent to the current line
+
["x]]p or *]p* *]<MiddleMouse>*
["x]]<MiddleMouse> Like "p", but adjust the indent to the current line.
Using the mouse only works when 'mouse' contains 'n'
diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt
index 06a24e0..024102c 100644
--- a/runtime/doc/index.txt
+++ b/runtime/doc/index.txt
@@ -1,4 +1,4 @@
-*index.txt* For Vim version 9.1. Last change: 2025 Jan 03
+*index.txt* For Vim version 9.1. Last change: 2025 Mar 18
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1400,6 +1400,8 @@
|:inoremenu| :inoreme[nu] like ":noremenu" but for Insert mode
|:intro| :int[ro] print the introductory message
|:interface| :interface start of an interface declaration
+|:iput| :ip[ut] like |:put|, but adjust the indent to the
+ current line
|:isearch| :is[earch] list one line where identifier matches
|:isplit| :isp[lit] split window and jump to definition of
identifier
diff --git a/runtime/doc/tags b/runtime/doc/tags
index 8f3fd50..f315390 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -2710,6 +2710,8 @@
:insert insert.txt /*:insert*
:interface vim9class.txt /*:interface*
:intro starting.txt /*:intro*
+:ip change.txt /*:ip*
+:iput change.txt /*:iput*
:is tagsrch.txt /*:is*
:isearch tagsrch.txt /*:isearch*
:isp tagsrch.txt /*:isp*
diff --git a/runtime/doc/version9.txt b/runtime/doc/version9.txt
index b27e124..3e5e681 100644
--- a/runtime/doc/version9.txt
+++ b/runtime/doc/version9.txt
@@ -1,4 +1,4 @@
-*version9.txt* For Vim version 9.1. Last change: 2025 Mar 15
+*version9.txt* For Vim version 9.1. Last change: 2025 Mar 18
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -41704,6 +41704,10 @@
Commands: ~
|[r| and |]r| to move the cursor to previous/next rare word
+
+Ex-Commands: ~
+
+|:iput| like |:put| but adjust indent
|:pbuffer| Edit buffer [N] from the buffer list in the preview
window