Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Krysl opened this issue Apr 29, 2023 · 4 comments
Closed

Comments

@Krysl
Copy link
Contributor

Krysl commented Apr 29, 2023

screen.recording.mp4

commit: Krysl@1d7e615

  • add a setting copyWord.overwriteWordBehavior (default false):
    Settings
    • add localization for chinese
  • add tests for the feature

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

@alefragnani
Copy link
Owner

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
Copy link
Contributor Author

Krysl commented Apr 29, 2023

commit: Krysl@1d7e615

@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: #64

@Krysl
Copy link
Contributor Author

Krysl commented Apr 29, 2023

@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 #20 (comment) 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
Copy link
Owner

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

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants