![]() To cover on that, there is a great demos repository but with that, you need to do “reverse engineering”. Vscode API’s docs are basically good but I feel that many times it lacks a context. I already tried to develop a tiny extension before but now I want to use more advanced API capabilities to enrich that plugin and make it ready for real use. Second, I’m using vscode intensively and I like to know it better. Click on a file, will open a diff view, side by side and (hopefully) the user will be able to take or leave changes just like in git merge. Once the other folder selected, the extension will compare the content of the folders and display a tree view of the files with the difference. In that panel, the user could choose a folder anywhere in the file system. There will be a dedicated panel for this in the view panel (in the left side of the app, at the same place the the files explorer). As much as it’s a trivial need and there are a lot of tools out there, vscode has none. With that plugin you can compare 2 folders’ content just like you do with git by comparing a branch code to master. The post is (will be) part of a series (□) and the only one who will not include any code examples and technical stuff. You can find the series of the posts about how this extension developed step by step in post meant to introduce the journey of the Visual Studio Code (“vscode”) plugin CompareFolders. ignoreEmptyLines - boolean - ignore differences caused by empty lines (similar to diff -B)Įxample "compareFolders.ignoreExtension": [īy calling the following command from the terminal / command line, the extension will be calling on vscode load and show the differences view COMPARE_FOLDERS=DIFF code path/to/folder1 path/to/folder2.ignoreAllWhiteSpaces - boolean - ignore all white space differences (similar to diff -w).ignoreWhiteSpaces - boolean - ignore white spaces at the beginning and ending of a line (similar to diff -b).ignoreLineEnding - boolean - ignore crlf/lf line ending differences.Note: each extension can show only once it this list ignoreExtension - Set groups of extensions so while comparing, pairs of files considered the same file if both of the files extension are in the same group.folderLeft + folderRight - strings - paths of 2 folders, compare them on the extension load.In order to use this option, you should install the extension useDiffMerge - boolean - Whether or not using Diff & Merge extension as the Diff viewer. ![]() showIdentical - boolean - Whether or not show the identical files panel.diffLayout - One of the options: "local compared" or "compared local".ignoreFileNameCase - boolean - Compare files with the same name but different case.diffViewTitle - One of the options: "name only", "compared path", "full path".compareContent - boolean - Compares files by content.Options (under vscode settings)Įxample "compareFolders.excludeFilter": [ Refresh - If there are changes in the compared folders' files, click on the refresh button will re-compare the folders. (The list can be reset by Clear recent compares).Pick from recent compares chose one of the pairs you compared in the past.Select 2 folders, right click and click on Compare selected folders see 2nd item.Compare Folders Panel (Click on the icon in the Activity Bar).Choose 2 folders and compare - opens OS folder chooser twice.Compare a folder against workspace choose a folder to compare against the workspace's folder (when workspace is not empty).There are several ways to choose folders to compare: If you like this extension, please give a star to dir-compare! How to use? The extension uses the great dir-compare package made by Liviu Grigorescu. The extension allows you to compare folders, show the diffs in a list and present diff in a splitted view side by side. □ If you don't (that's ok □), or if you find any issues, please open an issue or email me □ Thank you for using the Insider version.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |