Change:
VSCode Version: 1.9.0-insider OS Version: macOS 10.12.2 First of all, I love this editor, it's making me switch away from Sublime and vim. However, working on a very large code base (the Linux kernel), I have a workflow that is suboptimal. I heavily rely on the "find in files" feature, as the C/C++ intellisense can't go far enough to solve all the things I usually look for (think: nested macros and such), which is totally ok. So, this is my typical workflow: 1) CMD+Shift+F, enter the text to search and press enter 2) I get many matches, and usually I need to scan through the matching occurrences (in preview mode in an editor) in order to fully understand the one I need (the line shown in the side bar is usually not enough). In Sublime (or vim), I can quickly open an editor showing the matching occurrences using F4/Shift-F4. In Code, using the keyboard the two only options I can find are: In the search side bar, press "down" until I highlight a match, and then I can open the file pressing "enter". However, this makes me lose the focus in the side bar, so it becomes super inefficient if I want to switch to the next matching file.If, at the previous step, I press "space" instead of "enter", the file gets opened but I don't lose the focus, which is already much better, but less than ideal because to go to the next occurrence I still have to press first "down" twice and then "space" again, and the fact that it's not documented makes me a bit uncomfortable, as I heavily rely on this hotkey. It seems like having hotkeys to jump to the next occurrence while in the side bar is definitely a common case for relatively power users. It's literally an operation I do hundreds of times a day, so every bit of efficiency I can gain is huge (and it's standard in Sublime and of course customizable in vim). Thanks!
Thanks for the suggestion. I didn't know about F4 in Sublime. That would be easy for us to implement. How do you feel about this option? When you press "down" to focus a search result, that result is automatically shown in the editor. This is like what you're doing with "space" except that you can just keep pressing the down arrow to navigate results.
What you are proposing sounds ideal, I'll be eagerly waiting for it in the Insiders :) As food for thought for your team, I am leaving you another suggestion as to why a pure "F4" approach might still be better, although at this point we are just nitpicking: most of the times you need to press "down" twice (the first press highlights the file name containing the number of matches, whereas the second press actually highlights the first occurrence of that file), whereas the F4 function in Sublime (emulated in vim as well) directly jumps to the next occurrence, even across files, so that slightly more efficient where search occurrences are scattered around many files. That being said, thank you very much for considering my request, I highly appreciate your work, you guys are doing a killer product, I haven't been that excited about an editor in a long time :)
I totally get why pressing down over each file name is annoying - that solution also brings in some other complications which make me inclined to simply do the F4 solution. Thanks for your kind feedback :)
I've been looking for this in VS Code for a long time now - and tbh I assumed I just hadn't found the right name for the action! It is the one "pain point" for me usability wise - as it's the only point where I find myself reaching for the mouse to jump between results. Great to know you are considering this. This feature is available in the "full" Visual Studio, and as points out, it's available in sublime as well. The ability to do a search across files, and quickly get the cursor on each of them with a single F4 click would be amazing (and shift-F4 to go to previous of course!). It is just about the only time where I find myself having to reach for the mouse to do this. - thanks for pointing out how you operate at the moment - I hadn't even realised I could press down to jump between the results! Oh, and I also want to thank you and the team for the amazing work - and again, I've not been as excited about an editor in a long time either :)
Same issue as this:

