Home | Blog | Software |

Did you miss your activation email?

• September 05, 2015, 05:18:03 AM
• Proudly celebrating 10 years online.
• Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.

### Author Topic: High Speed Source Code Viewer [portable, freeware available]  (Read 7651 times)

#### stahlworks

• Supporting Member
• Joined in 2011
• Posts: 14
##### High Speed Source Code Viewer [portable, freeware available]
« on: April 20, 2011, 11:18:41 PM »
Dear coders,

I want to introduce my source code viewer, Depeche View.

Main features:
• loads all text files of a folder into memory,
showing all content in one window, as if they were one large text.
• search as you type, across all files.
• may show only the result lines (filtered view).
• side by side view of same text in multiple windows.
• portable, without installation.

[attach=#1][/attach]

The freeware version, Depeche View Base, is available here:

http://stahlworks.co...ev/depeche-view.html

It allows to load up to 1000 files, and can be sufficient for medium size projects
if you always edit and compile within some IDE running in parallel.

Depeche View has a radical input concept different to any IDE or editor.

The most important moves are:
• SHIFT key and mouse click on a word searches it in the same window.
• RIGHT click on a word searches it in a different window.
• CONTROL click on a phrase or lines copies to clipboard.
• ALT click on a phrase creates a bookmark.
• left click on blank space, keep mouse button pressed,
then move the mouse vertical to surf through the text.

This requires a bit of training, but then it allows to click through
dependencies in software projects very fast.

the pros and cons of the user interface.

#### mouser

• First Author
• Joined in 2005
• Posts: 35,013
##### Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #1 on: April 21, 2011, 12:39:32 AM »
Welcome to the site stahlworks, looks very interesting!

Are you the creator of all that art on the stahlworks page too?

#### capitalH

• Participant
• Joined in 2008
• Posts: 71
##### Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #2 on: April 21, 2011, 02:39:27 AM »
If this works as I expect it to work, no more 'find "def primesbelow" *.py' from the command line!

#### stahlworks

• Supporting Member
• Joined in 2011
• Posts: 14
##### Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #3 on: April 21, 2011, 04:07:47 AM »
Yes, the whole site content is from me, therefore "Art and Technology".
I try to get some web hits through the desktop backgrounds and stuff.

You may type "dview . .py" to load all .py files, then type "def primesbelow" interactively.

The find command above can be reformulated using Swiss File Knife like:
Code: [Select]
sfk find -dir . -file .py -pat "def primesbelow" +view
or shorter, searching all text files of the current directory tree:
Code: [Select]
sfk ftext . "def primesbelow" +view
« Last Edit: April 21, 2011, 04:38:54 AM by stahlworks »

#### capitalH

• Participant
• Joined in 2008
• Posts: 71
##### Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #4 on: April 21, 2011, 06:45:17 AM »
Wow sfk is a cool tool, thanks!

sfk replace    - replace words in binary and text files
and
sfk detab      - convert TAB characters to spaces

is really really usefull!

#### 40hz

• Supporting Member
• Joined in 2007
• Posts: 11,530
##### Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #5 on: April 21, 2011, 07:46:11 AM »
Welcome to Donation Coder!

Plan a giving Depeche View a try sometime in the next few days. Looks to be a very useful tool.

I also took a moment to check out some of your music over at your website. Very nice work. I particularly liked Cat the Hop and Flying. Flying would make a great intro theme for a game. Mind my asking what you used to create them with? (I'd normally use Propellerhead's Reason for something like that.)

#### stahlworks

• Supporting Member
• Joined in 2011
• Posts: 14
##### Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #6 on: April 21, 2011, 08:19:33 AM »
I use Fruityloops or FL Studio since 10 years now. I like their pattern based composing, and it also has powerful software synths.

#### ahhha

• Participant
• Joined in 2010
• Posts: 9
##### Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #7 on: April 21, 2011, 08:57:28 AM »
wow, I like this, really userful tool, I have had a plan to create such a tool.

And this has absolutely beyond my plan.

Also cool UI.

#### stahlworks

• Supporting Member
• Joined in 2011
• Posts: 14
##### Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #8 on: September 03, 2011, 02:44:58 PM »
Release 1.4.9 is about making it easier for first time users.
By default, DView comes with a new assistance mode.

-  left click on a word brings up a search popup menu: search this word now,
search it in a different window, copy to clipboard, create bookmark, ...

You may also mark a phrase: left button down on first word, keep button pressed,
move to the right to another word, then release button. Again the menu comes up.

-  right click on blank space in a filtered result view produces another menu:
show that text location, show it in another window, ...

-  extra buttons at the right top: filter text for results, jump to next/previous result.

-  scrollbars in every window.

[attach=#1][/attach]

Experienced DView users may prefer to work without assistance, as it takes more clicks to run a search,
and one click search is not possible. Therefore this can all be switched off in different ways,
the fastest one being to press CONTROL+SHIFT+P (power settings).
« Last Edit: September 03, 2011, 02:48:16 PM by stahlworks »

#### stahlworks

• Supporting Member
• Joined in 2011
• Posts: 14
##### Version 1.5.0 released
« Reply #9 on: September 14, 2011, 11:35:26 PM »
Version 1.5.0 was released,

When using the global search autosuggest dictionary with DView Pro (or Pro Demo),

#### Jibz

• Developer
• Joined in 2005
• Posts: 1,035
##### Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #10 on: September 15, 2011, 01:44:07 AM »
Seems like a nice tool .

One issue: I haven't been able to get it to not read my Mercurial folders -- I added '!\.hg' to the sub directory filter in the settings, but it still loads all the files from there.

Maybe it would even be a good idea to exclude folders from SCM software by default?

#### stahlworks

• Supporting Member
• Joined in 2011
• Posts: 14
« Reply #11 on: September 15, 2011, 02:02:02 PM »
If you add literally "!\.hg" it will skip all sub folders called exactly ".hg" but not, for example, "foo.hg".
If that's what you intend, it should work.

According to SFK syntax (which DView uses), if you add instead "!.hg" it should skip all sub folders
ending with ".hg". However, there is a bug somewhere, so actually that doesn't work right now.

But you may use this workaround: "!*.hg" and then it should skip all sub folders ending with ".hg".

#### Jibz

• Developer
• Joined in 2005
• Posts: 1,035
##### Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #12 on: September 15, 2011, 05:36:28 PM »
I literally want to skip any subfolders named exactly '.hg'.

Even though the masks are saved in the config file, they do not get applied before I open the settings dialog and press 'reload workspace with new settings'.

Using the mask '!\.hg' works if the .hg folder is nested inside a folder below the current level, but not if it is at the level where I run dview. The same goes for '!\tmp' btw, I guess maybe you are just matching against the path, which does not start with a backslash if the file is directly below the current folder.

As an example, if I am standing in a folder with a subfolder called 'tmp' or '.hg' and do 'dview .' then they are both loaded. I can then go into settings and press reload with new settings, and nothing changes. If I go up one level, 'cd ..', and do 'dview .' again, they are still there, but going into the settings and pressing reload now removes them (assumingly because they are now 'foo\tmp\file.txt' and 'foo\.hg\file.txt').

#### stahlworks

• Supporting Member
• Joined in 2011
• Posts: 14
##### Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #13 on: September 15, 2011, 10:23:02 PM »
OK, as it is now, it makes a difference if you

1) load something instantly when running DView from the command line

2) or run DView without parameters, and then load something interactively by "Open",

In case 1), DView will ignore your Setup / workspace filter settings.
This is because you should specify all filters directly on the command line.

Code: [Select]
dview -dir . !*.hg
And it should work. The whole formal syntax is:

Code: [Select]
dview -dir rootFolder1 [root2] ... [!dirmask1] [!dirmask2] ...         -file includePattern [include2] ... [!excludePattern] ...
You may also download the Swiss File Knife, then type sfk help select or sfk list
for syntax and examples of file selection - but I see that neither the DView or SFK help text
tell anything about the exclusion of sub folders by file extension. This will be fixed.

#### Jibz

• Developer
• Joined in 2005
• Posts: 1,035
##### Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #14 on: September 16, 2011, 01:19:40 AM »
In case 1), DView will ignore your Setup / workspace filter settings.
This is because you should specify all filters directly on the command line.

Thank you for the clarification. Can I suggest that instead it loads the configuration file, and any command line options override the settings in it?

Code: [Select]
dview -dir . !*.hg

That works, but will exclude any folders with '.hg' anywhere in their name. I think the real problem here is that the first level of subfolders are listed without a backslash at the beginning, so matching '!\tmp\' will not match their names. I could be wrong though.

It seems like there is no way to exclude an exact folder name that is a direct subfolder of the root of the tree that dview reads?

#### Jibz

• Developer
• Joined in 2005
• Posts: 1,035
##### Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #15 on: September 16, 2011, 01:52:52 AM »
A little more testing:

!tmp - matches tmp anywhere in the path
!\tmp - matches any folder that starts with tmp, except at the root level
!\tmp\ - matches folders with exact name tmp, except at the root level
!tmp\ - matches any folder that ends with tmp

!.hg - matches nothing (not .hg, not foo.hg, not .hgfoo .. nothing)
!*.hg - matches .hg anywhere in the path
!*.hg* - also matches .hg anywhere in the path
!\.hg - matches any folder that starts with .hg, except at the root level
!\.hg\ - matches folders with exact name .hg, except at the root level
!.hg\ - matches any folder that ends with .hg

Btw, sorry if you feel I am spamming you here, I am merely trying to understand why it isn't working how I expect it to .

#### stahlworks

• Supporting Member
• Joined in 2011
• Posts: 14
##### Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #16 on: September 16, 2011, 01:17:45 PM »
No, that's good, you even analyzed all possible workarounds yourself already. Fact is,

> It seems like there is no way to exclude an exact folder name that is a direct subfolder of the
> root of the tree that dview reads?

is true and this is a shortcoming that will be fixed - not just in DView, but also in my command line tool SFK.
I'll keep you updated when it is done!

#### wraith808

• Supporting Member
• Joined in 2006
• Posts: 7,332
• "In my dreams, I always do it right."
##### Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #17 on: September 16, 2011, 04:01:23 PM »
This is a *great* utility!  I have a quick question- does this (or especially the pay version) have the ability to shell out commands?  I'd like to put a command in there to do a get from TFS.  I was also thinking of purchasing the pro version, and wanted to know if it would be able to be integrated into a workflow that includes TFS (and others).

Thanks for the utility!

#### stahlworks

• Supporting Member
• Joined in 2011
• Posts: 14
##### Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #18 on: September 17, 2011, 02:26:53 AM »
Please create a config file, then search for "run" or "runback".
I use DView everyday in a multi server environment, running batch files that sync source files to a server,
run a remote compile, then download the results and display that in DView. For example,
Code: [Select]
on key xbutton1up   set first.findmask = ""   set first.pathmask = "c:\project\log.txt"   first.runback -min "c:\project\zz-compile.bat"   first.monitor "c:\project\log.txt" delay=300 maxwait=5000 show=bottomRuns a batch on the 2nd top button of a Razer Naga mouse.
This batch produces an output file "log.txt" which is reloaded and displayed
in the first DView window as long as the file changes.

You may test this all with the 30-days Trial Demo from:
http://stahlworks.co...ViewProDemoSetup.exe

To repeat, this is typically used to call batch files; try yourself if it allows a smooth
TFS integration, and if you think external command execution could be done better,

#### stahlworks

• Supporting Member
• Joined in 2011
• Posts: 14
##### DView sub folder selection reworked
« Reply #19 on: September 18, 2011, 04:01:06 PM »
with completely reworked sub folder and file selection.
Code: [Select]
to select all dirs of current dir except something:-dir . !foo       -> exclude subdirs like *foo*-dir . !.foo      -> exclude with extension .foo-dir . !\foo      -> exclude starting with foo-dir . !foo\      -> exclude ending with foo-dir . !\foo\     -> exclude exactly foo-dir . !\foo\bar\ -> exclude subdir combi-dir . !*.foo*    -> exclude with .foo anywhereto select only sub dirs of current dir with something:-dir . *foo*      -> include paths having *foo*-dir . *\foo      -> include paths having *\foo-dir . *foo\      -> include paths having *foo-dir . *\foo\     -> include paths exactly foo-dir . *.foo      -> include with extension .foo-dir . *\foo\bar\ -> include subdir combiexclusion by filename:-file !foo        -> exclude all files like *foo*-file !\foo       -> exclude starting with foo-file !foo\       -> exclude ending with foo-file !\foo\      -> exclude exactly foo-file !.foo       -> exclude extension fooinclusion by filename:-file foo         -> include all files like *foo*-file \foo        -> include starting with foo-file foo\        -> include ending with foo-file \foo\       -> include exactly foo-file .foo .bar   -> select .foo and .bar fileswhoever cares, please test:
- running dview without parameters, then configure Setup / Workspace, then load interactively.
- the help text, as shown in Setup / Workspace.
- the help text via help button, then search for "loading filters".
give feedback if the functionality is working as expected, and if it matches the documentation.

#### Jibz

• Developer
• Joined in 2005
• Posts: 1,035
##### Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #20 on: September 19, 2011, 12:37:02 PM »

Exclusion works much better now imho. I can now correctly exclude the '.hg' folder and only that .

Is there any reason the '*' in front of directory inclusions is needed? From the help it seems it is not required in the workspace options dialog, but it is from the command line?

- running dview without parameters, then configure Setup / Workspace, then load interactively.

Seems to work ok. Would it be possible to add a recently used folder list of some kind? having to repeatedly use the standard folder selection dialog is a pain.

#### wraith808

• Supporting Member
• Joined in 2006
• Posts: 7,332
• "In my dreams, I always do it right."
##### Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #21 on: September 19, 2011, 12:54:02 PM »
Would it be possible to add a recently used folder list of some kind? having to repeatedly use the standard folder selection dialog is a pain.

This!  I love this program, and am testing the TFS integration before dropping money on the edit functionality (I might drop it anyway- this is a great program!), but this is a major pain!  Recently used and favorite folders would be very nice!

One last thing that would be nice along these same thoughts- to use the open dialog instead of the browse for folder dialog so that you can type/paste the path that you want to work with.  If you had that, then with Listary I personally wouldn't need anything else..

UPDATE: To my delight I've found that Listary *does* work with Depeche View.  It would be nice to have the above features, especially in the case of opening a new folder.  But it definitely works a lot better for me now.
« Last Edit: September 19, 2011, 01:50:29 PM by wraith808 »

#### stahlworks

• Supporting Member
• Joined in 2011
• Posts: 14
##### Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #22 on: September 20, 2011, 12:17:12 AM »
> Is there any reason the '*' in front of directory inclusions is needed? From the help it seems it is not required
> in the workspace options dialog, but it is from the command line?

the reason is: on the command line, you can specify two kinds of things can be supplied after -dir :
root directory names, and sub folder masks. the latter are identified by "!" or a wildcard "*" anywhere in their name.
For example,
Code: [Select]
-dir source include *.svnloads text from root directories source and include if it's located within .svn sub folders.

In the workspace options dialog, it is not possible to supply multiple root directories in the sub directory filter,
as this would be too complicated. instead, every word in "sub directory filter" is auto prefixed by "*" internally,
to make sure it's used as a sub dir filter.

In a nutshell, the command line is more flexible, but for that it requires a more complex syntax.
And the GUI version is reduced but easier to use and understand.

> Would it be possible to add a recently used folder list of some kind?

I'll put it on the todo, but this will take some time.

What can be done right now, especially with DView Pro, is to simply load everything you might need together into memory,
with a long list of -dir folder1 folder2 folder3 -file ... -dir ... -file ... statements, or by specifying a fileset definition file
(dview -h then search for "defining filesets").

Even faster: create snapfiles with SFK, which are archive files containting many text files,
then load that with DView. Snapfiles can also be created from fileset definition files (sfk snapto=cache.txt -fileset myset.txt).

This way, I load a set of 20000 files everyday, containing everything I might need (sourcecode of multiple projects, include files
of different operating systems, open source libraries ...) and then I set the path mask to where I really need to search.

I use "GetOpenFileName" for the file open dialog, which cannot be used to select folders.
Also I don't see a big difference: no matter if you select "Load folder" or "Load file",
in both cases you can copy/paste a path into the given text entry field.

#### Jibz

• Developer
• Joined in 2005
• Posts: 1,035
##### Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #23 on: September 20, 2011, 02:02:00 AM »
In the workspace options dialog, it is not possible to supply multiple root directories in the sub directory filter,
as this would be too complicated. instead, every word in "sub directory filter" is auto prefixed by "*" internally,
to make sure it's used as a sub dir filter.

That makes sense, thank you.

> Would it be possible to add a recently used folder list of some kind?

I'll put it on the todo, but this will take some time.

Great.

Even faster: create snapfiles with SFK, which are archive files containting many text files,
then load that with DView. Snapfiles can also be created from fileset definition files (sfk snapto=cache.txt -fileset myset.txt).

This way, I load a set of 20000 files everyday, containing everything I might need (sourcecode of multiple projects, include files
of different operating systems, open source libraries ...) and then I set the path mask to where I really need to search.

Interesting. I was actually wondering the other day if there was some way to save the processed data structure that dview uses internally to be able to quickly load a database of some old code that is not likely to change. I guess this would be the way to do that.

I use "GetOpenFileName" for the file open dialog, which cannot be used to select folders.
Also I don't see a big difference: no matter if you select "Load folder" or "Load file",
in both cases you can copy/paste a path into the given text entry field.

I think the reason we object to the browse for folder dialog is that it has remained more or less the same since Win95, and is just plain horrible to use for that reason. It is missing all the usability enhancements that the open file dialog has that allows you to quickly find what you were looking for, and dialog extenders like FileBox eXtender or Direct Folders do not work with it either. Also, it defaults to showing you the desktop, and doesn't remember the last place you browsed to. This is all not your fault of course, and I don't know if there is a good alternative, but it is a terrible dialog imho.

With all the fancy stuff Microsoft are doing to explorer, I think they should spend an hour going back and fixing this atrocity -- on the other hand I guess we would risk a browse for folder ribbon .