// Depeche View configuration file, http://stahlworks.com/dev/ config-version 142 // Every line starting with "//" is a remark, and ignored by dview. // Every block surrounded by /* and */ is a remark block. // 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. /* 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 it's 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. */ // linux: linux users MUST activate the following setting: // linux yes // 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 200 // megabytes // 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 500 // megabytes // should window move and resize mode (fat borders) be active // from startup? if so, activate the following line, but keep // in mind that you do not simply move a single window around, // but the whole window creation area! // resizemode yes // default is no // always start with first window non-maximized and centered? // startlean yes // default is no // depeche view base (not xe): to disable the runmode dialog // on startup, set the preferred run mode here: // runmode base // "base" or "xedemo" // use file mask during load? // usefilemask yes // default is no // filemask .txt .cpp .hpp !.bak !.tmp // use subdir mask during load? // usedirmask yes // default is 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 yes // default is no (load) // default setting for case sensitive search mode case 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. // punct no // 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. // accent no // enter FILTERED VIEW AUTOMATICALLY whenever you search something? // as soon as you learned a bit how to use filtered views, // it is highly recommended to always activate this setting: // autofilter yes // when searching foo*bar, shall the sequence "bar after foo" // be enforced in search results or not? searchseq 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. // autoresetfind 3000 // msec, default is 0 (inactive) // xe: check and autoreload loaded files whenever the window is reactivated? autoreload no // xe: limit autoreload to a given list of directories? // limitautoreload yes // default is no // xe: default content of autoreload limit list: // autoreloadmask foodir1 foodir2 foodir3 // xe: delay auto reload of files beyond a certain size? // reloaddelayonsize 10 // in mbytes // if a snapfile is loaded on startup, should it's contents // be scanned for changes immediately after loading? // snapautoreload yes // default is no // with autoload, on reactivation of it's 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 30 // 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 yes // default is no // will CONTROL+F open a find dialog, or activate the filtered view? // if you have troubles re-learning to CTRL+A, you may activate: // filteronctlf yes // xe: enable one click edit or not from startup. // cannot be used together with one click search. // oneclickedit yes // default is no // xe: if within editor, you may save and stop editing // by a double click on blank space, by activating this: // doubleclicksave yes // default is no // enable one click search or not from startup. // cannot be used together with one click edit. // oneclicksearch yes // default is 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 200 // msec, default is 300 // text editor: always insert blanks when pressing TAB? // otherwise editor auto detects mode by file content. // blanktabs yes // default is no // text editor: auto indentation when pressing ENTER? // autoindent yes // default is no // gray out text file contents excluded by path mask (CTRL+B) // markexcluded yes // default is no // xe: enable user defined hotkeys from startup // userkeys yes // default is yes // by default, changes in the configuration file are reloaded // whenever the window is reactivated. this can be changed by: // autoloadconfig no // default is yes // however, if the config file does not exist, or is unreadable, // the config autoload (file monitoring) is always stopped. // maximum delay after typing before search starts (CTRL+P). // set to 400 or 200 to get a fast feeling in small projects. // set to 1200 or more in large projects, for relaxed typing. // CTRL+P allows to switch between the value you define here // and the predefined delays 800, 400 and 200. // delay 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. // only if you want to change this to a FIXED size and location, // activate the following setting: // area xpos:ypos:width:height:ydelta // e.g. // area 20:20:800:500:20 // display contents of files during load // loadshow yes // or shift+click during load // loadshowbrightness 200 // display brightness, 0 ... 255 // disable support for german umlauts when selecting words for search // noumlauts yes // by default, dview tries to identify the correct tab size automatically. // to disable this automated detection, set a default tab size here: // tabsize 8 // by default, bookmarks (re)store the tab size at the // referenced area of text. this can be disabled by: // bookmarktabsize off // default is on // which bookmark set should be opened on startup? // startbmset 1 // from 1 to 9 // 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 yes // time that $mouseword in a script is highlighted: // wordshowtime 2000 // msec, 0=off // on activation of the following, keeping alt pressed // highlights the word under cursor temporarily. // wordshowdelay 500 // case sensitive word highlighting // markcase yes // xe: 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 on // default is off // xe: 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 // default is on // xe: by default, favourite search terms are saved // whenever bookmarks are saved, in a .dvdb file. // to disable any creation of .dvdb files, set this. // your search terms will then be kept in memory only, // as long as dview is running. // savesuggest off // default is on /* [DView XE only] clipboard hot search: customized search strings for the find and path fields. */ // view1clipfind $clipline // view1clippath // view2clipfind class $clipline // 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 200,400,600 // in msec, default is 0,200,500 // clipboard auto append: allow duplicate content to be appended? // clipallowdups yes // default is no // clipboard auto append: append only text with >= lines // clipminlines 2 // default is 1 // clipboard auto append: use separator line? // clipaddsep yes // default is no // separatorline ========= // scan the clipboard if it contains absolute filenames or url's? // scanclipurl yes // default is no // --------------- font configuration ---------------- /* font used for main text display: mainfont name,width,height,weight,linespacing name = any name like Courier, Arial etc. width = of characters, usually between 6 and 20 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 only FIXED PITCH fonts are allowed, i.e. all characters must have the same width. */ // mainfont Fixedsys,8,9,0,0 // default (Windows) // mainfont Courier New,8,18,600,-4 // default (Linux) /* If you select a font in dview using "..." and then the "font" button, - you will get an estimation for the above line in the right bottom log. in most cases, you have to reduce width, increase weight, and reduce the linespacing a bit, until you have a proper looking font. - there can be a blank line left at the bottom of the window, but this should be gone after restart. NOTE: if you are using a high-resolution monitor, dview may not use mainfont on startup, but the alternative mainfont2. read on below. */ // second font used for main text display: // use CTRL+J within dview to toggle between them. // mainfont2 Courier New,11,22,800,-2 // default: a larger font // the default mainfont2 is much larger then the primary font, // and it is activated automatically on window sizes >= 1300 pixels. // this auto-activation can also be switched off by: // autoselectfont2 off // or specify a pixel width, e.g. 1000 // 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 Arial,8,12,500,0 // default // second font used for bookmarks: // use CTRL+SHIFT+J within dview to toggle between them. // bookfont2 Courier New,10,20,800,0 // default: a larger font // ------ background image ------ // name of a .jpg background image file. if a relative name (without "\") // is specified, the PATH is searched for the image. // background back.jpg // should the background image be aligned to the desktop, // or to the bottom right corner of every dview window? // background-align desktop // or window // change left and right side of background image? // backflip yes // if the image is smaller than the desktop, it is repeated (tiled) // by default. set the following to avoid this: // backrepeat no // if the image is repeated, shall it be reversed or not? // backreprev yes // the background image is displayed pale to keep the text readable. // specify here how pale it should be, within range 1 (image clearly visible) // to 30 (completely unvisible). changed also by CTRL+B within dview, // or (under Windows) by Alt+LMouse vertical movements on blank space. // backpale 10 // ------- DView Extended Edition: user defined 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 : // [] means an optional value set findmask // change find mask in current window set pathmask // change path mask in current window set nearby.findmask // same in 2nd window (if any) set third.findmask // same in 3rd window (if any) set first.findmask // address the very first window set second.findmask // address the second window set filter off // 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 [$relfile] // reload current file, or check all files [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 // 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". // 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. 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 base // functions may no longer be accessible by those keys. virtual extended keys: mbuttondown , mbuttonup , xbutton1down, xbutton1up, xbutton2down, xbutton2up, ... xbutton9down, xbutton9up // NOTE: the above events are intended to run a script when the middle mouse button, // 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 first, // in the setup dialog. (search the help for "testing the mouse buttons") further extended keys: num1down, num1up, ... num9down, num9up, num0down, num0up // allows to run own scripts when number keypad digits are pressed in NUMLOCK 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 (not "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 file. supported variables : $findmask // current find field content $pathmask // current path field content $curfile // displayed name of selected file $absfile // absolute name of it, like C:\... $relfile // filename without any path (foo.txt) $fnbase // filename without extension (foo ) $fnext // filename's extension ( txt) $curpath // path of curfile $abspath // path of absfile $mouseword // current word under cursor $mouseline // current text line under cursor (w/o blanks) $clipline // first line of ASCII clipboard text, if any 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" // f11 default: show current file's directory in explorer on key f11 runback explorer "$abspath" // f12 default: open any document by it's associated application on key f12 runback cmd /C "$curfile" 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" */ // default command to run an external editor by CTRL+E. // this can only be a single line, starting with "runeditor". // runeditor "c:\Program Files\myeditor\myeditor.exe" "$absfile" // further examples: // runeditor c:\app\bin\npp.exe "$absfile" // runeditor c:\app\ahk\AutoHotkey.exe c:\app\bin\call-eclipse.ahk "$absfile" /* // DView XE also allows to 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" to "+pause" will be joined together into one large command, because - "filter" has a deeper indentation then "run". - "filter" ... "+pause" lines have the same indentation. "echo" has the same indentation as "run", and therefore it is executed as a separate command. */ /* on key f9 run sfk filter $curfile -+class -!; +pause echo filtering done // 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 it's "_" 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 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. on 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\\AcroRd32.exe\q docs\\$text" */ /* optional block: settings used only with linux mode. this can make sense if you want to use the same config from an usb stick both on windows and linux systems. context linux // executes the following lines only under linux mainfont Courier New,8,18,600,-4 // border width and height of window borderwidth 10 borderheight 30 // back to normal context: context any */ // 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" for file extensions "h hpp c cpp cc cxx c++" "java" for file extensions "jav java jsp" "xml" for file extensions "html xml php shtml jsp" "sql" for file extensions "sql" "css" for file extensions "css" With DView XE, you can add SHL for additional languages within this config file. Formal syntax per language: word1 word2 word3 ... word7 word8 word9 ... ... 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 ... The problem is part 1), which cannot be copied from somewhere else. Depeche View's 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 default) // NOTE: you MUST remove the blank in "/ *" and "* /" to make this example work. class delete friend inline new operator private protected public this virtual if else switch case default break goto return for while do continue typedef sizeof NULL try catch throw namespace operator true false void struct union enum char short int long double float signed unsigned const static extern auto register volatile bool friend inline template #define #defined #error #include #elif #if #line #else #ifdef #pragma #endif #ifndef #undef // example: register .foo and .bar file extensions to use the built-in XML highlighting. // Note that the blocks accept some kind of relaxed XML, meaning you can // even write keyword lists like " " within the block, // as long as the phrase "" does not appear in your actual keywords contents. < > */