vim: Refactor and fix multiline operations (#25055)
Changes: - [x] Cursor at the start during yank operations on objects (`yip`, `yab` etc). - [x] Refactors this: Trim all leading and trailing whitespace from inner multiline bracket selection. - This leaves a nicely indented line when doing `ci{` `vi{d` etc - [x] Checks for empty selection - [x] Removed moving cursor to the start in visual bracket operations This cleans up the previous implementation by providing a simpler check in `surrounding_markers`, instead of calling a new function in `expand_object`. No functionality was changed there except for handling the empty selection and removing some cursor adjustments that should not have been there after further testing. Release Notes: - N/A
This commit is contained in:
parent
980e1b533f
commit
52f73e0c2d
4 changed files with 56 additions and 109 deletions
|
@ -1,20 +0,0 @@
|
|||
{"Put":{"state":"func empty(a string) bool {\n if a == \"\" {\n return true\n }\n ˇreturn false\n}"}}
|
||||
{"Key":"v"}
|
||||
{"Key":"i"}
|
||||
{"Key":"{"}
|
||||
{"Get":{"state":"func empty(a string) bool {\n «ˇif a == \"\" {\n return true\n }\n return false»\n}","mode":"Visual"}}
|
||||
{"Put":{"state":"func empty(a string) bool {\n if a == \"\" {\n ˇreturn true\n }\n return false\n}"}}
|
||||
{"Key":"v"}
|
||||
{"Key":"i"}
|
||||
{"Key":"{"}
|
||||
{"Get":{"state":"func empty(a string) bool {\n if a == \"\" {\n «ˇreturn true»\n }\n return false\n}","mode":"Visual"}}
|
||||
{"Put":{"state":"func empty(a string) bool {\n if a == \"\" ˇ{\n return true\n }\n return false\n}"}}
|
||||
{"Key":"v"}
|
||||
{"Key":"i"}
|
||||
{"Key":"{"}
|
||||
{"Get":{"state":"func empty(a string) bool {\n if a == \"\" {\n «ˇreturn true»\n }\n return false\n}","mode":"Visual"}}
|
||||
{"Put":{"state":"func empty(a string) bool {\n if a == \"\" {\n return true\n }\n return false\nˇ}"}}
|
||||
{"Key":"v"}
|
||||
{"Key":"i"}
|
||||
{"Key":"{"}
|
||||
{"Get":{"state":"func empty(a string) bool {\n «ˇif a == \"\" {\n return true\n }\n return false»\n}","mode":"Visual"}}
|
Loading…
Add table
Add a link
Reference in a new issue