You are on page 1of 14

// Depeche View configuration file, http://stahlworks.

com/ config-version 156 // Every line starting with "//" is a remark, and ignored by dview. // Every text block surrounded by /* and */ is a remark block. /* This file must be placed in the same directory as dview.exe, especially when running dview from an USB stick. Alternatively, it may be placed in one of the directories specified in the PATH environment variable. When this file is edited via setup/edit, DView tries to reload changes as soon as its window is reactivated. Subsequent changes may require to select setup/reload, or a SHIFT click on the setup button. Some settings may require a restart of the tool. Some settings can also be set via environment variable DVIEW_CONFIG, e.g. SET DVIEW_CONFIG=maxload:200,case:no,searchseq:yes,autoreload:no If present, env. variables have priority over config file settings. To activate a setting prefixed by "// ", remove the "// " (including the blank character). NOTE: empty lines are allowed, but they may NOT contain any whitespace. NOTE: any whitespace before the start of a command is not allowed. Some settings can be changed directly within DView, e.g. in the Setup dialog, and are written into this file automatically on CTRL+S or program exit. Other settings can be changed only by editing this file. If dview.exe is it behaves like the config file and will create */ // select fonts for Linux WINE? linux default // as given on cmdline or environment // by default, dview writes the config file on program exit // and whenever CTRL+s is pressed. if save at program exit // produces problems, it can be disabled here. saveConfigOnExit yes // or "no" to disable // if save config on CTRL+S produces problems, disable here. // you then have to select "Settings/Save Config Now", // or press CONTROL+SHIFT+S whenever the config should be saved. saveConfigOnCtrlS yes // or "no" to disable // if there is only one view, may ESCAPE key close the application? // if "no" is set, SHIFT+ESCAPE or clicking on close is required. esccloseapp yes // no matter how, ask whenever closing the whole application: renamed to DepecheViewPortable.exe then a PortableApps application: it expects in a data/ folder parallel to itself that folder if required.

appexitask no // load ask limit: // amount of memory that dview may use for loading text before // a warning pops up. by default, dview tries to calculate // this value automatically, therefore set it only if required. maxload default // else no. of megabytes, e.g. 200 // amount of additional cache memory that can be used temporarily // while loading. furthermore, zip file contents with a size // beyond this value may be skipped. if the cache is too small, // the loading time can increase dramatically, therefore the // minimum is 200 (megabytes). default is 300. maxcache default // else no. of megabytes, e.g. 500 // what window frame mode should be active from start? // available are: master, isolated, overscan framemode master // should the initial window show up non-maximized and centered? // this setting is ignored while master frame mode is active. // while there is only one window, use F1 to toggle lean mode. startlean no // use file mask during load? usefilemask no filemask .txt .cpp .hpp !.bak !.tmp // use subdir mask during load? usedirmask no dirmask !\tmp !\save // on drag+drop from explorer, pressing CTRL will // append the contents instead opening them. // you may also configure to always append here: appenddragdrop no // default setting for case sensitive search mode casesearch no // default setting for punctuation sensitive search mode: // change this to no to treat slashes "/" and "\" as equal, // as well as some other unifications (read the help for more). // can also be toggled by SHIFT+case button. punctsearch yes // default setting for accent and umlaut sensitive search mode: // change this to no find the "a accent" char by just typing "a", // according to ISO 8859-1 character mapping. // can also be toggled by CTRL+case button. // also influences selection of filenames containing those chars. accentsearch yes // when searching foo*bar, shall the sequence "bar after foo" // be enforced in search results or not? searchseq yes // enter filtered result view whenever you search something? autofilter yes

