last day (15 days later) » 

11:19 AM
Hello Toothrot!
 
hi Jim
 
So, chdir $HOME.
 
yeah
 
Then cd .config
ls
Should be a dir called "libreoffice"
 
yeah /4/user
 
11:24 AM
mkdir 4/user/Scripts
mkdir 4/user/Scripts/python
 
I'll have to make them. ok. does scripts have to have a capital s?
 
Yes.
 
ok
 
Then in that directory, vim edit_with_vim.py and paste the code from the answer.
 
ok, and now i suppose i paste the code into vim.py
ok
done
 
11:27 AM
Yes, the name can be whatever.
But .py
Then in LibreOffice, go to Tools -> Macros -> Run Macro.
Under My Macros, it should show the filename.
 
com.sun.star.uno.RuntimeException: Error during invoking function edit_with_vim in module file:///home/daphnis/dot/config/libreoffice/4/user/Scripts/python/vim.py (<class 'AttributeError'>: getViewCursor
File "/usr/lib/libreoffice/program/pythonscript.py", line 875, in invoke
ret = self.func( *args )
File "/home/daphnis/dot/config/libreoffice/4/user/Scripts/python/vim.py", line 7, in edit_with_vim
oVC = doc.getCurrentController().getViewCursor()
)
 
What is the currently active window? Did you run it from a Writer document?
 
yes
if writer is the term for word-like
 
It should say "Writer" in the window title; and yes, it's like MS Word.
What flavor of Linux?
 
arch
it says LO draw
sorry that was a pdf
 
11:35 AM
Ah, that would explain the problem.
 
hm.
 
I could make it work for Draw, but the code was designed specifically for Writer.
 
vim opens with the selection, but after ':x' the altered buffer does not appear in LO
 
Oh, I thought we were just trying to go from LO to vim.
Let's see, would there be any way to go back? Maybe use a loop and wait for the subprocess. How good are you with python?
 
I know no python
 
11:39 AM
Okay, well I could probably do it but not tonight. That would be a bigger job.
 
that would be cool
 
I often use LO and vim together, but simply copy and paste.
 
yeah, but would this be much better?
 
I guess this would save a little time.
 
wouldn't
yeah, and be less annoying
 
11:41 AM
Yeah, I can see that.
Well, I'll look at this again on Monday.
 
well, thanks for all your help!
 
Okay, bye for now.
 
bye
 

last day (15 days later) »