Tips & Tricks         Tips & Tricks Home Home

Choose a language English Español Deutsch
English Spanish German
choose a subpage WinVi Main Page Release Notes Tips & Tricks Screenshots Download Links e-Mail

  • New in version 2.98beta: Converting between different character encodings (e.g. ANSI codes to UTF-8) can be easily done using the clipboard: simply select the entire text with Ctrl+C, change the encoding by clicking the corresponding toolbar button and finally paste the original text with Ctrl+V.

  • Especially for use with "View source" in the Internet Explorer, there is a special handling in the 32-bit version of WinVi: If the first character of the program file name is an N (as in NWINVI32.EXE), parameter decoding occurs compatible to Notepad. In this case, a file name containing spaces need not be surrounded by double quotes. As a result, it is not possible to specify more than one file on the command line. Printing can be done by specifying /p as the first parameter (instead of -p with "standard" WinVi). You can use any other file name beginning with N but you should be sure to have a backup copy when replacing existing files.

  • When using the original program file name, the following might be interesting for you:
    If a double click in Windows Explorer does not correctly open a file containing spaces in its name, you might have to change the file association. Append the five characters <space>"%1" to the command line of WinVi to tell the Explorer to open the file with double quotes surrounding the name. Look for the file type in Explorer's menu "View" -> "Options..." -> "File types", then click "Edit..." and in the appearing dialog box click "Edit..." again. Then change the command line from C:\your-path\WinVi32.exe to C:\your-path\WinVi32.exe "%1" .

  • If you use the ex command :vi <file> instead of :e <file>, the specified file will be opened in a new window.

  • To see the matched string after searching with / or ? (vi search method), simply push the toolbar button "Search again". A non-empty character sequence at the current position will be found again and selected.

  • When opening a File, the type of text is determined by counting the newline characters. If at least one CR/LF sequence is found, the file is handled as a DOS/Windows file. Otherwise it is Unix (more LFs than CRs) or Mac format (more CRs). The status line shows a corresponding file attribute ([Lf] or [Cr]). When inserting <Enter>, the corresponding newline will be generated, according to the text file type. Any other newline will be displayed with a dark red special symbol as displayed in the table below.

  • Following bytes are considered being newlines (red = display on screen):
          00 (NUL), 0A (LF), 0D (CR), 0D+0A (CR+LF), 1E (RS)
    The double arrow at the end of the table is used if a line is not terminated by a special character (currently used at end of file only).
    The regular expressions /. or /[^x] do not match any of these newline characters.

  • When reading or writing a file, newline characters are never converted automatically.

  • Newline characters can be included in regular expression search patterns.
    Example: Change a DOS formatted text file to Unix format with :%s/\%0d\%0a/\%0a/ .

  • To alter cursor left, cursor right, and backspace to a line wrapping behaviour, change the flag "Line wrapping horizontal cursor movements" in the Settings dialog.

  • Several changes can be undone by successively typing <Alt+Bksp>. To redo the last undo operation, you can use the vi compatible command <Esc> u (undo). Please note that only the last input of <Alt+Bksp> can be reverted.

  • After opening another file, you can go back to the previously edited file by simply typing Ctrl+^ or Ctrl+6. If you type it again, you will move back to the original position where you first typed this control character.

  • You can search for more than one pattern within one regular expression. Several "branches" can be combined in one search expression if you parenthesize the choices (escaped!) and separate them by an escaped bar.
    Example: Typing /\(first\|second\) branch<Enter> , you can find the next occurrence of "first branch" or "second branch".

  • Using the clipboard, you can now copy any binary data including null bytes between two instances of WinVi.

  • Within the command line (after input of :), the current word at nearly any position can be automatically expanded when using the tab key. If there is more than one choice, a popup menu will appear. This feature is especially useful when browsing for a file path to open.

  • The filename in the window title and in the Windows submenu contains an appended * if the text has changed but has not been saved yet. The save button in the toolbar is gray if there are no changes that have not been saved into the current file.
    After undo of initial changes the previous safety state will be restored.

  • You can click and drag any files from Explorer or File Manager into a running window of WinVi. The first file will be opened instead of the previous current file. Use :n<Enter> to switch to the next dropped file. If you hold down the shift key while dropping files, a new WinVi window will be created for each file.

  • You can search for the word at the current position, in forward direction with *, backward with #.

  • The contents of the first field of the status line can be put into the clipboard for further actions. A corresponding menu pops up with a right mouse button click on this field (or by input of <Ctrl+Shift+F10>).