File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
client/modules/IDE/components Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,7 @@ class Editor extends React.Component {
123123
124124 delete this . _cm . options . lint . options . errors ;
125125
126+ const replaceCommand = metaKey === 'Ctrl' ? `${ metaKey } -H` : `${ metaKey } -Option-F` ;
126127 this . _cm . setOption ( 'extraKeys' , {
127128 Tab : ( cm ) => {
128129 // might need to specify and indent more?
@@ -138,7 +139,7 @@ class Editor extends React.Component {
138139 [ `${ metaKey } -F` ] : 'findPersistent' ,
139140 [ `${ metaKey } -G` ] : 'findNext' ,
140141 [ `Shift-${ metaKey } -G` ] : 'findPrev' ,
141- [ ` ${ metaKey } -R` ] : 'replace' ,
142+ replaceCommand : 'replace' ,
142143 } ) ;
143144
144145 this . initializeDocuments ( this . props . files ) ;
Original file line number Diff line number Diff line change 11import React from 'react' ;
22import { useTranslation } from 'react-i18next' ;
3- import { metaKeyName , } from '../../../utils/metaKey' ;
3+ import { metaKeyName , metaKey } from '../../../utils/metaKey' ;
44
55function KeyboardShortcutModal ( ) {
66 const { t } = useTranslation ( ) ;
7+ const replaceCommand = metaKey === 'Ctrl' ? `${ metaKeyName } + H` : `${ metaKeyName } + ⌥ + F` ;
78 return (
89 < div className = "keyboard-shortcuts" >
910 < h3 className = "keyboard-shortcuts__title" > { t ( 'KeyboardShortcuts.CodeEditing.CodeEditing' ) } </ h3 >
@@ -35,7 +36,7 @@ function KeyboardShortcutModal() {
3536 </ li >
3637 < li className = "keyboard-shortcut-item" >
3738 < span className = "keyboard-shortcut__command" >
38- { metaKeyName } + R
39+ { replaceCommand }
3940 </ span >
4041 < span > { t ( 'KeyboardShortcuts.CodeEditing.ReplaceTextMatch' ) } </ span >
4142 </ li >
You can’t perform that action at this time.
0 commit comments