Like in vim nerd tree plugin, when you push 'm' then 'a' button in vim nerd tree you can add file in current directory where cursor on Nerd tree. Is it possible do it in vs code? Maybe some plugins?
Explorer. The Explorer is used to browse, open, and manage all of the files and folders in your project. VS Code is file and folder based - you can get started immediately by opening a file or folder in VS Code. After opening a folder in VS Code, the contents of the folder are shown in the Explorer.
Unfortunately there is no such plugin yet but you could define some customized keybindings which resembles NERDTree to some extent ( File > Preferences > Keyboard Shortcuts
and click on the link keybindings.json
):
[
{
"key": "f",
"command": "explorer.newFile",
"when": "explorerViewletFocus && !inputFocus"
},
{
"key": "d",
"command": "explorer.newFolder",
"when": "explorerViewletFocus && !inputFocus"
},
{
"key": "x",
"command": "deleteFile",
"when": "explorerViewletFocus && !inputFocus"
},
{
"key": "r",
"command": "renameFile",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
},
{
"key": "enter",
"command": "list.select",
"when": "listFocus && !inputFocus"
},
{
"key": "o",
"command": "list.select",
"when": "listFocus && !inputFocus"
}
]
You could change the key
s freely and commands are self explanatory. i. e: hitting f
in explorer will add a file in selected directory and ... ).
Fortunately we also have j
and k
movements in explorer via vscodevim plugin.
The only missing part is searching the tree; and of course there is a promise to be added by January 2019 ( see issue #10026 )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With