// reset the find mask after some time of inactivity? // NOTE: specified in milliseconds here, although toggling // with the PAUSE key shows only a rougher seconds value. // value "0" means inactive. autoresetfind 0 // in msec // check and autoreload loaded files whenever the window is reactivated? autoreload no // limit autoreload to a given list of directories? limitautoreload no // default content of autoreload limit list: autoreloadmask mydir1 mydir2 mydir3 // delay auto reload of files beyond a certain size? reloaddelayonsize off // on to activate reloaddelaysizemb 10 // in mbytes // if a snapfile is loaded on startup, should its contents // be scanned for changes immediately after loading? snapautoreload no // with autoload, on reactivation of its window, dview scans all files // for changes. with an overloaded system, this can take rather long, // blocking dview itself. therefore there is a default limit of 15 sec // for such scans, which can be changed here. this value is not valid // for manual reloads (by clicking reload button or pressing F5). reload-scan-max-time 15 // seconds // default for load sub directory contents button loadsub yes // default for load hidden files button loadhidden no // default for load zipfile contents button loadzips no // default for load binary file contents button loadbin no // load text also from 16 bit wide-character files? // this is experimental and only extracts ASCII chars. // (no full UTF conversion yet implemented) loadutf no // enable one click edit or not from startup. // cannot be used together with one click search. oneclickedit no // if within editor, you may save and stop editing // by a double click on blank space, by activating this: doubleclicksave no // enable one click search or not from startup. // cannot be used together with one click edit. oneclicksearch no // with one click search, there is a delay before the

// search is started, to allow detection of double clicks. // you may reduce this to speed up one click search, but // then entering edit mode requires a faster double click. oneclicksearchdelay 300 // msec // if you want to disable one click resize, change to no oneclickresize yes // highlight whole line when stepping through search results: highresultline no // text editor: always insert blanks when pressing TAB? // otherwise editor auto detects mode by file content. blanktabs no // text editor: auto indentation when pressing ENTER? autoindent no // text editor: cursor blinking speed (1000 ... 5000 msec) cursorblinkspeed 1000 // msec // gray out text file contents excluded by path mask (CTRL+B) markexcluded no // enable user defined hotkeys from startup userkeys yes // by default, changes in the configuration file are reloaded // whenever the window is reactivated. this can be changed here. autoloadconfig yes // however, if the config file does not exist, or is unreadable, // the config autoreload is always stopped. // maximum delay after typing before search starts (CTRL+P). // by default, CTRL+P toggles between 200, 400, 800 and 1200 // milliseconds. when changing the default value below, // it will replace the extended user search delay (1200). searchdelay 800 // milliseconds // while the mouse cursor is in the bookmark area, search delay // is changed temporarily to the following value, to allow a // pre-search of phrases within bookmarks (default=3000). // set this to -1 to block searches completely while mouse on bookmarks. // set this to 0 to disable any search delay while mouse on bookmarks. mousebookdelay 3000 // milliseconds // // // // the window size defaults to nearly the whole desktop. if you want to change this to a fixed size and location, use: area xpos:ypos:width:height area 20:20:800:500

// if you want to change this to the whole desktop minus some border space, use: // space bordersize // space vertical:horizontal // space top:horizontal:bottom // space top:right:bottom:left space 0:0:0:0 // disable support for german umlauts when selecting words for search

noumlauts

no

// by default, dview tries to identify the correct tab size automatically. // to disable this automated detection, set a default tab size here: tabsize default // or 2,3,4,8 ... // by default, bookmarks (re)store the tab size at the // referenced area of text. this can be changed here. bookmarktabsize on // which bookmark set should be opened on startup? startbmset 1 // by default, text display is blocked by visible bookmarks. // press CTRL+SHIFT+Q or set the following to allow text // being displayed over bookmarks. bookmark display is then // controlled by mouse gestures: leave bookmarks to the left // or bottom to show them permanently or not. textoverbook no // time that $mouseword in a script is highlighted: wordshowtime 1500 // msec, 0=off // alt over highlight activation: // on activation of the following, keeping alt pressed // highlights the word under cursor temporarily. wordshowdelay 0 // msec, <= 0 means off // case sensitive word highlighting markcase no // shall a global dictionary be created during load? // may need 10 to 30 percent of additional memory. // can also be toggled by left click on the dictionary // button (small round button below "mode") before load. globaldict off // use on,off // shall auto suggest be active from start? // can also be toggled by right click on the dictionary // button (small round button below "mode"). autosuggest off // use on,off // by default, favourite search terms are saved // whenever bookmarks are saved, in a .dvdb file. // to disable any creation of .dvdb files, set this to off. // your search terms will then be kept in memory only, // as long as dview is running. savesuggest off // use on,off // when loading folders below DView's startup directory, // DView tries to show relative names (without C:\ etc.) // where possible. to force always absolute filenames, // set this to off. loadrelnames on // use on,off // exit filter view if there is only one hit: // exitfilteronsinglehit no // default is yes // jump to next/previous search result by CTRL+CursorDown/Up? // jumpresultsbyctrlcursor no // default is yes

// // // //

jump to next/previous search result by SHIFT+MouseWheel? may conflict with notebook touchpads, when touching the mouse wheel emulation accidentally while editing. jumpresultsbyshiftmwheel yes // default is no

// jump to next/previous search result by LButton+MouseWheel? // may cause unexpected jumps when pressing these accidentally. // jumpresultsbylbuttonmwheel yes // default is no // clipboard append separator line separatorline ---------------------------------------/* Experimental, Unsupported Clipboard Automation: requires Setup / General / enable clipboard automation */ view1clipfind $clipline view1clippath view2clipfind class *$clipline NOT ; view2clippath view3clipfind ::$clipline view3clippath /* automated clipboard reading delay: some external applications that write to the clipboard are buggy, producing MANY clipboard change events on a SINGLE clipboard write. this leads to the same data being appended many times, and/or clipboard access conflicts. if dview detects such a conflict, it solves it by WAITING until the buggy application stops to shout. the wait time can be configured here with three values: - first, the initial delay, used as long as there are no conflicts. by default, this is 0, meaning the clip is read immediately. - second, the fallback delay, used after the first conflict was detected, until dview is closed. - third, the maximum delay, used if the fallback doesn't help. also, if dview detects no conflict, but an external app shows errors during clipboard access, it may help to activate the following line. */ clipautodelay default // in msec, default is 0,200,500

// clipboard auto append: allow duplicate content to be appended? clipallowdups no // clipboard auto append: append only text with >= lines clipminlines 1 // scan the clipboard if it contains absolute filenames or url's? scanclipurl no // by default, with three views, double click on blank space // in the middle view will expand it if all views are fully // visible and not maximized. this can be disabled here:

// doubleclickexpand no // default is yes // by default, double click on blank space will expand the // middle view by 20 percent. this can be changed here: // expandweight 30 // percent from 10 to 50 // top right sidebar buttons for narrow or global search // can be displayed with a different transparency // sidebartrans 50 // percent from 0 to 85 // --------------- font configuration ---------------/* font used for main text display: mainfont name,width,height,weight,linespacing[,...] name = any name like Courier, Arial etc. width = width of characters, usually between 6 and 20. 0 means a default width should be used. height = of characters, usually between 10 and 30 weight = from 400 for normal chars to 1200 for bold linespacing = space between lines, -10 to 10 further optional parms: pitch and family - see Windows' LOGONT definition. quality - these parms may have little outprecision - or no effect, but are stored charset - to describe a font completely. for the main font, only FIXED PITCH fonts are allowed, i.e. all characters must have the same width. Windows defaults: mainfont Fixedsys,8,12,400,0 mainfont2 Courier New,0,19,700,0 bookfont Arial,7,10,500,-1 bookfont2 Courier New,0,13,500,0 menufont Arial,8,18,800,0 Linux mode defaults: mainfont Courier New,8,18,600,-2 */ mainfont default // or Fixedsys,8,12,400,0 /* second font used for main text display: use CTRL+J within dview to toggle between them. */ mainfont2 default // the default mainfont2 is much larger then the primary font. // it can be selected automatically on startup window sizes // of >= n pixels with this: autoselectfont2 off // or specify pixel width // is mainfont2 in use? usemainfont2 no

