-
Notifications
You must be signed in to change notification settings - Fork 119
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
Enclose text into quotes,parens,etc. #229
Enclose text into quotes,parens,etc. #229
Conversation
The next release is likely to be 0.6.0. Added Prolog and VHDL CCR grammars. JavaScript CCR updates. VS Code support. Mostly internal overhaul of Atom support. Improved Unicode support.
merge master
It's a nice enhancement. I'll see if I can give it a test tomorrow! |
Okay I'm gonna try to figure out what conditions this was triggered. So far I can't reproduce it. File "C:\Python27\lib\site-packages\dragonfly-0.6.6b1-py2.7.egg\dragonfly\windows\clipboard.py", line 53, in get_system_text |
Looking at the code of dragonfly that's in a try except block. I have no Idea how that wasn't caught. Did it crash caster? |
No it did not. |
So I have a proposal. The functionality for formatting is awesome. Simplicity could possibly be improved. Thoughts about about integrating the functionality of Something to consider is the question of what the default behavior is expected by the average end user and also how we set those expectations. |
I thought about it but I'm kind of worried about stability. These functions have time.sleep in their definitions. I'm not sure this works well with ccr, I will test it. Another alternative if it doesn't would be to add a keyword to prekris and similar commands which will trigger this behavior. Something like stoosh and sure stoosh. This would make the behavior more clear to users as well. |
Looking at the source code I see we really need to eliminate the timer to make this reliable. That means not utilizing keyboard shortcuts which doesn't seem feasible. Looking over dragonfly documentation. |
I would love to have it simplified but I think for now the best solution like you said is an optional keyword to trigger formatting. |
It's really hard to find time for the next one or two weeks because I have a large assignment to build a Linux driver for school. I will work on it when possible |
So I found something very annoying which sabotages simplification. In some editors like Visual Studio code, pressing control plus C actually copies the whole line if you haven't selected anything. So if you try this function, instead of adding empty enclosing punctuation, it pastes the whole line and closes it. This is not something which I think can be avoided and even if it can it will be pretty slow without editor integration. I have added a word to trigger this function as you said and in the future it can be revised. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent
This is an experimental feature which is missing in castor but it needs testing because I have used the clipboard to make it. It works by copying the selected text into the clipboard (doesn't affect previous contents), appending the required openers and closers and pasting the new text back.
I mostly want this to be tested by other system because it could be unstable if the text is not copied or pasted on time. Also, I would like some suggestions on the command's spec because the current form is kind of hard to utter.
To do: