From 47de57947131d56d06cf433cf49390e493290439 Mon Sep 17 00:00:00 2001 From: Juan Luque Date: Thu, 27 Feb 2025 09:59:31 -0500 Subject: [PATCH 1/3] Update README.md (#261) Fix typo: surround with '[ ]' command `s[` was listed twice. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7bb9de8..cb453e1 100644 --- a/README.md +++ b/README.md @@ -186,7 +186,7 @@ map sb :surround_brackets map s( :surround_brackets map s) :surround_brackets map s[ :surround_square_brackets -map s[ :surround_square_brackets +map s] :surround_square_brackets map s{ :surround_curly_brackets map s} :surround_curly_brackets ``` From 4aa4ca31f18e6e0e9ca30591d63efab1f513054c Mon Sep 17 00:00:00 2001 From: Juan Luque Date: Wed, 9 Apr 2025 01:47:08 -0400 Subject: [PATCH 2/3] Fix `pasteinto` error when clipboard text has surrounding whitespace. (#262) `pasteinto` is called by `surroundFunc` which a string into whitespace delimited arguments. Surrounding whitespace in the link to be copied thus errors due to an unhandled number of arguments. The now fixed error can be recreated by using `yy` to yank a line and then using to paste the link over a word. Similarly, `yW` will reproduce the error if the link has a trailing whitespace. `pasteinto` will still error if the link contains internal whitespace, but this is more reasonable behavior. Fixing this will require tweaking the regex `surroundFunc` uses to split up arguments. --- main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.ts b/main.ts index 9aa7685..2a1471b 100644 --- a/main.ts +++ b/main.ts @@ -521,7 +521,7 @@ export default class VimrcPlugin extends Plugin { // Using the register for when this.yankToSystemClipboard == false surroundFunc( ['[', - '](' + vimObject.getRegisterController().getRegister('yank').keyBuffer + ")"]); + '](' + vimObject.getRegisterController().getRegister('yank').keyBuffer[0].trim() + ")"]); }) var editor = this.getActiveView().editor; From 774de342055cba0b0641879de4241aad833c830a Mon Sep 17 00:00:00 2001 From: Dmitry Surin Date: Fri, 22 Aug 2025 06:28:13 +0300 Subject: [PATCH 3/3] Update README.md (#272) Not enough examples in readme. Trying to fix that. Spend some time to find this ability to run command without exmap --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index cb453e1..5960457 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,9 @@ exmap back obcommand app:go-back nmap :back exmap forward obcommand app:go-forward nmap :forward + +" Also works +nmap h :obcommandworkspace:split-horizontal ``` ## Supported Commands @@ -577,3 +580,4 @@ Fixed [an issue](https://github.com/esm7/obsidian-vimrc-support/issues/2) caused The plugin now injects the Vimrc just once for the CodeMirror class (for the class -- not object instance, because that's where CodeMirror keeps the Vim settings.) This seems to work well, but in theory there could be Vimrc settings that are CodeMirror-object bound and not class-bound, and in that case we'll be in trouble (these settings will be lost when Obsidian replaces CodeMirror objects). +