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

完善一下功能 #3

Closed
wants to merge 3 commits into from
Closed

Conversation

IammyselfYBX
Copy link

添加功能
1.自动检测是否有live-server和brower-sync软件
如果没有自动安装
2.绑定与,使得可以选择启动是live-server还是brower-sync服务

1.如果LiveServerPort的值不为空就打印
Live Server on port ${LiveServerPort} terminated.
否则打印
Live Server on port 8080 terminated.
2.如果BrowerSyncPort的值不为空就打印BrowserSync server on port ${BrowerSyncPort} terminated.
否则打印BrowserSync server on port 3000 terminated.
@IammyselfYBX
Copy link
Author

Hello, I was lucky enough to find your plug-in which is simple and can solve practical problems, but I hope to add 3 functions

  1. Automatically check whether live-server or browser-sync is installed, so that it can be run directly when I use it without having to launch the installation.
  2. Binding of shortcut keys, because many of the functions of live-server and brower-sync are repeated, but brower-sync may be more powerful, so I hope to add shortcut keys that can be selected
  3. Where is the kill function? Before, your code would print "BrowserSync server on port 3000 terminated." or "Live Server on port 8080 terminated." regardless of whether the port was set or not. Here I introduced two variables.
    " Set default values for ports (optional)
    let g:BrowserSyncPort = ''
    let g:LiveServerPort = ''
    Improved the printout of the kill function

@wolandark
Copy link
Owner

wolandark commented Jun 25, 2024

Hello,
Please rebase the branch and rewrite your commit messages. I can't read chinese.

However, a few things will not be merged no matter what,

  • running sudo on behalf of the user from vim will not be merged!

    • it's not a bad idea to check whether the backends are installed or not, but a :echom No Backend Found! should suffice, although even that is redundant! If the user cannot be trusted to install a backend as the README requires, they should just use vscode :)
  • mapping of keys on behalf of the user will not be merged!

    • it is generally a bad idea to map keys on behalf of the user. Mappings can be suggested, as they already exist in the README.
  • There enough kill functions in the code, idk what you mean by 'where is the kill function?'! Also there is no need to bind a default port since both live-server and browser-sync have default ports defined for them internally. If there is a point in doing this, pls explain further.

@wolandark wolandark closed this Aug 9, 2024
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