An extension for Visual Studio Code to preview erd(.er) files
An extension for Visual Studio Code to preview ERD (Entity-relationship diagram) files.
ERD Preview - Visual Studio Marketplace
github.com/kaishuu0123/vscode-erd
Make sure the extension can find the "erd" and "dot" program.
You can set erd-preview.erdPath
and erd-preview.dotPath
option.
Please edit settings.json. ([File] -> [Preference] -> [Settings])
Use this extension require erd
and dot
command.
You can get erd
command here.
You can get dot
command here.
Preview
Ctrl+Shift+p
(windows) or Command+Shift+p
(Mac) and select ERD: Preview Current Window"
Export to file
Ctrl+Shift+p
(windows) or Command+Shift+p
(Mac) and select ERD: Save as SVG
or ERD: Save as PNG
or ERD: Save as PDF
.C:\Users\(user name)\Tools\windows_amd64_erd-go.exe
C:\Users\(user name)\Tools\graphviz-dot-win-x64.exe
{
"erd-preview.erdPath": "C:\\Users\\(user name)\\Tools\\windows_amd64_erd-go.exe",
"erd-preview.dotPath": "C:\\Users\\(user name)\\Tools\\graphviz-dot-win-x64.exe",
}
/Users/(user name)/tools/darwin_amd64_erd-go
/Users/(user name)/tools/graphviz-dot-macos-x64
{
"erd-preview.erdPath": "/Users/(user name)/tools/darwin_amd64_erd-go",
"erd-preview.dotPath": "/Users/(user name)/tools/graphviz-dot-macos-x64",
}
$ brew tap kaishuu0123/erd-go
$ brew install erd-go
# install check
$ erd-go
$ brew install graphviz
# install check
$ dot
/home/(user name)/tools/linux_amd64_erd-go
/Users/(user name)/tools/graphviz-dot-linux-x64
{
"erd-preview.erdPath": "/home/(user name)/tools/linux_amd64_erd-go",
"erd-preview.dotPath": "/Users/(user name)/tools/graphviz-dot-linux-x64",
}
dot
command path.$ git clone [email protected]:kaishuu0123/vscode-erd.git
$ cd vscode-erd
$ code .
This work is based off of several existing projects: