-
-
Notifications
You must be signed in to change notification settings - Fork 179
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
Feature: Spawn external editor to edit message #1521
Comments
Add basic functionality to launch external editor Regards #1521
Some ideas where this could lead: This can later be used to reply to messages too.
@kaffeekanne also suggest to use it for correct via |
I'd prefer to have a number per message and quote the full message even if it's multiline.
|
That's what I said? |
You said 'line' but a message could be several lines. |
You are right, that was not clear. I meant the same though. Message is not right either. Maybe a better word would be entry. An entry starting with date + nick + message. That entry will have |
`/executable set editor /full/path/to/edit`. Regards #1521
See: #1546 |
I just tried to use a graphical editor ( I created a file
In profanity I set |
Good enough for now. |
How do I bind the editor to a key so I can spawn the editor using a keybinding? |
Most likely by reading the documentation https://profanity-im.github.io/guide/latest/keybindings.html |
I read all the docs and I did extensive research on the web, but came up with nothing. Instead of wasting energy on being unfriendly, would you please spend the energy on helping me by telling me how to do it instead? It's clearly not documented.. The link you mentioned doesn't even mention the word "editor" once. |
I'm not unfriendly. I don't know how to do what you are trying to do and said that most likely the link I posted can help you. From your GitHub I saw that you can code so I assumed you checked the code already. From what I understand the link I posted uses functions that are defined in I never created such a shortcut and have absolutely no idea how to do it. Most likely if either you or I spend the time one it one of us can figure it out. Profanity also has aliases (see |
My apologies! English is not my native language, and I must have interpreted the tone completely wrong.
I wouldn't really call myself a programmer, more like a hobby wannabe 'script kiddie'.
I have on idea what that should be though.
Let's hope so!
The issue I have is that I sometimes write a message and then realize it's getting lengthy and would like to format in in fancy ways or just be able to access spellchecking. That's not possible if I have already written any text. Well. Thanks for being friendly! ;) |
Mine neither. Probably that's part of the problem :D
I see. Makes sense. Personally I think it would be best to think about it before :) But I can see the point. Maybe |
Maybe let's wait until #1596. But if above mentioned idea helps you could maybe try to implement it if you want. I can also guide you, like which files to touch and where to look for inspiration on how to do it. Interested? |
I'm pretty sure it's me, I'm getting old and grumpy. :)
Think before doing something? You have high hopes about me for sure. I don't always how lengthy a message might be before it's too late. Jumping to the beginning of the line and adding the |
That sounds awfully helpful. I'm not the one to say no to any help. :) |
Maybe this can be done as a second step.
Great! So you will need to check out If you have more questions you can also contact my on XMPP or in our MUC. As I said I would wait for that PR mentioned above to be merged since it will touch that code too. |
@StefanKropp had this idea and started it in #1485.
What needs to be done:
/usr/bin/vim
,xdg-open
,$EDITOR
,$VISUAL
? Right now we usefork()
/execl()
we need a whole path. So justxdg-open
or$EDITOR
won't work right now. external editor: don't use absolute paths and allow path search #1546Last thing happens when:
Test1:
Test2:
In Test2 the terminal will not be cleared properly. There is still part of profanity visible. Maybe something ncurses related.
[Editor]
in the statusbar that we are in a special state..local/share/profanity/editor/barejid.md
instead of/tmp/profanity-uuid.md
. Advantages: not a place where other users have access. By using barejid we can also reopen this later and only delete it once sent. -> 242381c/editor
several times and amend some text. -> not doneThe text was updated successfully, but these errors were encountered: