Iterm2 Preferences: Show bar with directory, date and git - terminal

Sorry for the super basic question, but on a different computer, I have iTerm 2 setup so that it shows a bar at the top with the directory, the date and time and git branch. I recently set up a new computer and cannot figure out how to do it or where on preferences I set that up!
Does anyone have any idea what setting this is?
Thank you!

Its just the status bar.
Go to Preferences -> Profiles -> Select required profile -> Session tab -> Check Status bar enabled checkbox -> Click Configure Status Bar and select 1. Current Directory 2. Clock 3. git state components.
You are all set.

Related

Making changes to UI permanent in iTerm (iTerm2)

I am new to the MacOS, and I have started using iTerm, and I want to make the changes to my UI permanent, but I am unable to do so.
When I "right-click" in the iTerm window and go to Edit Session... > Preferences>Text>Cursor>Vertical Bar, my current instance of iTerm does what I want it to.
However, when I shut it down and start another window some time later, it reverts back to its old settings. How do I make these settings permanent so I don't have to keep repeating the above process?
Also, I have switched from using zsh to using bash, however, I still see this when I open an instance of terminal:
The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
Isn't my default terminal now bash, not zsh?
Instead of right-clicking and entering "Edit Session...", you can make permanent changes from the navigation bar on the top of your screen once you open the iTerm.
iTerm2 > Preferences > Profiles > Text > Cursor > Vertical Bar.
When the above didn't work for me, I found (from iTerm2 menu bar):
Preferences > General > Preferences
Where I had set Save Changes to Manually. Right next to that setting is the Save Now button.

How to preserve iTerm folder location between sessions?

I'm using iTerm 2, and each time I exit and launch it again it doesn't save the folder location I was working on.
This is really annoying to have to retype each time the previous location I was working on, event more when there were multiple tabs opened...
Is there a way so that iTerm automatically save the folder path for each tab when I exit ?
iTerm 2.9.x (currently beta) and above support restoring sessions like the default Terminal.app in OS-X.
http://iterm2.com/downloads.html
https://gitlab.com/gnachman/iterm2/issues/3717#note_1733467
On macOS, make sure to uncheck "Close windows when quitting app" in the System Preferences/General tab (note this is in the System Preferences, not in the iTerm2 preferences).
Also set the following iTerm2 settings in the iTerm2 preferences:
General tab: select Use System Window Restoration Setting
General tab: uncheck Open profiles Window
General tab: uncheck Confirm closing multiple sessions
General tab: Confirm "Quit iTerm2 (⌘Q)" command
Advanced tab: Restore Window contents at startup = Yes

How to Open files and folders in same window in Sublime Text on macOS?

If I open ~/foo.txt then open ~/baz/bar.txt from Terminal, Sublime Text always opens 2 different windows. It's aggravating to have all these different windows open..
I've tried changing a bunch of ST's settings, but nothing seems to fix this.
Is there a way to have ALL files and folders just open up in the same window as if I were manually adding all these folders to the project?
In Sublime Text Menu:
Preferences -> Settings - User
Look for 'open_files_in_new_window'
And change 'true' with 'false'
Rather than editing the SublimeText default settings (as Jahnux73 suggested), you should go to Preferences -> Settings - User, and add the following:
"open_files_in_new_window": false,
The SublimeText default settings file should not be modified, as it may be overwritten by Sublime updates, and so that you'll always be able to restore the default settings. The way Sublime works is that at runtime, it reads and applies the default settings, and then reads and applies the Settings - User file. In the event of a conflict, the User settings take precedence. That way, you can add your own settings without modifying the default configs.
Folder can be directly dragged to sidebar, or from menu bar select
Project --> Add Folder to Project.
And better, since this has the same functionality as File -> Open folder which isn't mapped to a shortcut by default. You can make this a key mapping by going to
File -> Preferences -> Key bindings and append
{ "keys": ["ctrl+shift+o"], "command": "prompt_add_folder" },
then you can use CTRL+SHIFT+O to add a folder.
Drag files or directories to sublime window will add them to current window instead of opening new one.
All the answers above indicate the parameter files only, but this does not work for folders.
I found this solution:
You need to go to the registry path HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3\command
Change command add the parameter -a, get: C:\Program Files\Sublime Text\sublime_text.exe "%1" -a
Also, if You have a custom alias for the console, you can use it like this: subl . -a
For mac OS two changes are needed
1-
Preferences -> Settings - User
Look for 'open_files_in_new_window'
And change 'true' with 'false'
2-
In system Preferences find the Dock and then change its setting for the option “Prefer tabs when opening documents” and choose Always.
Then do :
subl folder_1
subl folder_2
subl folder_3
I explained in details here
All those replies above didn't work. Here I found the real solution to this problem: -
Click Preferences
> Settings - Distraction Free
Then add these lines in user panel:
"open_files_in_new_window": false,
And click Save.
Here you go!!
None of the answers above worked for me.
I had a Sublime app icon pinned to the Dock and every time I opened a new file through the Finder context menu (Open With > Sublime Text.app) it went to a newly opened instance of Sublime that's displayed in "recent apps" zone of the Dock. So I always had 2 icons in the Dock, each with different set of tabs.
I simply removed the first icon from the Dock, and pinned the one from "recent apps" area, and dragged it to the place where the first icon used to be.
This seems to work fine provided that you set "open_files_in_new_window" to "false" (Preferences > Settings), as suggested in other answers.

pl/sql developer IDE

I'm using AllRoundAutomatation's Pl/sql developer, and now i'm having quite interesting problem, All I want is to configure CTRL+UP key combination for scoll up!. but I can't manage it,
How Can I do This ?
Caution: tools > preferences > go to user interface section > key configuration
that one is not working, cause when I press UP or ctrl+up the "key configuration"'s table is getting scoll up it self
Tools -> Preferences -> user interface section -> key configuration -> scroll down to Editor : scroll up is where you would normally do it, however I see your problem, CTRL+UP is a control key in the preferences window that takes you back up to the top of that window.
If you go to the defaults.ini file on your pl/sql developer install ( probably in something like C:\Program Files\PLSQL Developer\Preferences\your username ), you can change the entry manually, I'd recommend setting the scroll up entry to someother value, then you will see an entry, you can then change it to 16422, which is the value on my install for CTRL+UP.
You can do this as follows:
tools > preferences > go to user interface section > key configuration
find item Editor: Scroll up select it and press CTRL+UP keys combination.
For your information, you may add the following entry to the configuration file to enable CTRL+DOWN to scroll down.
Editor: Scroll Down=16424

Xcode doesn't show recent projects in recent projects list

Every time I start Xcode it gives me a window where my recent projects supposedly should be. It would come in handy but unfortunately it's always empty.
Does it have anything to do with the location where I store my projects? I hope not.
Thanks for any help!
I would think it's because you could have your recent items set to 0 in System Preferences -> Appearance.
Update - If you are using Yosemite the correct path is System Preferences -> General -> Recent items (Thanks to #karim)
EDIT: Based on comments : Then Reboot
#Mellson answer is correct. But there is no menu in OS X Yosemite, System Preferences -> Appearance.
It should be, System Preferences -> General -> Recent items. Set e.g. 5 items.
or in command line,
defaults write com.apple.Xcode NSRecentDocumentsLimit 5
However, to my experience the first one works more correctly.
Restart your mac.
Earlier, I faced the same issue after I did Xcode 7.3 update. It showed me empty (Clear) Xcode File -> Open Recents menu.
You disabled the Welcome to Xcode screen. Press shift+command+1, and then reselect the checkbox as shown below. You can also start a new project from the File menu : New > Project… without the Welcome to Xcode screen.

Resources