Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Navigating in VS Code Explorer

In VS code's Explorer side bar, how can I use ctrl+p and ctrl+n instead of up/down arrow keys for navigating among files?

like image 952
fhdhsni Avatar asked Mar 01 '26 15:03

fhdhsni


1 Answers

Add the following snippet to your keybindings.json (you can find it by Open Keyboard Shortcuts (JSON) command).

{
    "key": "ctrl+n",
    "command": "list.focusDown",
    "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !inputFocus"
},
{
    "key": "ctrl+p",
    "command": "list.focusUp",
    "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !inputFocus"
},
like image 190
fhdhsni Avatar answered Mar 03 '26 13:03

fhdhsni