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

Support "{char} registers and clipboard access via "* register. #543

Merged
merged 9 commits into from
Aug 2, 2016
Merged

Support "{char} registers and clipboard access via "* register. #543

merged 9 commits into from
Aug 2, 2016

Conversation

aminroosta
Copy link
Contributor

I started working on #537 and as per @rebornix suggestion i used node-copy-paste to access system clipboard.

I've also partially implemented other alpha numeric registers.
A unit test for registers is also added.

@johnfn @rebornix Please let me know if something is missing.


let modeHandler: ModeHandler;

setup(async () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer these to be done in the style of newTest - I find that to be much easier to read. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, feel free to comment on things I've missed ;-)

I will fix them tomorrow (3am here)

Get Outlook for Android

On Mon, Aug 1, 2016 at 2:57 AM +0430, "Grant Mathews" [email protected] wrote:

@@ -0,0 +1,57 @@
+"use strict";
+
+import { ModeHandler } from "../../src/mode/modeHandler";
+import { setupWorkspace, cleanUpWorkspace, assertEqualLines } from '../testUtils';
+
+suite("register", () => {
+

  • let modeHandler: ModeHandler;
  • setup(async () => {

I would prefer these to be done in the style of newTest - I find that to be much easier to read. :)


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
https://github.com/VSCodeVim/Vim/pull/543/files/f3ecd4056c99d2f37571bb3bcc19c613e7e715ce#r72912330

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@johnfn Where can i find an example of "style of newTest" you mentioned ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

modeNormal.test.ts is a good place to look. :)

@aminroosta
Copy link
Contributor Author

aminroosta commented Aug 1, 2016

@johnfn It seems all CI builds with node >= 5 has failed. I changed the "vscode:prepublish" task to "node ./node_modules/vscode/bin/compile -p ./" which sets the current directly as project root. This fixed the issue for me.

Also please take a look at CI build console for this pr, it says that it can't find copy-paste library although the build has been successful. Do you have any idea what's wrong?

@johnfn
Copy link
Member

johnfn commented Aug 2, 2016

Yeah, what the CI is saying is that you need to mark that copy-paste is a dependency. do npm install copy-paste --save.

vimState.recordedState.registerName = register;
return vimState;
}

Copy link
Member

@johnfn johnfn Aug 2, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, this is excellent.

(Yay, someone understands my abstractions... other than me... hehe)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You've done a great job designing project source code, well done @johnfn 👍

@johnfn
Copy link
Member

johnfn commented Aug 2, 2016

This is excellent. Your implementation is exactly how I imagined it would be done.

Clean up those tests and we should be good to go here.

@aminroosta
Copy link
Contributor Author

@johnfn I really enjoy the structure of project and how much easy it is to extend ;-)

I've used new style test and added copy-paste as a dependency.
Some tests about [( and ]) are failing I think they are from this commit.

@johnfn johnfn merged commit 1744906 into VSCodeVim:master Aug 2, 2016
@johnfn
Copy link
Member

johnfn commented Aug 2, 2016

I think @rebornix may know about that (I just merged his PR in which covered those new commands).

In any case, I'm really glad to hear that you found the structure of the project easy to extend! :)

Thanks for the great work here!

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants