topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 3:30 am
  • Proudly celebrating 15+ 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.
  • donate

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

stahlworks

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 14
    • View Profile
    • StahlWorks Technologies
    • Read more about this member.
    • Donate to Member
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.

I would be happy about any comment, especially about
the pros and cons of the user interface.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #1 on: April 21, 2011, 12:39 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
    • View Profile
    • Donate to Member
Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #2 on: April 21, 2011, 02:39 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
    • View Profile
    • StahlWorks Technologies
    • Read more about this member.
    • Donate to Member
Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #3 on: April 21, 2011, 04:07 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:
sfk find -dir . -file .py -pat "def primesbelow" +view

or shorter, searching all text files of the current directory tree:
sfk ftext . "def primesbelow" +view

« Last Edit: April 21, 2011, 04:38 AM by stahlworks »

capitalH

  • Participant
  • Joined in 2008
  • *
  • Posts: 71
    • View Profile
    • Donate to Member
Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #4 on: April 21, 2011, 06:45 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,857
    • View Profile
    • Donate to Member
Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #5 on: April 21, 2011, 07:46 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
    • View Profile
    • StahlWorks Technologies
    • Read more about this member.
    • Donate to Member
Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #6 on: April 21, 2011, 08:19 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
  • *
  • default avatar
  • Posts: 9
    • View Profile
    • Donate to Member
Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #7 on: April 21, 2011, 08:57 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.  :Thmbsup:

Also cool UI.

stahlworks

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 14
    • View Profile
    • StahlWorks Technologies
    • Read more about this member.
    • Donate to Member
Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #8 on: September 03, 2011, 02:44 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 produces a navigation menu: jump to next/previous search result,
      jump to next file, narrow search to current file ...

   -  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 PM by stahlworks »

stahlworks

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 14
    • View Profile
    • StahlWorks Technologies
    • Read more about this member.
    • Donate to Member
Version 1.5.0 released
« Reply #9 on: September 14, 2011, 11:35 PM »
Version 1.5.0 was released,
featuring reduced text file loading times (about 50 percent with DView Lite).

When using the global search autosuggest dictionary with DView Pro (or Pro Demo),
loading times are reduced even more, as the dictionary is now created after loading.

Jibz

  • Developer
  • Joined in 2005
  • ***
  • Posts: 1,187
    • View Profile
    • Donate to Member
Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #10 on: September 15, 2011, 01:44 AM »
Seems like a nice tool :Thmbsup:.

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
    • View Profile
    • StahlWorks Technologies
    • Read more about this member.
    • Donate to Member
Sub folder exclusion while loading
« Reply #11 on: September 15, 2011, 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".

Please try and give feedback.

Jibz

  • Developer
  • Joined in 2005
  • ***
  • Posts: 1,187
    • View Profile
    • Donate to Member
Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #12 on: September 15, 2011, 05:36 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
    • View Profile
    • StahlWorks Technologies
    • Read more about this member.
    • Donate to Member
Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #13 on: September 15, 2011, 10:23 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",
   or by reloading the workspace from Setup.

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

   
dview -dir . !*.hg

And it should work. The whole formal syntax is:

   
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,187
    • View Profile
    • Donate to Member
Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #14 on: September 16, 2011, 01:19 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? :)

Please try this:

   
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,187
    • View Profile
    • Donate to Member
Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #15 on: September 16, 2011, 01: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
    • View Profile
    • StahlWorks Technologies
    • Read more about this member.
    • Donate to Member
Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #16 on: September 16, 2011, 01:17 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
  • **
  • default avatar
  • Posts: 11,186
    • View Profile
    • Donate to Member
Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #17 on: September 16, 2011, 04:01 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
    • View Profile
    • StahlWorks Technologies
    • Read more about this member.
    • Donate to Member
Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #18 on: September 17, 2011, 02:26 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,
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=bottom
Runs 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,
please give feedback.

stahlworks

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 14
    • View Profile
    • StahlWorks Technologies
    • Read more about this member.
    • Donate to Member
DView sub folder selection reworked
« Reply #19 on: September 18, 2011, 04:01 PM »
There is now a pre-release available for download here,
with completely reworked sub folder and file selection.
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 anywhere

to 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 combi

exclusion 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 foo

inclusion 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 files
whoever cares, please test:
- loading from command line using -dir ... -file ... parameters.
- 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,187
    • View Profile
    • Donate to Member
Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #20 on: September 19, 2011, 12:37 PM »
- loading from command line using -dir ... -file ... parameters.

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

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
  • **
  • default avatar
  • Posts: 11,186
    • View Profile
    • Donate to Member
Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #21 on: September 19, 2011, 12:54 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 PM by wraith808 »

stahlworks

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 14
    • View Profile
    • StahlWorks Technologies
    • Read more about this member.
    • Donate to Member
Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #22 on: September 20, 2011, 12:17 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,
-dir source include *.svn
loads 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.

> use the open dialog instead of the browse for folder dialog

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,187
    • View Profile
    • Donate to Member
Re: High Speed Source Code Viewer [portable, freeware available]
« Reply #23 on: September 20, 2011, 02:02 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 :D.