Coder Social home page Coder Social logo

Refactor about vim-buffet HOT 3 OPEN

bagrat avatar bagrat commented on May 18, 2024
Refactor

from vim-buffet.

Comments (3)

hewcaw avatar hewcaw commented on May 18, 2024

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

from vim-buffet.

bagrat avatar bagrat commented on May 18, 2024

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!

from vim-buffet.

hewcaw avatar hewcaw commented on May 18, 2024

@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.

from vim-buffet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.