Here you find many common questions about VSW
When should be useful view source page as DOM document ?
The simplest answer is:When you must debug DHTML pages, with an example we clarify the usage.
Suppose you have written some javascript code that outputs the numeric pad shown below.
Opening the HTML source code you see: domtest.html
But if you view the source as DOM document you can see how browser represents internally the page!
DOM source view can greatly simplifies dynamically generated code debug
Suppose you have written some javascript code that outputs the numeric pad shown below.
Opening the HTML source code you see: domtest.html
<html>
<script>
function writeCalcKeyboard() {
for (i = 0; i < 10; i++) {
document.write("<input type='button'"
+ " value='" + i + "'>");
}
document.write("<br>");
}
</script>
<body>
<form>
<script>writeCalcKeyboard();</script>
</form>
</body>
</html>What you see is (obviously) exactly the same code you have written!But if you view the source as DOM document you can see how browser represents internally the page!
<html>
<head>
<script>
function writeCalcKeyboard() {
for (i = 0; i < 10; i++) {
document.write("<input type='button'"
+ " value='" + i + "'>");
}
document.write("<br>");
}
</script>
</head>
<body>
<form>
<script>writeCalcKeyboard();</script>
<input value="0" type="button">
<input value="1" type="button">
<input value="2" type="button">
<input value="3" type="button">
<input value="4" type="button">
<input value="5" type="button">
<input value="6" type="button">
<input value="7" type="button">
<input value="8" type="button">
<input value="9" type="button">
<br>
</form>
</body>
</html>The document.write(...) output is visible expanded as DOM nodesDOM source view can greatly simplifies dynamically generated code debug
How can I use with PortableFirefox or PortableThunderbird ?
The trick consists to use the correct profile path
Read What specifically means Use profile path to save configuration faq
Read What specifically means Use profile path to save configuration faq
What specifically means Use profile path to save configuration ?
This esoteric feature is mainly designed for PortableFirefox users.
When you plug in an USB pen drive on WindowsXP, it assigns to the pen a drive letter like D: or F: (so called mount volume).
The drive letter assigned by Windows can change when you plug the pen drive on another computer or when it's already assigned to another (removable) drive.
PortableFirefox users run it directly from removable drives.
VSW loads its configuration from an hardcode path for example E:\vsw\viewsource.xml but this should point to an invalid drive letter if it refers to a dinamically assigned removable drive.
Using the new option the path is determinated watching on profile directory that always point to the correct drive letter.
The configuration is saved on PortableFirefox profile directory and when drive letter change its new value is dinamically determinated instead of using a fixed path
When you plug in an USB pen drive on WindowsXP, it assigns to the pen a drive letter like D: or F: (so called mount volume).
The drive letter assigned by Windows can change when you plug the pen drive on another computer or when it's already assigned to another (removable) drive.
PortableFirefox users run it directly from removable drives.
VSW loads its configuration from an hardcode path for example E:\vsw\viewsource.xml but this should point to an invalid drive letter if it refers to a dinamically assigned removable drive.
Using the new option the path is determinated watching on profile directory that always point to the correct drive letter.
The configuration is saved on PortableFirefox profile directory and when drive letter change its new value is dinamically determinated instead of using a fixed path
Can I edit input fields text inside external editors ?
Input field (input texts, text areas) can be edited inside external editor and when user returns to application (e.g. Firefox/Thunderbird/NVU) the field is updated.
Password fields can't be edited by design, I think this should be security hack.
For example:
1. goto http://www.google.com/
2. inside search input text box type some sample words eg.: test the external edit
3. right click inside input box
4. choose editor from VSW's list
5. modify the text and save the file
6. return to FF/TB and you will see the textbox with new text.
Notice the text is updated only if you have focus on edit box.
The temp file is automatically deleted when you return on application indipendently by temp cleanup settings.
Password fields can't be edited by design, I think this should be security hack.
For example:
1. goto http://www.google.com/
2. inside search input text box type some sample words eg.: test the external edit
3. right click inside input box
4. choose editor from VSW's list
5. modify the text and save the file
6. return to FF/TB and you will see the textbox with new text.
Notice the text is updated only if you have focus on edit box.
The temp file is automatically deleted when you return on application indipendently by temp cleanup settings.
I hate to delete temporary files every time, is there a solution?
Now it is possibile to delete files when user closes the application.
Go to settings dialog, click on Advanced tab and selected the checkbox.
It is possibile to clean current temp pressing the remove button.
Only files created by VSW are deleted so if the folder contains other files they remain on disk.
Go to settings dialog, click on Advanced tab and selected the checkbox.
It is possibile to clean current temp pressing the remove button.
Only files created by VSW are deleted so if the folder contains other files they remain on disk.
How can I use JEdit?
To use Jedit you need to create a Windows batch file or a Unix script.
Below you find a Windows example
Below you find a Windows example
@echo off
rem *****
rem ** Change line below to point to you preferred JVM
rem *****
set JAVA_HOME=I:\Devel\java\jdk\j2sdk1.5.0
set path=%JAVA_HOME%\bin;%path%
set JEDIT_HOME=%~dp0
start javaw -jar "%JEDIT_HOME%\jedit.jar" %1
How can I use vim? (27-Mar-07)
When you configure vim you must use xterm otherwise your process isn't visible, it is running but you can't see the vim window.
Below are shown the parameters to pass to VSW
Editor path: /usr/bin/xterm
Parameters: -e /usr/bin/vim $f
As you can see the trick is to allow xterm to run vim
Below are shown the parameters to pass to VSW
Editor path: /usr/bin/xterm
Parameters: -e /usr/bin/vim $f
As you can see the trick is to allow xterm to run vim
How can I open more than one file in same JEdit window?
Add to your batch/script the switch -reuseview
For example modify the batch shown in How can I use JEdit as shown below:
For example modify the batch shown in How can I use JEdit as shown below:
start javaw -jar "%JEDIT_HOME%\jedit.jar" %1 -reuseview
How can I use default Windows XP viewer?
To use the default WindowXP image viewer you need to create a Windows batch file.
Below you find a working example
Below you find a working example
@start rundll32.exe %SystemRoot%\system32\shimgvw.dll,ImageView_Fullscreen %1
How can I edit server page PHP/JSP/ASP files?
See the specific page
Under MacOSX editor runs multiple instances (13-Oct-06 upd 25-Nov-06)
A more complete FAQ is available here
How can I open file and place cursor at a given line/column number (30-Oct-06)?
Since version 0.0.8.3 it is possibile to pass command line arguments to move text cursor to a given position.
This is especially useful when opening files shown in javascript console.
Please read javascript console FAQ page
This is especially useful when opening files shown in javascript console.
Please read javascript console FAQ page
How can I reuse the running GIMP intance (05-May-08)?
Under Linux you don't need any special setting but under Windows you must use gimp-win-remote.exe
Below are shown the parameters to pass to VSW
Editor path: c:\GIMP-2.0\bin\gimp-win-remote.exe
Parameters: gimp-2.4.exe $f
The file gimp-2.4.exe should differs from other GIMP versions.
Below are shown the parameters to pass to VSW
Editor path: c:\GIMP-2.0\bin\gimp-win-remote.exe
Parameters: gimp-2.4.exe $f
The file gimp-2.4.exe should differs from other GIMP versions.