richrd / suplemon

:lemon: Console (CLI) text editor with multi cursor support. Suplemon replicates Sublime Text like functionality in the terminal. Try it out, give feedback, fork it!
MIT License
788 stars 43 forks source link

Fix small issues on windows #262

Open bagage opened 4 years ago

bagage commented 4 years ago

Fixes #261

richrd commented 4 years ago

Since we already have some other dependencies like wcwidth I'm not against adding one for the clipboard. There's at least the libraries clipboard and pyperclip. Not sure which one we should use but pyperclip seems to be more popular.

bagage commented 4 years ago
richrd commented 4 years ago

Thanks again for the effort, I appreciate it! :)

bagage commented 4 years ago

backspace is the same as hitting ctrl+h, so instead of removing the latest character, it toggles the help. Hence the shortcut for help toggle should be something else, maybe only for windows (F3?F7?F8?). But since default keymapping is global, I'm not sure how this could be done.

Maybe it can be open as a separate issue as it does not block suplemon from working at least?

richrd commented 4 years ago

Sorry for the late answer. Yeah, I guess it can be a separate issue, as long as backspace works for deleting characters. Help is also available by running the command help so it's not a huge issue. I do think we can have different default keymaps for different platforms as that's what Sublime seems to do.

richrd commented 4 years ago

I took a closer look at clipboard and pyperclip and I think we should use pyperclip instead. clipboard just wraps pyperclp and doesn't provide any additional functionality: https://github.com/terryyin/clipboard/blob/master/clipboard.py

bagage commented 4 years ago

Hi @richrd, sorry for the long answer! I finally managed to find some time to address the remaining issues.

Let me know if there is anything to rework/address :).

bagage commented 4 years ago

Bump @richrd :call_me_hand:

richrd commented 4 years ago

Hi and sorry for the late response! Summer has been busy :) I'll test this out next week. The code looks good so I think it's pretty much ready for merging. Thanks for your help :)