Skip to content

Refactor - #1642

Merged
rebornix merged 11 commits into
VSCodeVim:masterfrom
rebornix:Refactor
May 4, 2017
Merged

rebornix merged 11 commits into
VSCodeVim:masterfrom
rebornix:Refactor

Conversation

@rebornix

@rebornix rebornix commented May 3, 2017 •

Copy link
Copy Markdown
Member

@rebornix

rebornix commented May 3, 2017

Copy link
Copy Markdown
Member Author

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
Copy Markdown
Member

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

@johnfn

johnfn commented May 4, 2017

Copy link
Copy Markdown
Member

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

@Chillee

Chillee commented May 4, 2017

Copy link
Copy Markdown
Member

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

johnfn commented May 4, 2017 •

Copy link
Copy Markdown
Member

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

rebornix commented May 4, 2017

Copy link
Copy Markdown
Member Author
  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