Discussion:
* Returns a navigator which allows to discover the visible and * expanded elements in the tree. */ <del> getNavigator(): INavigator<any>; </del> <ins> getNavigator(fromElement?: any, subTreeOnly?: boolean): INavigator<any>; </ins> /** * Disposes the tree

return this.model.hasTrait(trait, element); } <del> getNavigator(): INavigator<any> { return new MappedNavigator(this.model.getNavigator(), i => i && i.getElement()); </del> <ins> getNavigator(fromElement?: any, subTreeOnly?: boolean): INavigator<any> { return new MappedNavigator(this.model.getNavigator(fromElement, subTreeOnly), i => i && i.getElement()); </ins> } public dispose(): void {

registry.registerWorkbenchAction(new SyncActionDescriptor(searchActions.FindInFilesAction, Constants.FindInFilesActionId, nls.localize('findInFiles', "Find in Files"), { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_F }, Constants.SearchInputBoxFocussedKey.toNegated()), 'Find in Files'); <ins> registry.registerWorkbenchAction(new SyncActionDescriptor(searchActions.FocusNextSearchResultAction, searchActions.FocusNextSearchResultAction.ID, searchActions.FocusNextSearchResultAction.LABEL, { primary: KeyCode.F4 }), ''); registry.registerWorkbenchAction(new SyncActionDescriptor(searchActions.FocusPreviousSearchResultAction, searchActions.FocusPreviousSearchResultAction.ID, searchActions.FocusPreviousSearchResultAction.LABEL, { primary: KeyMod.Shift | KeyCode.F4 }), ''); </ins> registry.registerWorkbenchAction(new SyncActionDescriptor(searchActions.ReplaceInFilesAction, searchActions.ReplaceInFilesAction.ID, searchActions.ReplaceInFilesAction.LABEL, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_H }), 'Replace in Files'); registry.registerWorkbenchAction(new SyncActionDescriptor(searchActions.CloseReplaceAction, Constants.CloseReplaceWidgetActionId, '', { primary: KeyCode.Escape }, ContextKeyExpr.and(Constants.SearchViewletVisibleKey, Constants.ReplaceInputBoxFocussedKey)), '');

} } <ins> export class FocusNextSearchResultAction extends Action { public static ID = 'search.action.focusNextSearchResult'; public static LABEL = nls.localize('FocusNextSearchResult.label', "Focus next search result"); constructor(id: string, label: string, @IViewletService private viewletService: IViewletService) { super(id, label); } public run(): TPromise<any> { return this.viewletService.openViewlet(Constants.VIEWLET_ID).then((searchViewlet: SearchViewlet) => { searchViewlet.selectNextResult(); }); } } export class FocusPreviousSearchResultAction extends Action { public static ID = 'search.action.focusPreviousSearchResult'; public static LABEL = nls.localize('FocusPreviousSearchResult.label', "Focus previous search result"); constructor(id: string, label: string, @IViewletService private viewletService: IViewletService) { super(id, label); } public run(): TPromise<any> { return this.viewletService.openViewlet(Constants.VIEWLET_ID).then((searchViewlet: SearchViewlet) => { searchViewlet.selectPreviousResult(); }); } } </ins> export abstract class AbstractSearchAndReplaceAction extends Action { /**

} let sideBySide = (originalEvent && (originalEvent.ctrlKey || originalEvent.metaKey)); <del> let focusEditor = (keyboard && (<KeyboardEvent>originalEvent).keyCode === KeyCode.Enter) || doubleClick; </del> <ins> let focusEditor = (keyboard && (<KeyboardEvent>originalEvent).keyCode === KeyCode.Enter) || doubleClick || event.payload.focusEditor; </ins> if (element instanceof Match) { let selectedMatch: Match = element;

} } <ins> public selectNextResult(): void { const eventPayload = { focusEditor: true }; const [selected]: FileMatchOrMatch[] = this.tree.getSelection(); const navigator = this.tree.getNavigator(selected, /*subTreeOnly=*/false); let next = navigator.next(); if (!next) { return; } // Expand and go past FileMatch nodes if (!(next instanceof Match)) { if (!this.tree.isExpanded(next)) { this.tree.expand(next); } // Select the FileMatch's first child next = navigator.next(); } // Reveal the newly selected element this.tree.setSelection([next], eventPayload); this.tree.reveal(next); } public selectPreviousResult(): void { const eventPayload = { focusEditor: true }; const [selected]: FileMatchOrMatch[] = this.tree.getSelection(); const navigator = this.tree.getNavigator(selected, /*subTreeOnly=*/false); let prev = navigator.previous(); if (!prev) { return; } // Expand and go past FileMatch nodes if (!(prev instanceof Match)) { prev = navigator.previous(); if (!(prev instanceof Match)) { // There is a second non-Match result, which must be a collapsed FileMatch. // Expand it then select its last child. navigator.next(); this.tree.expand(prev); prev = navigator.previous(); } } // Reveal the newly selected element this.tree.setSelection([prev], eventPayload); } </ins> public setVisible(visible: boolean): TPromise<void> { let promise: TPromise<void>; this.viewletVisible.set(visible);

export const FindInFilesActionId = 'workbench.action.findInFiles'; export const FocusActiveEditorActionId = 'search.action.focusActiveEditor'; export const ToggleCaseSensitiveActionId = 'toggleSearchCaseSensitive'; export const ToggleWholeWordActionId = 'toggleSearchWholeWord'; export const ToggleRegexActionId = 'toggleSearchRegex';