### Expected vs-preview startup log output Source: https://github.com/jaded-encoding-thaumaturgy/vs-preview/blob/master/docs/installation/install_vscode.rst Example of the log messages printed in the Debug Console when vs-preview starts successfully. If there is an error with the script, it will be printed instead. ```text 2021-03-19 03:43:03.324: INFO: QSS file successfully loaded. 2021-03-19 03:43:03.328: INFO: Found application patches to be applied. 2021-03-19 03:43:04.207: INFO: No storage found. Using defaults. ``` -------------------------------- ### Install nightly vs-preview from GitHub Source: https://github.com/jaded-encoding-thaumaturgy/vs-preview/blob/master/docs/installation/install_vspreview.rst Installs the nightly build from the GitHub repository. Note that nightly builds may be unstable. ```bash pip install git+https://github.com/Jaded-Encoding-Thaumaturgy/vs-preview.git -U ``` -------------------------------- ### Install vspreview via pip Source: https://github.com/jaded-encoding-thaumaturgy/vs-preview/blob/master/README.md Install the latest stable version of the vspreview package from PyPI using pip. ```bash pip install vspreview ``` -------------------------------- ### Install a vspreview plugin Source: https://github.com/jaded-encoding-thaumaturgy/vs-preview/blob/master/README.md Install an external plugin by specifying its name. The plugin name corresponds to a directory in the vs-preview-plugins repository. ```bash vspreview install [plugin-name] ``` -------------------------------- ### Expected vs-preview startup output Source: https://github.com/jaded-encoding-thaumaturgy/vs-preview/blob/master/docs/installation/install_notepad++.rst When vs-preview runs successfully, it prints these log lines to the terminal. The output shows that the QSS file loaded, application patches were found, and no storage was found, so defaults are used. ```powershell 2021-03-19 03:43:03.324: INFO: QSS file successfuly loaded. 2021-03-19 03:43:03.328: INFO: Found application patches to be applied. 2021-03-19 03:43:04.207: INFO: No storage found. Using defaults. ``` -------------------------------- ### Install stable vs-preview with pip Source: https://github.com/jaded-encoding-thaumaturgy/vs-preview/blob/master/docs/installation/install_vspreview.rst Installs the latest stable release of vs-preview. Requires Python 3.10 or higher and VapourSynth 59 or higher. ```bash pip install vspreview -U ``` -------------------------------- ### Vim syntax highlighting for .vpy files Source: https://github.com/jaded-encoding-thaumaturgy/vs-preview/blob/master/docs/installation/install_vim.rst Add this line to your _vimrc to enable Python syntax highlighting for .vpy files. ```vimscript au BufReadPost,BufNewFile \*.vpy setlocal syntax=python ``` -------------------------------- ### Run vs-preview from Notepad++ Run dialog Source: https://github.com/jaded-encoding-thaumaturgy/vs-preview/blob/master/docs/installation/install_notepad++.rst Add this command to the Notepad++ Run dialog (Run > Run or F5) to execute vs-preview on the current .vpy file. Save it as a preset named 'vspreview' with a shortcut. The $(FULL_CURRENT_PATH) variable expands to the full path of the active file. ```powershell vspreview "$(FULL_CURRENT_PATH)" ``` -------------------------------- ### Vim mapping to run vs-preview Source: https://github.com/jaded-encoding-thaumaturgy/vs-preview/blob/master/docs/installation/install_vim.rst Add this mapping to your _vimrc to run vs-preview on the current .vpy file by pressing 'r' in Vim. ```vimscript :map r :w:!vspreview "%:p" ``` -------------------------------- ### Manual launch.json configuration for vs-preview Source: https://github.com/jaded-encoding-thaumaturgy/vs-preview/blob/master/docs/installation/install_vscode.rst Replace the contents of the generated launch.json file with this configuration to run vs-preview on the current file or run the file directly. Includes two debug configurations: 'VS Preview Current File' and 'Run Current File'. ```json { "version": "0.2.0", "configurations": [ { "name": "VS Preview Current File", "type": "debugpy", "request": "launch", "module": "vspreview", "args": ["${file}"], "console": "internalConsole" }, { "name": "Run Current File", "type": "debugpy", "request": "launch", "program": "${file}", "console": "internalConsole" } ] } ``` -------------------------------- ### Generate launch.json with vs-preview CLI Source: https://github.com/jaded-encoding-thaumaturgy/vs-preview/blob/master/docs/installation/install_vscode.rst Run this command in the terminal to automatically generate or update the launch.json file for vs-preview in Visual Studio Code. ```bash python -m vspreview --vscode-setup append ``` -------------------------------- ### Asynchronous vs-preview in Vim/Neovim Source: https://github.com/jaded-encoding-thaumaturgy/vs-preview/blob/master/docs/installation/install_vim.rst Add these lines to your _vimrc to run vs-preview asynchronously in Vim 8+ or Neovim, preventing the editor from freezing. ```vimscript nnoremap r :w:call AsynchronousVsPreview(expand("%:p")) function! AsynchronousVsPreview(file_path) let l:vsPreview_cmd = 'vspreview '.a:file_path if exists('g:job_vs') if has('nvim') call jobstop(g:job_vs) else call job_stop(g:job_vs) endif unlet g:job_vs echom 'Stopping vs-preview...' else if has('nvim') let g:job_vs = jobstart(l:vsPreview_cmd, {}) else let g:job_vs = job_start(l:vsPreview_cmd, {}) endif echom 'Starting vs-preview asynchronously...' endif endfunction ``` -------------------------------- ### Force reinstall stable vs-preview Source: https://github.com/jaded-encoding-thaumaturgy/vs-preview/blob/master/docs/installation/install_vspreview.rst Forces a reinstall of the stable vs-preview package. Use this if the standard update command does not update as expected. ```bash pip install vspreview -U --force-reinstall ``` -------------------------------- ### Force reinstall nightly vs-preview Source: https://github.com/jaded-encoding-thaumaturgy/vs-preview/blob/master/docs/installation/install_vspreview.rst Forces a reinstall of the nightly vs-preview build from GitHub. Use this if the standard update command does not update as expected. ```bash pip install git+https://github.com/Jaded-Encoding-Thaumaturgy/vs-preview.git -U --force-reinstall ```