Copy File Path and Content
Description
The "Copy File Path and Content" extension for Visual Studio Code provides a convenient way to copy the file path and its content to the clipboard. With this extension, you can easily share code snippets, file paths, or entire file contents with others, directly from your VS Code editor.
Features
- Copy the file path and content of the current file in the editor
- Copy the file path and content of selected files in the file explorer
- Copy the file path and content of all open tabs in the editor
- Keyboard shortcuts:
ctrl+alt+c
to quickly copy the current file path and content
ctrl+alt+o
to quickly copy the file path and content of all open tabs
Installation
- Open Visual Studio Code
- Go to the Extensions view (
Ctrl+Shift+X
or Cmd+Shift+X
)
- Search for "Copy File Path and Content"
- Click on the "Install" button
- Restart VS Code (if prompted)
Usage
Copy Current File Path and Content
- Open a file in the VS Code editor
- Right-click on the editor title or use the
ctrl+alt+c
keyboard shortcut
- The file path and content will be copied to the clipboard
Copy Selected File Path and Content
- In the VS Code file explorer, right-click on a file
- Select "Copy SELECTED File Path and Content" from the context menu
- The file path and content of the selected file will be copied to the clipboard
Copy Open Tabs Path and Content
- Right-click on any file tab in the editor or use the
ctrl+alt+o
keyboard shortcut
- Select "Copy OPEN Tabs Path and Content" from the context menu
- The file path and content of all open tabs will be copied to the clipboard
Configuration
This extension does not require any additional configuration. It works out of the box with the default settings.
Custom Keybindings
Visual Studio Code allows you to set custom keybindings for extension commands directly within the IDE.
To customize the keybindings for "Copy File Path and Content" commands:
- Open the Keyboard Shortcuts editor in VS Code by going to "File" > "Preferences" > "Keyboard Shortcuts"
- Search for the desired command using: "extension.copy"
- Click on the "Keybinding" cell for the command you want to edit the shortcut for.
- Press the desired key combination for the custom keybinding.
- If there are any conflicts with existing keybindings, VS Code will prompt to resolve them.
- The custom keybinding will be added to your keybindings.json file.
Feel free to customize the keybindings to suit your preferences!
Feedback and Support
If you encounter any issues, have suggestions, or need assistance, please feel free to:
- Open an issue on the GitHub repository
- Contact the extension author via email at tas.smity@yahoo.com
We appreciate your feedback and are committed to improving the extension based on your input.
Release Notes
1.1.0
- Removed the extra window and "Copy Path / Contents w/ Divider" option for a more streamlined user experience
- Fixed an issue where the "Copy SELECTED File Path and Content" command was copying all open tabs instead of the selected file
- Updated the README with the latest changes and usage instructions
1.0.0
- Initial release of the "Copy File Path and Content" extension
- Added support for copying file path and content of the current file, selected files, and open tabs
- Introduced two formatting options: with and without divider
- Implemented keyboard shortcuts (
ctrl+alt+c
and ctrl+alt+o
) for quick access
We hope you find this extension useful and enjoy using it in your development workflow. If you like the extension, please consider giving it a rating and review in the Visual Studio Code Marketplace.
Happy coding!