kat0h / bufpreview.vim

A markdown previewer for Vim and Neovim
MIT License
94 stars 11 forks source link

Add new options to specify server host and port #20

Closed rinx closed 2 years ago

rinx commented 2 years ago

Signed-off-by: Rintaro Okamura rintaro.okamura@gmail.com

In this PR, I added g:bufpreview_server_host (b:bufpreview_server_host) and g:bufpreview_server_port (b:bufpreview_server_port) options that represent the server hostname and port number.

Could you please consider to add such configuration options?

kat0h commented 2 years ago

sorry i made this commit conflict i'll fix it soon

kat0h commented 2 years ago

thank you for your great work!๐Ÿ™‡๐Ÿป

i think that Listenner.addr.hostname returns "::1" if hostname is "localhost". (As a result, the specified address is not recognized by the browser and does not seem to open properly.)

I would appreciate it if you could confirm

(Forgive me if I am wrong)

ใ‚นใ‚ฏใƒชใƒผใƒณใ‚ทใƒงใƒƒใƒˆ 0003-10-15 ๅˆๅ‰0 26 53
kat0h commented 2 years ago

ใ”ใ‚ใ‚“ใชใ•ใ„ ็งใฎ็’ฐๅขƒใฎๅ•้กŒใ‹ใ‚‚ใ—ใ‚Œใชใ„ใงใ™โ€ฆ

Deno.listen()ใซhostname: 127.0.0.1ใ‚’ๅˆฉ็”จใ™ใ‚Œใฐใ†ใพใๅ‹•ใใใ†ใงใ—ใŸ

rinx commented 2 years ago

@kat0h ใ”็ขบ่ชใ‚ใ‚ŠใŒใจใ†ใ”ใ–ใ„ใพใ™ใ€‚ ๅ–ใ‚Šๆ€ฅใŽใ‚ณใƒณใƒ•ใƒชใ‚ฏใƒˆใฎ่งฃๆถˆใ‚’ใ—ใพใ—ใŸใ€‚(#21 ใจใ‹ใกๅˆใ†็ฎ‡ๆ‰€ใŒใ‚ใ‚Šใพใ—ใŸใ€‚ใ™ใฟใพใ›ใ‚“โ€ฆ)

hostname: "localhost" ใซใ™ใ‚‹ใจใƒ–ใƒฉใ‚ฆใ‚ถๅดใงใ†ใพใ้–‹ใ‘ใชใ„ไปถใ€็งใฎ็’ฐๅขƒใงใฏๅ†็พใ—ใพใ›ใ‚“ใงใ—ใŸใ€‚ใ€‚

kat0h commented 2 years ago

ใ‚ณใƒณใƒ•ใƒชใ‚ฏใƒˆ่งฃๆถˆใ‚ใ‚ŠใŒใจใ†ใ”ใ–ใ„ใพใ™ใ€‚

hostnameใซใคใ„ใฆใชใฎใงใ™ใŒใ€ใ‚‚ใ—ใ‚ˆใ‚ใ—ใ‘ใ‚Œใฐใƒ‡ใƒ•ใ‚ฉใƒซใƒˆใ‚’hostname: "127.0.0.1"ใซใ—ใฆใ‚‚ๅ•้กŒใชใ„ใ‹๏ผˆๆ˜Ž็คบ็š„ใซใƒซใƒผใƒ—ใƒใƒƒใ‚ฏใ‚ขใƒ‰ใƒฌใ‚นใ‚’ๆŒ‡ๅฎšใ™ใ‚Œใฐipv4(?)ใฎใปใ†ใง่ฟ”ใ—ใฆใ‚‚ใ‚‰ใˆใ‚‹๏ผŸ๏ผ‰่ฉฆใ—ใฆใ„ใŸใ ใ‘ใพใ™ใงใ—ใ‚‡ใ†ใ‹ใ€‚ ใ‚ˆใ‚ใ—ใใŠใญใŒใ„ใ—ใพใ™๐Ÿ™

rinx commented 2 years ago

ใ‚ใ‚ŠใŒใจใ†ใ”ใ–ใ„ใพใ™ใ€‚

็งใฎ็’ฐๅขƒใง็ขบ่ชใ—ใŸใจใ“ใ‚ใ€hostname: "127.0.0.1" ใงๅ•้กŒใชใๅ‹•ไฝœใ—ใพใ—ใŸ!

kat0h commented 2 years ago

ใ‚ใ‚ŠใŒใจใ†ใ”ใ–ใ„ใพใ™๏ผใ“ใกใ‚‰ใงใ‚‚ไธŠๆ‰‹ใๅ‹•ใใ“ใจใ‚’็ขบ่ชใงใใพใ—ใŸ๐Ÿ™‡๐Ÿป