In this article, we’re going to learn about the two features of VS Code. One is the active file comparison and the other is effortlessly creating the image links in the markdown files for documentation.
Compare two active files in VS Code
- Open the two files of the same file format that you want to compare. The format can be any, like Markdown, Java, and Python.
- Open the command palette by pressing Ctrl+Shift+P on your keyboard.
- Type Compare Active file.
- Select File: Compare Active File With…
- Select the file to compare with.
You’ll see the comparison between the two selected files opened in the VS Code.
Easily add an image URL in the Markdown file
- Drag and drop the image. An automated URL with alt text will be generated, like this: .
- Edit the alt text.
- Replace ../../../ with {static}.
The new image URL will be like . This is the required URL.
In the following line, you can also add something like this: {: .lightbox #image8 }. But I think we hardly use it.
Note: The Markdown file and image file must belong to the same project.