alefragnani / vscode-copy-word

Copy Word Extension for Visual Studio Code
MIT License
11 stars 4 forks source link

[Pull Request] - overwrite word only when cursor is in middle of word #63

Closed Krysl closed 1 year ago

Krysl commented 1 year ago

https://user-images.githubusercontent.com/5905801/235287283-e994b9bb-ee51-43cb-b0a2-a77c6852d5c3.mp4

commit: https://github.com/Krysl/vscode-copy-word/commit/1d7e61524e0921b8add6d1296e3c7a30b08beb89

vsix package: https://github.com/Krysl/vscode-copy-word/releases/tag/v3.11.0

alefragnani commented 1 year ago

Hi @Krysl ,

Could you please provide more details about your request?

Also, create a proper Pull Request, providing the source code of your changes, instead of a .vsix file.

Thank you.

Krysl commented 1 year ago

commit: https://github.com/Krysl/vscode-copy-word/commit/1d7e61524e0921b8add6d1296e3c7a30b08beb89

@alefragnani I have posted the commit link already. (Maybe it's too small so you missed it)

I created the true pull request just now: https://github.com/alefragnani/vscode-copy-word/pull/64

Krysl commented 1 year ago

@alefragnani

this feature is pretty much what was mentioned in this comment: 20#issuecomment-1207359276:

// original text
world

// put the cursor at the beginning of the word
// | is the cursor
|world

// paste something
// current behavior
hello

// expected behavior
helloworld

in https://github.com/alefragnani/vscode-copy-word/issues/20#issuecomment-1207411407 you say:

the new Copy Word: Paste command, created in #40, reproduces the behavior you described. Which as I understand is the expected behavior of that issue. Pinging @dudeNumber4 to share its thoughts about the command created there.

my pull request gives the combine of original Paste command and the Copy Word: Paste command

original Word
(paste bbbb at `\
` later) original Paste command Copy Word: Paste command
by #40
my pull request
\|aaaa bbbbaaaa bbbb bbbbaaaa
aaaa\| aaaabbbb bbbb aaaabbbb
aa\|aa aabbbbaa bbbb bbbb

I add a configuration:

settings-new-small

If set it to false (default), the behavior remains the same as Copy Word: Paste command by #40. If set it to true, behaviors as shown in the last column of the table

alefragnani commented 1 year ago

Thanks for the details. If everything works fine, it should be available in the next release.

Thank you