// bookfont is a small font used for bookmarks, as well as right bottom log // and error messages. it can be selected in dview by right-click on "font". // for bookmarks, variable-width fonts are also possible. bookfont default // second font used for bookmarks: // use CTRL+SHIFT+J within dview to toggle between them. bookfont2 default // is bookfont2 in use? usebookfont2 no // menus under the open and mode button use this font menufont default /* DView Professional User Script Commands ======================================= any "on key" command can consist of a single or multiple lines. single line command example: on key ctrl+f9 echo "my test" multi line command example: on key shift+f9 echo "foo" echo "bar" echo "test" when using multiple lines - the 2nd, 3rd etc. line must be started by whitespace (blanks). - each line must be started with the same number of blanks, i.e. they must have the same indentation. (for exceptions to this rule see examples below) supported commands : set findmask = "..." set pathmask = "..." set nearby.findmask set third.findmask set first.findmask set left.findmask set filter = "off" // [] means an optional value // change find mask in current window // change path mask in current window // same in right nearby window (if any) // same in 3rd window (if any) // address the very first window // address the left nearby window // or "on" toggles filter view mode. // "nearby.filter" may also be used. set location = "filename" [-bottom] // jump to a file content top or bottom. // "nearby.location" may also be used. echo "..." // print string to status line reload // check all files for changes and reload reload "..." // reload absolute filename [nearby.]activate // activate current or nearby window sleep [-quiet] msec // delay execution for a no. of milliseconds mark add color expr // add highlight of expr in the given color mark toggle col expr // toggle highlight mark reset // reset all highlights set clipline = "..." // copy a one-line text into clipboard set first.shift = "10" // set horizontal shift of 10 characters

// // // // // //

each "..." above means static text like in on key f9 echo "foo" or it may contain variables like on key f9 echo "$curfile" for the list of all variables, see further below. if quotes "" are given in echo, escaped quotes \" are replaced by ".

// about the mark commands: color can be red, green, blue, // yellow, cyan, magenta, Red, Green, Blue ... Magenta, // or "any" to select a cyclic color just as with double control. run [-min] mycmd myparms // run an external command, WAIT for completion. // -> this will BLOCK dview until the command ends! // -> if mycmd or myparms may contain blanks, // always add "" quotes around every single parm! // BAD: // run c:\program files\editor.exe $relfile1 -option // -> if there is a c:\program.exe, that one will be run. // -> if $relfile contains blanks, editor.exe will be confused. // GOOD: // run "c:\program files\editor.exe" "$relfile" -option // in many cases, run will open a shell window. to hide this window, // specify -min or -minimized directly after "run". runback [-min] yourcommand // run an external command, without waiting. // -> preferred over "run" if it's the only command on your hotkey. // specify -min directly after "runback" to hide the shell window. // NOTE: if the window focus is lost during "run", // add another script line with "activate". monitor "filename" delay=500 maxwait=5000 show=bottom // cyclically check an (already loaded) file for changes. // check every 500 msec. if there is no change over 5000 msec, // stop checking. on every change, reload and jump to the file's end. // filename: must be quoted if it contains blanks. // delay: must be >= 300 (msec) // show : "top" or "bottom" are supported. // DView looks at the time and size of a file to check if it's // content changed. If you think DView doesn't reload a file // although it changed, there is also an option "deep" to force // DView to look at the whole file content on every check. // A file monitor is stopped when you run another script, // and on other events like sending a search into a view. // There can be only one file monitor at a time. // NOTE: under LINUX, run can only run other WINDOWS applications // which must be available in the WINE PATH (linux shell PATH // is ignored). to edit this path, type "wine regedit" and // search for "path" somewhere under System...Environment. toggleFindHighlight toggleFilterHighlight dialogAddMark toggleCaseSearch toggleFilterView toggleFileList minimizeAll helpText toggle full line highlight of search result toggle word hits highlight in filtered view open Add Word Highlight dialog toggle case sensitive search toggle filtered view toggle file list minimize all windows show help text

supported base keys : f7, f9, f10 ... f12, shift+f7, ctrl+f7, ctrl+shift+f7, etc. // NOTE: when specifying combinations of ctrl and shift, // use alphabetical sequence: first ctrl, then shift. extended keys : f5, f6, f8 a,b,c, ..., x,y,z, alt+1 to alt+6 // NOTE: if you redefine extended keys, some Depeche View Lite // functions may no longer be accessible by those keys. virtual extended keys: mbuttondown , xbutton1down, xbutton2down, xbutton9down, // NOTE: se button, // // // t, // ons") up // allows to run own scripts when number keypad digits are pressed in NUML OCK mode. // this is essential for the Razer Naga mouse. to use such a mouse, // 1) look at the bottom side of the mouse, and switch it to "Num" mode (n ot "123"). // 2) make sure your keypad is in NUMLOCK mode as well. Press "Num" if it' s not. // if you have a keyboard without "Num" key, you may connect any cheap external // keyboard as a workaround, press "Num", then disconnect it. // 3) then write script commands like "on key num1up ..." in this config f ile. supported variables : $findmask // current find field content $pathmask // current path field content $curfile $absfile $relfile $fnbase $fnext $curpath $abspath $mouseword $mouseline // // // // // name of current seleted or edited file absolute name of it, like C:\... filename without any path (foo.txt) filename without extension (foo ) filename's extension ( txt) mbuttonup , xbutton1up, xbutton2up, ... xbutton9up

the above events are intended to run a script when the middle mou or extended buttons of a gamer mouse, are pressed or released. YOUR SYSTEM MAY NOT SUPPORT SOME OR ALL OF THOSE BUTTONS. If you are interested in Depeche View XE, test your hardware firs in the setup dialog. (search the help for "testing the mouse butt

further extended keys: num1down, num1up, ... num9down, num9up, num0down, num0

// path of curfile // path of absfile // current word under cursor // current text line under cursor (w/o blanks)

$clipline $linenum $colnum */ /*

// first line of ASCII clipboard text, if any // line number within current text // column number within current text

to insert just the $ character in your command, type $$.

EXAMPLES. To use, copy them outside the "/*" block. always keep EXACTLY the given format, including blanks, intendation, and keeping the "" quotes where they are! // f9 default: edit a file using notepad on key f9 runback notepad "$curfile" // f10 default: open any document by its associated application on key f10 runback cmd /C "$curfile" // f11 default: show current file's directory in explorer on key f11 runback explorer "$abspath" on key f7 set findmask = "class* $findmask OR class* $findmask:" set pathmask = ".hpp OR .h" on key shift+f7 set nearby.findmask = "::$findmask" set nearby.pathmask = ".cpp OR .c" on key ctrl+shift+f7 set third.findmask = "class* $mouseword" set third.pathmask = ".hpp OR .h" // // // on when releasing extra button 2, call a compile batch which is expected to write output to c:\tmp\log.txt, and show that log output as long as it changes. key xbutton2up set first.findmask = "" set first.pathmask = "c:\tmp\log.txt" first.runback -min "c:\myproject\compile.bat" first.monitor "c:\tmp\log.txt" delay=300 maxwait=5000 show=bottom default command to run an external editor by CTRL+E. this can only be a single line, starting with "runeditor", for example: runeditor "c:\Program Files\myeditor\myeditor.exe" "$absfile"

*/ // // // //

runeditor notepad "$absfile" /* // you may also redefine CTRL+E by a multi line script like: on key ctrl+e set clipline = "$mouseline" runback youreditor.exe "$absfile" */ /* this example requires Swiss File Knife (sfk.exe) within the same directory as dview. note that the text

from "run sfk" into one large - "filter" has - "filter" ... "echo" has the it is executed

to "+pause" will be joined together command, because a deeper indentation then "run". "+pause" lines have the same indentation. same indentation as "run", and therefore as a separate command.

*/ /* on key f9 run sfk -waitonerr filter "$curfile" -+class -!; +pause echo "filtered: \"$curfile\"" // search current word as class in other view on key shift+f9 set nearby.findmask = "class* $mouseword OR class* $mouseword: NOT ;" set nearby.pathmask = ".hpp OR .h" // search occurrence of word both with double and single quotes on key shift+f10 set nearby.findmask = ""$mouseword" OR '$mouseword'" set nearby.pathmask = ".cpp OR .c OR .hpp" // reformatting of a tab separated trace file on key ctrl+f12 run sfk pause "about to filter $absfile - ctrl+c to stop" +filter $absfile -spat -![:entry:] -![:exit:] -sep "\t" -rep _fooprocess_foo_ -rep _barprocess_bar_ -form "$03col2 $7.7col5$col6 $col9" -write -yes reload $absfile // convert clipboard text: change all "_" to "*" on key shift+f12 run sfk fromclip +filt -rep "x_x*x" +toclip echo "underscores replaced by stars." // add highlight for some triple character phrases on key f9 mark add red "[>]" mark add yellow "[<]" // (un)highlight the line under the mouse cursor on key f10 mark toggle any "$mouseline" // use sfk to split the mouseword by its "_" characters, // then search "*" combined expression in nearby view. // note that this example uses 'x' as separator character, // to avoid syntax problems with / and * (end of remark). on key alt+1 set clipline = "$mouseword" run sfk fromclip +filt -rep "x_x*x" -rep "x x*x" +toclip activate set nearby.findmask = "$clipline"

set nearby.pathmask = ".cpp OR .c" // // // // on on middle mouse button down, copy the mouse word to clipboard, then open a pdf file with the same name as the current file, however located in a folder "docs", and with a file extension of .pdf instead of .txt. this example requires sfk. key mbuttondown echo "open pdf" set clipline = "$mouseword" runback sfk echo -lit $curfile +filter -rep _.txt_.pdf_ +run -yes -spat "start \qC:\\Program Files\\Adobe\\Acrobat\\Reader\\AcroRd3 2.exe\q docs\\$text" */ // Pro: syntax highlighting color definitions: // colorname RRGGBB keyword group color shl-keys1 0000D0 // group 1, user extension, 0000D0 = blue color shl-keys2 0000D0 // group 2, user extension color shl-keys3 0000D0 // group 3, user extension color shl-keys4 0000D0 // group 4, user extension color shl-keys5 0000D0 // group 5, default hightlighting, blue color shl-keys6 F06000 // group 6, default hightlighting, orange color shl-remarks 008060 // remark lines and blocks color shl-strings 707070 // string literals /* Depeche View comes with simple built-in syntax highlighting (SHL) for the following languages: "cpp" "java" "xml" "sql" "css" for for for for for file file file file file extensions extensions extensions extensions extensions "h hpp c cpp cc cxx c++" "jav java jsp" "html xml php shtml jsp" "sql" "css"

You may add SHL for additional languages within this config file. Formal syntax per language: <Language name="mylang" [extends="xml"] [opt="nocase"] ext="ext1 ext2 ext3 ..." commentLine="..." commentStart="..." commentEnd="..."> <Keywords name="keys1">word1 word2 word3 ...</Keywords> <Keywords name="keys2">word7 word8 word9 ...</Keywords> ... </Language> Where can you get read-to-use SHL definitions? Unfortunately, there is no standard; an SHL definition always consists of two parts: 1) heuristic logic programmed within a tool. for example, a rule like "lines starting with # in c++ code are no remark but should still be shown in a different color". 2) keyword lists and options, used by that logic. for example: if else endif for while return ...

Part 1) cannot be copied from somewhere else. Part 2) can be taken from other tools with some conversion effort. Depeche View Pros language highlighting definition syntax looks similar to a Notepad++ "langs.xml" file, but using keyword lists from such a file may produce incomplete highlighting. they contain rather simple keywords, requiring much additional logic NOT given in the langs.xml. So if you copy stuff from langs.xml, always expect much manual rework. The commercial texteditor UltraEdit uses word lists that require few additional logic. Just google for "UltraEdit wordfiles". It shouldn't be too difficult to manually convert a few of those definitions (remove all options not supported by dview, like delimiters or indent strings ). // syntax highlighting example: own "cpp" definition (overrides dview built-in d efault) // NOTE: you MUST remove the blank in "/ *" and "* /" to make this example work. <Language name="cpp" ext="h hpp hxx cpp cxx cc" commentLine="//" commentStart="/ *" commentEnd="* /"> <Keywords name="keys6">class delete friend inline new operator private protec ted public this virtual</Keywords> <Keywords name="keys2">if else switch case default break goto return for whil e do continue typedef sizeof NULL try catch throw namespace operator true false< /Keywords> <Keywords name="keys3">void struct union enum char short int long double floa t signed unsigned const static extern auto register volatile bool friend inline template</Keywords> <Keywords name="keys4">#define #defined #error #include #elif #if #line #else #ifdef #pragma #endif #ifndef #undef</Keywords> </Language> // example: register .foo and .bar file extensions to use the built-in XML highl ighting. // Note that the <Language> blocks accept some kind of relaxed XML, meaning you can // even write keyword lists like "<html> <body>" within the <Keywords> block, // as long as the phrase "</Keywords>" does not appear in your actual keywords c ontents. <Language name="foo" extends="xml" ext="foo bar"> <Keywords name="keys1"> <html> <body> </body> </html> < > </Keywords> </Language> */ assist yes scrollall yes

You might also like