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 #32

Open
bagrat opened this issue Jul 15, 2019 · 3 comments
Open

Refactor #32

bagrat opened this issue Jul 15, 2019 · 3 comments
Assignees

Comments

@bagrat
Copy link
Owner

bagrat commented Jul 15, 2019

  • Rethink how to store/cache the state of the buffer or fetch the list every time if the performance allows
  • Make the code more readable by splitting the long functions into smaller units

Related to and will solve #24

@hewcaw
Copy link
Collaborator

hewcaw commented Dec 9, 2019

Seem like you guys kind of busy. I just refactored the logic for vim-buffet here: https://github.com/baIIoon/vim-buffet/tree/cleaning

I'm pretty new to Vimscript, so if you guys don't like it then I just want to contribute with some ideas:

  • We should split the Logic and UI to 2 files
  • Make a good code docs to easy add or tweak features in the Logic or in the UI
  • The UI kind of really hard to understand the numbers

@bagrat
Copy link
Owner Author

bagrat commented Dec 10, 2019

Hey @baIIoon! Thanks for all your contributions and for raising the #39. Indeed, the code is messy and I also have hard time reading it when coming back after a while. Unfortunately, I won't have the time to work on it for a while, but I would be more than happy to review your suggestions and updates.

If you feel like working on it further, I would be happy to add you to the contributors so that you can work directly on this repo. Until then, can you please create a PR from your fork, so the changes are easier to review?

It's not that I'm good at Vimscript either, but what you have suggested, sound solid to me and I'd be glad to see all of that done.

Thanks again!

@hewcaw
Copy link
Collaborator

hewcaw commented Dec 15, 2019

@bagrat, i just created PR, it's actually pretty cumbersome. Please don't merge it.

I just want to show you the idea. The reason why it's so bloated is because: I think we don't have a lot of time to develop vim-buffet, so the code must be easy to understand and in well organized, that will let us add or fix something more easier.

Here are some of my ideas:

  • The flow of reading the code is from top to bottom, so I think we should only call functions inside buffet#update(), buffet#render(), ...
  • plugin/buffet.vim - Only contain global variables, init code, mappings, ... Just not any code implementation.
  • doc/duffet.vim - For who want to add or contribute something (README.md is for users):
    • We can write a basic guidance, the intents
    • Some coding rules for easy maintaining.
    • A dev status block to contains something like: bugs, fixme, future features(reorder buffers, two ends separator), ideas ... anything you guys want.
  • . . . . .

I'm working on all of that (temporary finish refactoring autoload/buffet.vim, intents explaining), you guys can checkout it at: https://github.com/baIIoon/vim-buffet/tree/im_breaking_the_ui

Now I don't have time to develop maybe around a month later, hic 😢 . Man, I love this plugin and you guys so much.

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

3 participants