GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - sendhil/vscode-file-explorer-menu: VSCode Extension to mimic the menu from NERDTree.

BranchesTags
Open more actions menu

Latest commit

 

History

41 Commits
41 Commits

Folders and files

NameName
Last commit message
Last commit date
.vscode
.vscode
 
 
images
images
 
 
src
src
 
 
.eslintrc.json
.eslintrc.json
 
 
.gitignore
.gitignore
 
 
.vscodeignore
.vscodeignore
 
 
.yarnrc
.yarnrc
 
 
CHANGELOG.md
CHANGELOG.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
package.json
package.json
 
 
tsconfig.json
tsconfig.json
 
 
vsc-extension-quickstart.md
vsc-extension-quickstart.md
 
 
yarn.lock
yarn.lock
 
 

Repository files navigation

VSCode File Explorer Menu

This extension attempts to mimic the menu from the Vim NERDTree plugin.

quick demo

The extension includes one command vscodeFileExplorerMenu.openFileExplorerMenu which can be executed through the normal command menu, but for convenience(and to mimic NERDTree) it's bound to the m key with the explorerViewletVisible && filesExplorerFocus && !inputFocus when clause.

Features

Just like the NERDTree Vim Plugin, this extension enables you to quickly:

  • Add a node.
  • Delete a node.
  • Move a node.
  • Copy a node.
  • Open a node in the system editor.
  • List out a node (i.e. ls -ld).
  • Copy the node's path to the clipboard.
  • Open the node in the system's file explorer.

Note - while the extension is made to work primarily through the context in the file explorer menu, if you call it from an editor it will assume the context is the file currently being edited.

Extension Commands

The primary command contributed by the extension is vscodeFileExplorerMenu.openFileExplorerMenu, but for convenience all of the internal functions are exposed as actions as well.

  • vscodeFileExplorerMenu.addChildNode,
  • vscodeFileExplorerMenu.moveCurrentNode,
  • vscodeFileExplorerMenu.deleteCurrentNode,
  • vscodeFileExplorerMenu.revealCurrentNode,
  • vscodeFileExplorerMenu.openNodeInEditor,
  • vscodeFileExplorerMenu.copyCurrentNode,
  • vscodeFileExplorerMenu.copyPathToClipboard,
  • vscodeFileExplorerMenu.listCurrentNode

Extension Settings

This extension contributes the following settings:

  • fileExplorerMenu.confirmFolderDeletion: An extra prompt for deleting a folder (default is true).
  • fileExplorerMenu.displayListNodeInTerminal: Displays the output of list node in a terminal instead of a notification (default is false).

Known Issues

  • The way the extension gets the current file path is using the copyFilePath command. The extension saves the contents of the clipboard before running this command and then puts it back, but if you use a clipboard manager of some kind you may see a extra entries after running one of the extension's commands. I used this hack for two reasons: 1) I time boxed myself while trying to figure out how to do this and ran out of time and 2) I don't use a clipboard manager of any kind so I didn't mind this approach. If there's a proper way to do this without the clipboard hackery, please let me know.

Release Notes

1.0.5

  • Updating packages.

1.0.4

  • Made internal functions available as actions.
  • Fixed a bug where pressing esc on the delete confirmation menu would delete the file anyway.

1.0.3

Updating some dependencies due to Dependabot warnings.

1.0.2

  • Fixed bug where adding a node when a folder was selected resulted in the base path being the folder's parent.

1.0.1

  • Fixed list node so it works on Windows.

1.0.0

Initial release of the plugin.

About

VSCode Extension to mimic the menu from NERDTree.

sendhil.blog/2020/09/23/attempting-to-replicate-nerdtrees-menu-in-vscode/

Resources

Readme
MIT license
Activity

Stars

7 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.