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

Refactor #1642

Merged
merged 11 commits into from
May 4, 2017
Merged

Refactor #1642

merged 11 commits into from
May 4, 2017

Conversation

rebornix
Copy link
Member

@rebornix rebornix commented May 3, 2017

@rebornix
Copy link
Member Author

rebornix commented May 3, 2017

Ping @johnfn @xconverge , jumping inside actions.ts now is a real pain so I'm thinking about separating actions to motion, operator, textobject and plugins.

@xconverge
Copy link
Member

works for me, it seemed to bother people, I don't have strong opinions on it but looks like a good idea!

@johnfn
Copy link
Member

johnfn commented May 4, 2017

Ooh it's happening!!! I am 100% in favor of this.

@Chillee
Copy link
Member

Chillee commented May 4, 2017

I actually started doing this myself, so I could finish it if none of you guys have any particular opinions about how it's done?

I was pretty much just planning on separating it similarly to how rebornix was suggesting.

@johnfn
Copy link
Member

johnfn commented May 4, 2017

I think @rebornix's solution of subdividing it into different files within actions.ts is exactly correct.

We already have very natural subdivisions for the most part - motions, commands, operators. Motions subdivide into normal motions and text objects. Commands could subdivide into normal mode commands and special insert mode commands. After that we could think about going further if necessary.

@rebornix
Copy link
Member Author

rebornix commented May 4, 2017

  1. Moving motion/operator/textobject out as they are basic elements
  2. Moving plugins out
  3. Moving insert command out
  4. Now actions only contain commands which are composed by above elements.
  5. Moving things to src/common if they are common logic code
  6. As we have more layers, I enable absolute path module resolution, so now if you want to reference an operator, do src/actions/operator instead of ../../xyz/operator

@rebornix rebornix merged commit b1a9f84 into VSCodeVim:master May 4, 2017
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.

4 participants