Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I click on a filename and line number in iterm2 to open that file in Visual Studio Code at the correct line number in OS X

When Iterm2 shows a file name and line number in Mac OS X, can I ⌘-click on the file and have it open in an already open window in Visual Studio Code and position the cursor at the correct line number.

Hold down ⌘ and hover to see the file and line number you are about to click

(Asking this question to document the solution)

like image 207
danmux Avatar asked Aug 11 '16 22:08

danmux


People also ask

How do I open iTerm2 files?

One of the lesser known features in iTerm2 is that when you hold the command (⌘) key on your keyboard and click on a filename or a path, it tries to open it.

How do you use item 2?

The primary use of the mouse in iTerm2 is to select text, and (by default) text is copied to the clipboard immediately upon being selected. You can click and drag to perform a normal selection. Double-clicking selects a whole word. Triple-clicking selects an entire line.


1 Answers

It looks like you can just select "Open with editor..." in advanced settings > semantic history now

iTerm 2 preferences pane

like image 150
csilk Avatar answered Sep 26 '22 14:09

csilk