Mac: Terminal wont let me write/edit a file - macos

I am trying to follow a tutorial on how to create an APP with Ruby on Rails but I am not able to edit a file from terminal!
When I am navigating on a file on terminal the cursor does not even blink. Like if I was on view only mode.
Can anyone help please! Thanks!

The cursor in Apple's Terminal.app does not blink by default. This can be configured in the preferences (under the "Text" tab of a profile, near the bottom of the window), and is a purely cosmetic setting. It has no effect whatsoever on whether a file being displayed is editable.

Related

Where is the windows terminal settings location?

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.

How can I use iterm as default terminal on macOS?

I want to make iTerm2 as my default terminal on macOS,
I open iTerm2 and hit to make iTerm default Term
But it's not working!
And I go to default terminal preferences
But after open it I see this
(Open iTerm Build version 3.3.7)
Menu: iTerm2 > Make iTerm2 Default Term
It sounds like you need to rebuild your macOS' LaunchServices.
To do this, download OnyX and choose the version based on your current macOS version.
The option that you need is in the red box, and I'd suggest that you UNCHECK anything that you don't need or don't know; otherwise, you might end up with deleting data that you might need:
After that, you can try again with the built-in Make iTerm2 Default Term option in iTerm2 (if this option is greyed out for you, click option + the iTerm menu button to re-enable it again).
There are ways to do this through the command line without downloading third-party apps, but I trust OnyX enough to hand it the job.
However, if you decide to do it from the command line, make sure you type the command that corresponds to your current macOS version. More on that here.
Hope this helps :)
Use this location instead:
/Applications/iTerm.app/Contents/MacOS/iTerm2
but note that it will not solve your issue completely. Termianal will start anyway, but this time, it will run iTerm2 - as you instructed it to do.
One thing you can do is find the file that opens a terminal (in my case it was metro opening in a React Native app). Find the file in your finder, right click on it, choose get info, then expand the Open With tab. There you should find a dropdown menu on what to open those kind of files with. The default is terminal, but choose iTerm2 and click on change all.
For example, in my situation I had to find launchPackager.command file under node_modules/react-native/scripts/. Do the above with that file and it will make iTerm your default terminal after clicking change all.
From where do you want to open the terminal? I was facing the same problem as you when I wanted to open the external terminal from Visual Studio Code.
I solved it by going to Code > Preferences > Settings. Look for terminal in the search bar and setting /Applications/iTerm.app in Terminal > External for your operating system.

How to activate multi-line command line in Firefox DevTools?

How to make the console of the Firefox DevTools multi-line?
I am aware of the Shift+Enter keyboard shortcut, which makes the command line go to the next line. Though like in Firebug, I want to vertically separate my console into command line and results part, but I can not find that functionality.
You can try the scratchpad. Go to Settings >> Available Toolbox Buttons and check the box for scratchpad. Refer the screenshot:
Once done, you'll have a notepad-like icon in your developer console navigation bar on the right side.... Click on it and it will open a scratch pad on which you can write code and execute...
Good Luck.
Firefox Developer version(v70) has multiline console which can be activated with ctrl+b (on linux at least, I havent found the shortcut in the offical docs). So this will soon show up in mainline FF i guess.
The command line the Firefox DevTools has a "smart multi-line" feature. That means it detects when a command is not finished and automatically inserts a line break, e.g. when you write document. and hit Enter. As you mentioned, you can also insert a line break manually by pressing Shift+Enter.
The DevTools also offer a completely separate command editor panel called Scratchpad, which you can enable via the settings (under the Default Developer Tools* section).
There is currently no multi-line editor as a side panel like Firebug's Command Editor, but it is already requested.
This is also described in the migration guide for Firebug users.

Enter Insert/Edit mode of CLion IDE

New to CLion, not sure if its just me, but everytime I type, the "Search for" bar appears in the Project directory left side bar. I am unable to type anything into the opened file. The caret does not even appear on the file. It's like when using Vim, but you're not in Insert mode. I have no idea how to go and start typing into the IDE. Any recommendations to how to use this thing?
It it because the focus in on the Project pane:
Just click once in the editor pane (where the file you want to edit is displayed). The caret will appear and you will be able to type.
I know it's painful, but just restart the IDE. That's what I did and it works now.

Can't find Edit of Terminal on Ubuntu

I just found that I can't find the Edit option of gnome-terminal when I launch it on my Ubuntu(unity) OS, and I had got access to the Edit on the top bar to change the fonts of terminal, but now when I move cursor to the top bar, there is nothing except a "Terminal" title.
What should I do to edit my terminal preferences?
I am sorry that I am not so familiar with Ubuntu so that I don't know what more information should I provide, if it's necessary, please notify me.
If you hover over any section of the terminal and right click then a list of options will appear. One of these options is profiles, hover over this and click preferences to bring up a number of options that you can configure to your liking.

Resources