Most file explorers support the 'alt-up' keyboard shortcut, to navigate up a directory.
This is a vsCode extension to implement this, in an intuitive way.
- looks for a parent
'../index'
file with the same extension - if not found, looks for files in root with same extension
- (does not go above workspace root)
- looks for files in child directories
- looks for
index
files with the same extension - if there are choices, creates a dropdown to choose
- looks for sibling files before current one
- looks for sibling files before after one
The extension was build with this mental-model for navigation,
but because the vscode looks like this,
it may make sense to 'rotate' your keybindings 90deg:
[
{
"key": "ctrl+left",
"command": "extension.alt-up"
},
{
"key": "ctrl+right",
"command": "extension.alt-down"
},
{
"key": "ctrl+up",
"command": "extension.alt-file-left"
},
{
"key": "ctrl+right",
"command": "extension.alt-file-right"
}
]
MIT