Configure application to edit source file in Zim Windows

Asked by KiRa

First off, thank you for the wonderful program! It's fantastic! Really appreciate the hard work behind it!

Apologies in advance if this question has been asked before (I couldn't find it via google search).

I don't know what parameters to enter while configuring the default application to edit text files when I click on Tools>Edit Source. I have Zim 0.65 installed on Windows 8.1 and notepad is my default text editor.

I am not well versed with command line interface, and could not solve/understand this after looking at the zim manual. Kindly explain the steps I should follow.

Alternatively, my need to edit source files arises from the fact that I need to remove extra empty lines/paragraphs that often come when I copy paste text from other programs (not a copying issue, the text itself was formatted like that). Now I used Wikidpad before, and I would run a simple search and replace with regex operator \r or \n (I don't remember, I haven't used it in quite some time)...I tried doing it in Zim too and it did not work. So if I wanted to say remove extra lines from the following text, how would I use the search and replace function in Zim ?

text 1

text 2

text 3

I want the final thing to look like this:

text 1
text 2
text 3

If there are easier ways of achieving this, please let me know (ideally within Zim itself, I don't want to use Word/Notepad or some other external program)

Question information

English Edit question
Zim Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
Revision history for this message
Best mtibbi (marcio-tibirica) said :

You can define the default text editor in >Edit >Preferences >Applications.
Just click on the button "Define default text editor". A dialog box opens.
Click on the button "Add Application". Another dialog opens with two fields: "Name" and "Command"
In the "Name" field you can give a nickname for the application, let's say "Notepad"
In the "Command" field you must write the complete path to the Notepad.exe file, let's say: C:\Users\YourUserName\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Accessories\Notepad.exe

You have to find the correct path to the text editor executable in your computer installation first. The example above was taken from my machine which is Windows 10.

For your purposes I would recommend you to use Notepad++ instead of Notepad because Notepad++ has special features to deal with line operations. For instance, to delete empty lines you can use a single menu command: >Edit >Line Operations >Remove Empty Lines

Revision history for this message
KiRa (sandeep-chaitanya) said :

@mtibbi I tried the method suggested, but despite putting the correct path to notepad, Zim displayed the following message (My user name/directory is asus)

Could not find executable "C:\Users\asus\AppData\Roaming\Microsoft\Windows\Start"

This is after I had specified file path as C:\Users\asus\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Accessories\Notepad.exe

I thought the problem was because of the space between Start and Menu in the path.

However, notepad works only when I set path as C:\Windows\system32\Notepad.exe

I also installed notepad ++ btw (did not know about the line operation you told, despite dabbling with it earlier for text folding and all...) and gave the full path to it, which was :

C:\Program Files\Notepad++\notepad++.exe

And got the error message - Could not find executable "C:\Program"

So I guess, some error was being caused due to the space in the path.

Finally, I could get notepad++ to work because I set path as ["C:\Program Files\Notepad++\notepad++.exe" ] that is I put the whole path within quotes.

Thanks for the help and pointing me in the right direction!

Revision history for this message
KiRa (sandeep-chaitanya) said :

Thanks mtibbi, that solved my question.