Where is the windows terminal settings location? - windows-terminal

I edited the settings file and there must have been a typo and now the app crashes on startup.
Online the documentation says the settings lives in $env:LocalAppData\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json
I can't figure out what that path means since it doesn't exist on the computer.

I re-installed the app to fix the problem then made sure to see what the actual path is.
It's located in : C:\Users\{USERNAME}\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState

In the current version (1.7.1033.0), the application can open the JSON settings file for you via a button. Open the Settings tab, and the bottom left corner will have a button named "Open JSON file". Clicking that button will open a prompt asking with what application to open the file. That text editor can then tell you where the file is located.

If you open the terminal settings, it will open a text editor with the settings.json file. If your default editor is VS Code it will show you the path below the tabs on the top of the screen.
I'm unsure what other editors show you the path, but if it is crucial you can change your default text editor to Code.

There is still the option to open the JSON file through settings. In version 1.15.2875.0 you can still find the "Open JSON file" at the bottom left corner
Screenshot with highlights

This hint was given by a comment by user1340531:
Mine is at C:\Users\{username}\AppData\Local\Microsoft\Windows Terminal\settings.json
(or more generically: %userprofile%\AppData\Local\Microsoft\Windows Terminal\settings.json)
If it's not there, you should consider OP's answer or vyps comment which lets you find out one of these generic paths (they are equivalent):
%userprofile%\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState
%LocalAppData%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState
$env:LocalAppData\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState
If you don't know what these paths mean, I'd recommend playing around with "Windows Run" (Win+R) and the explorer address bar.

Related

VSCode on MacOS (Ventura) "open" folder finder dialogue does not show full path. Why not?

When I open a normal finder window on MacOS (Ventura), I have it set so that I can see the absolute path listed at the bottom of the window. This does NOT happen in VSCode. When clicking Open (or menu file/open) I am always wondering if I might be opening in a similar path.. but I don't know, because the dialogue does not tell me where I am! .. and I don't want to have to click on the folder window at the top! to find out!) How can I change VSCode finder behavior so it is the same as normal system finder?
I tried looking for settings in JSON file.. but can't find an option that covers this behavior. I don't understand why anyone would NOT want to see file path information. I ALWAYS want to know at a glance where I am in the file system! I want the full path! My expectation is that for such a sophisticated and elegant Code editor and environment, one should always be able to easily see the FULL absolute path you are in.
My regular finder shows the full path. Why is it missing in VSCode?
An Open panel is not the same as a Finder window. If you click the pop up menu in the top middle of the open panel, it will show the path to the folder being displayed.
If you hold option, the path will display at bottom like a popup.
check this or google mac os show file path

Changing the default path of Visual Studio Code's integrated terminal

I'm trying to change the default path of the integrated terminal in Visual Studio Code, but I'm not sure how to. I do know how to change it in the windows command prompt, but not in Visual Studio Code. I looked in user settings, but I can't find anything there to change.
The current default path is C:\Users\User_Name.
I'd like to change it to C:\Project.
How do I do this in Visual Studio Code?
Short answer
Edit the user preference "terminal.integrated.cwd": "" to the path that you want the integrated terminal to open to.
Long answer
The same answer, but the long step-by-step version,
In Visual Studio Code go to:
Menu File → Preferences → Settings
Now that you are in the "User Settings", using the "Search Settings" bar across the top of the window paste or type this:
terminal.integrated.cwd
It will list the following as a result:
// An explicit start path where the terminal will be launched, this is used
as the current working directory (cwd) for the shell process. This may be
particularly useful in workspace settings if the root directory is not a
convenient cwd.
"terminal.integrated.cwd": "",
You will notice that it will not let you type here to change this setting. That is because you can't change the default setting. You instead need to change your personal settings. Here's how...
Click the pencil icon to the left of the this option and then the "Copy to Settings" option that pops-up.
You should have a split screen in which the right side of the screen has the heading Place your settings here to overwrite the Default Settings. This is the correct place for you to make changes. You might already have a few personalized settings listed here.
When you clicked "Copy to Settings" it automatically added this line for you:
"terminal.integrated.cwd": ""
Notice that whichever item is last in this list will not have a trailing comma but any items before it in the list will require one.
FYI: you could have simply typed or copy/pasted this into the personalized settings yourself, but following these steps is the process to learn for changing other preferences as needed.
Now you are able to type to set the path you want to use. Make sure to use \\ in place of \ and you do not need the trailing \. For example including this line would always start your terminal in the baz directory:
{
"terminal.integrated.cwd": "C:\\Users\\foo\\bar\\baz"
}
To apply the change, simply Save and restart Visual Studio Code.
As others have already explained, you can add a setting to change the default folder for your integrated terminal to start in. This setting also accepts Visual Studio Code variables, so to make a relative path from the root folder of your workspace you can use ${workspaceFolder}.
For example, for your terminal to always start in the subfolder mystart, your setting would be:
"terminal.integrated.cwd": "${workspaceFolder}/mystart"
Thanks for the original answer from Peter. Definitely helped !
It has now slightly changed in more recent versions of VS Code.
Navigate to File -> Preferences -> Settings
Type cwd in search
Choose Terminal > Integrated: Cwd settings
Type the default path you want to set in the text block below (simply, no need for double hashes to escape)
No need for saving, It's automatic
Restart VS Code
terminal cwd screen
Try this option in the "Intergrated Terminal" section of Settings.
"terminal.integrated.cwd": "",
You can also set it to a relative path to the open folder with
"terminal.integrated.cwd": "./example"
So if you do menu File → Open Folder... → project, and open the terminal with your keyboard shortcut, it will open to ~/project/example automatically.
It can be a general folder like src you would always use, or a specific one (but then it would be best to save it in file .vscode/settings.json).
The below option will help you do this.
Menu File → Preferences → Settings.
Add or edit the below setting.
terminal.integrated.shell.windows": ""
From the next terminal it will be reflected.
And add file .profile to your default shell, and add the default path to it.
More information can be found
at Integrated Terminal.

How do i open a file via terminal with a specific editor?

How do i set a default application to open a file with my preferred text editor? I am currently trying open file.rb. It opens text wrangler, but I want to open with another. How do i do this?
Go to finder, right click on your file.rb file and select Get Info.
In the Info Window you'll see a section that says Open with, expand that section. There you can change the default application to open that particular file. There's also a button labeled Change All... This button allows you to use the specified application for all similar filetypes (*.rb).
You want to use the name of the editor you want to open with, i.e. gedit file.rb, or vim file.rb. You can probably also change your default editor associated with that file type, depending on your OS, etc.

Editor doesn't open in Xcode

i have a weird problem with Xcode. Here's a screenshot:
When i usually clicked on the file in the left column it'd open in source code editor on the right. Now it doesn't happen. Does anyone know how to get it back the way it was before? it drives me crazy
greetings
peter
What happens if you click on the Project, test, at the top, and then click in the columns on the right. Will it open the file in the editor?
Quit Xcode and relaunch it.
I see this is a little old now, but I had the same problem. The thing that I had to do was to open the "interface builder" program, wich is the editor for the file, then find and open the .xib file from that program. Next time I tried open it with Xcode it worked.
Drag a source file from the Groups and Files pane (usually on the left) over into the pane that says "No Editor". No need to reset the defaults.

Is it possible to launch an external image editor from Textmate?

Is it possible to launch an external image editor from the TextMate project drawer? I suppose the same concept would apply to launching any external editor from TextMate. Right now, if I right-click on the image file, I only have an option to open in Preview or Finder.
Thanks!
Yes. There is an (official) TM Bundle that does what you want--it's called "ImageBrowser." I installed recently and i have used it only once. It seems to work fine for the purpose you mentioned in your Question; in particular, it finds images in your current project and displays them in an image browser that runs inside TextMate.
You can get it from the Macromates SVN Repository.
TextMate respects the Finder's (well, LauchService's) "Open with" choice for each file. Whichever program would open when you double-click the file in Finder will appear in TextMate's contextual menu. Simply change this through the Finder's Get Info window for the file in question to the editor of your choice, and TextMate will respect it. It's dynamically populated, so you don't need to restart TextMate.
As far as I know, there's no method to specify a secondary program beyond the default.
I think no is the answer, but like Matt said, explore the usage of the Services menu.

Resources