@@ -124,8 +124,10 @@ function define_default_editors()
124124 ` $cmd $path `
125125 end
126126 # vim family
127- for (editors, wait) in [[Any[" vim" , " vi" , " nvim" , " mvim" ], true ],
128- [Any[" \b gvim" ], false ]]
127+ for (editors, wait) in [
128+ [[" vim" , " vi" , " nvim" , " mvim" ], true ],
129+ [[r" \b gvim" ], false ],
130+ ]
129131 define_editor (editors; wait) do cmd, path, line, column
130132 cmd = line == 0 ? ` $cmd $path ` :
131133 column == 0 ? ` $cmd +$line $path ` :
@@ -135,27 +137,31 @@ function define_default_editors()
135137 define_editor (" nano" ; wait= true ) do cmd, path, line, column
136138 cmd = ` $cmd +$line ,$column $path `
137139 end
138- # emacs (must check that emacs not running in -t/-nw before regex match for general emacs)
139- for (editors, wait) in [[Any[r" \b emacs" ], false ],
140- [Any[r" \b emacs\b .*\s (-nw|--no-window-system)\b " , r" \b emacsclient\b .\s *-(-?nw|t|-?tty)\b " ], true ]]
140+ # emacs (must check that emacs not running in -t/-nw
141+ # before regex match for general emacs)
142+ for (editors, wait) in [
143+ [[r" \b emacs" ], false ],
144+ [[r" \b emacs\b .*\s (-nw|--no-window-system)\b " ,
145+ r" \b emacsclient\b .\s *-(-?nw|t|-?tty)\b " ], true ],
146+ ]
141147 define_editor (editors; wait) do cmd, path, line, column
142148 ` $cmd +$line :$column $path `
143149 end
144150 end
145- # Other editors
151+ # other editors
146152 define_editor (" gedit" ) do cmd, path, line, column
147153 ` $cmd +$line :$column $path `
148154 end
149- define_editor (Any [" micro" , " kak" ]; wait= true ) do cmd, path, line, column
155+ define_editor ([" micro" , " kak" ]; wait= true ) do cmd, path, line, column
150156 ` $cmd +$line $path `
151157 end
152- define_editor (Any [" hx" , " helix" ]; wait= true ) do cmd, path, line, column
158+ define_editor ([" hx" , " helix" ]; wait= true ) do cmd, path, line, column
153159 ` $cmd $path :$line :$column `
154160 end
155161 define_editor ([" textmate" , " mate" , " kate" ]) do cmd, path, line, column
156162 ` $cmd $path -l $line `
157163 end
158- define_editor (Any [r" \b subl" , r" \b atom" , " pycharm" , " bbedit" ]) do cmd, path, line, column
164+ define_editor ([r" \b subl" , r" \b atom" , " pycharm" , " bbedit" ]) do cmd, path, line, column
159165 ` $cmd $path :$line `
160166 end
161167 define_editor ([" code" , " code-insiders" ]) do cmd, path, line, column
0 commit comments