Using zsh, rvm, and iterm2 not reusing my current directory when opening new tab - rvm

I'm using rvm, zsh and iterm2 on development. When I'm going to the directory of my project using iterm2 and then open new tab why is it that my new tab always redirect me to the root directory? I change the preferences of my iterm2 to reuse previous tab directory.
iterm2 screenshot
I want to reuse my previous working directory when opening new tab.
Thanks

I just reinstalled my bash and zsh. First I followed this
http://vigodome.com/blog/2011/12/30/change-default-shell/
and reinstall zsh

Related

In JetBrains IDE new terminal opens in $HOME folder instead of project root

Happened on MacOS Monterey today, but it used to work correctly.
Just checked on Ubuntu machine: new terminal opens in Project root.
On my mac though, new terminal tab opens in /Users/<UserName> folder.
I think it might be connected to zsh settings, but not sure where to dig.
To be clear, here you can see my project settings:
Clearly should open the project root, but opens $HOME folder instead.
I'll be glad to hear any suggestions...
So, i initially was right - it's not a problem of IDE. It's somewhere in zsh settings.
I reinstalled zsh, oh-my-zsh, all the plugins, reinstalled volta (node.js version management) and then found out that the initial behaviour of opening project path was working again.
I guess, problem is solved...

Install and config nvm (Node Version Manager) on MacOS Monterey

I have had a lot of problems installing and configuring Node Version Manager on MacOS Monterrey because, although I have found a lot of information and guides to install and configure all this information, it is not easy for a Windows user like me. And I confess that I need more screenshots than text.
Do you guys have any easy solution?
I have a solution that works for me, to install and configure nvm in MacOS Monterrey, with several steps, I will try to be clear and concise:
Exists two ways to resolve this problem:
This way didn't work properly for me: Homebrew + Gist
At point 3 of Gist
Add following line to your profile. (.profile or .zshrc or .zprofile)
you can open with open ~/.zprofile or open ~/.zshrc
This way works for me: Gist
In the line
Create a .zshrc file in Macintosh HD -> Users -> {{your user folder}}
If you don't have it, create with touch ~/.zshrc
Next just open to edit with touch ~/.zshrc
I think problem for Windows users is understand the difference between .zprofile and .zshrc.
I hope that this summary will serve you, just to thank the collaborators of the articles that I have found

Xcode 8 Beta 4 - Comment Shortcut Disabled

I just updated to Xcode 8 Beta 4 and the shortcut cmd + / to comment a line is not working..
In the dropdown menu it's disabled:
There's a way to activate it again?
I fixed it following the steps here: https://twitter.com/kolpanic/status/763323546814844928
In Terminal: sudo /usr/libexec/xpccachectl
Reboot your system.
If Cmd-/ still doesn't work in Xcode 8 on an OS X 10.11 (and apparently on a macOS Sierra - thanks to #DanBlakemore), and sudo /usr/libexec/xpccachectl and a reboot didn't help, try the following.
Close Xcode.
Open /Applications in Finder, and rename Xcode.app to Xcode2.app (or any other name).
Rename it back to Xcode.app, and relaunch.
It should work now.
The problem seems to be that for whatever reason the system "uninstalls" Xcode extensions at some point, and won't "install" them again. This can be checked by opening Console, and grepping for INSTALL. If you have INSTALLED/UNINSTALLED for com.apple.dt.XcodeBuiltInExtensions, it won't work if UNINSTALLED was the last action on it, and will work it if was INSTALLED.
Figured this out when debugging an Xcode 8 extension.
The script mentioned above didn't work right away for me. I had Xcode 8 and 8.1 GM installed and was working with both of them off and on. I ran the script in the terminal, restarted my computer, opened Xcode and it still didn't work. So then I created a new directory in Applications and moved the GM into that directory. That seemed to fix it.
TL;DR
If you have multiple versions of Xcode installed:
Run in terminal: sudo /usr/libexec/xpccachectl
Restart your computer
Create a new directory in Applications
Move the other version into that directory
Restart Xcode and enjoy!
As explained there, here's a solution that doesn't require a reboot:
Close Xcode
In the Application folder, rename Xcode.app (or similar) to Xcode2.app. You might need to type in your password.
Open Xcode, then close it.
Rename Xcode2.app back to what it was before.
(Optional) Spend 5 minutes wondering why this worked.
Just update to Xcode8 release, then open Xcode8 and restart Mac.
https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html
To use the Editor's Comment/Uncomment Selection and Add Documentation commands—as well as other installed Xcode Extensions—on OS X version 10.11, launch Xcode and install additional system components, then restart your Mac. (26106213)
Go to App Store, check for system update(iTunes, MacOSX). Update all of them.
It should be fixed once its done.
I rebooted, now it is working.
Then when I started beta 4 it asked me to "install required components" a second time. Don't know if related or not.
I applied #junjie 's method
sudo /usr/libexec/xpccachectl
It works well on Xcode 8.2.1 (8C1002) only except for specific files.
Then, I found the reason.
/* Comment ...
//*/
This type of comment has made it inoperable.
After the line containing above comment type, "Comment Selection" didn't work.
Erase or change them.
xcode->preferences->key buildings-> filter, search comment
see if there are conflicts for key of "command + / ", if yes, delete others unless "Comment Selection"
enter image description here
This made it for me:
Goto System Preferences -> Keyboard -> Shortcuts -> App Shortcuts
Add a new shortcut like this:
Voila! It works for me!
As you can see the shortcut you choose will also end up besides this command in Editor menu in Xcode.
Before doing any of less or more complicated steps,
Try to quit and relaunch Xcode.
In my case, it has helped.
xcode->preferences->key buildings, or,
"command + ,", then search "comment selection"
change the key "command + /"

How to uninstall intellij idea on ubuntu 13.10

I searched much on Google for how to uninstall intellij idea on Ubuntu 13.10 64-bit OS but i didn't find any solution. please any help for this issue
After trying and searching more, I found that it's very easy and simple. All you have to do to delete the whole Intellij is:
There is a hidden file called .IdeaIC13 in the home directory, it
contains two files. Just delete the file.
Delete the installation directory for Intellij, which is usually
located at opt/ directory or where you installed it previously.
On a later version this may work:
$ snap remove intellij-idea-community
Delete the installation directory
Delete the "config" and "system" configuration directories. These contain IntelliJ IDEA's caches, configuration and plugins
See support page, “Directories used by the IDE to store settings, caches, plugins and logs”, for the OS specific locations of these two directories.
The "config" and "system" directories are probably in your Home folder, but they are hidden and you have to press CTR + H to show them.
I tried all the above solutions, but not worked.
I followed these steps to uninstall Intellij Idea Permanently.
$ cd snap/
rm -r intellij-idea-community/
cd ~/.local/share/ and $ ls
Remove the JetBrains folder (i.e. rm -r JetBrains/ )
It worked for me.
Hope this will help someone.!
sudo snap remove intellij-idea-community
https://www.jetbrains.com/help/idea/uninstall.html
You can follow their official documentation, they've mentioned the proper way to Uninstall IntelliJ IDEA depends on the method you used to install it.
Uninstall using the Toolbox App
Uninstall a standalone instance
Windows
macOS
Linux
Uninstall silently on Windows
Uninstall the snap package on Linux
IntelliJ IDEA Ultimate
Community Edition

Netbeans Cannot Find Cordova or Git on your path

I just install the latest netbeans 7.4 RC1 , i got the Error page "Netbeans Cannot Find Cordova or Git on your path, Please install Cordova or Git". In fact, i actually did install both cordova and Git.
I Do follow the step on this youtube ,
https://www.youtube.com/watch?v=Gt4uHSiO-00
but it is still not allow me to open any HTML 5 cordova project.
Is that any steps i left out ?
I had the exact same problem. I found this bug: https://netbeans.org/bugzilla/show_bug.cgi?id=234870
Go to the command prompt.
Try typing:
git --version
cordova --version
If you get a "command not found" error, you have an issue with your installation. More than likely you need the items added to your path variable.
In my case, that was
C:\Users\Chris\AppData\Local\GitHub\PortableGit_015aa71ef18c047ce8509ffb2f9e4bb0e3e73f13\bin;C:\Users\Chris\AppData\Roaming\npm
for both Cordova and Git.
I think the error message logic is broken, that's why this is misleading. In my case, git wasn't in the PATH, but cordova was. Making sure git was added to the PATH, fixed this.
Had the same exact problem, looking here https://netbeans.org/bugzilla/show_bug.cgi?id=234870 this answer solved my problem:
On Windows, NetBeans tries to run "cordova.cmd -v" to check if Cordova
is ready. So I modified this cordova.cmd file to simply return fake
version:
#echo 3.0.1
this allows me to get through the wizard step, where is being checked
if Cordova is installed. After that, I revert changes in cordova.cmd
and finished new project wizard. And it worked and I can even build
and start it on Android device. This "workaround" works until I close
IDE. So the problem is only at the beginning in checking if Cordova is
installed
On command line run
where cordova
to get where it is located (usually in C:\Users\\AppData\Roaming\npm)
You have to use cordova version 3.0.10 instead of 3.1
Netbeans does not seem to work with Cordova 3.1
type in
npm install -g cordova#3.0.10
and restart Netbeans.
Be sure to check if you have any enclosures in your environment variables. I made this mistake and it gave me a lot of headache :)
Not okay: "C:\Program Files\nodejs\";C:\Program Files (x86)\Git\bin
Okay: C:\Program Files\nodejs\;C:\Program Files (x86)\Git\bin
If you install Netbeans 8 on Ubuntu 14.04, you should type
sudo ln -s /usr/bin/nodejs /usr/bin/node
then follow http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface
I had the almost the same problem using NetBeans 8.1 on Windows 7. Except NetBeans said Cordova (only) cannot be found on my PATH but Cordova was installed and on the PATH. So like everyone suggested, I tested the versions.
C:\>git --version
git version 2.7.0.windows.2
C:\>cordova --version
? May Cordova anonymously report usage statistics to improve the tool over time? No
You have been opted out of telemetry. To change this, run: cordova telemetry on.
6.2.0
Strange, the --version asked for user input which I gave. I reopened Netbeans to find it can now magically see the install of cordova. Come to find out my whole problem was that Netbeans couldn't see it installed because Cordova was forcing user input the first time cordova --version was ran. Cordova had been freshly installed and never ran.
If anyone is using Netbeans 8.0, this is the tutorial you need to follow provided on the website of Netbeans: https://netbeans.org/kb/docs/webclient/cordova-gettingstarted.html
Happy coding with cordova...!!!
I solved this problem with installing GIT from this link :
http://git-scm.com/book/en/Getting-Started-First-Time-Git-Setup
hope this help someone.
I had the same problem. I found the one solution on another site.
Try this: re-install git and choose the option *Use Git and optional Unix tools from the windows Command Prompt.
Just follow the installation process as describe in phonegap(cordova) documentation but make sure when you are installing git you checked the option use git and optional Unix tools from the windows command prompt after that go to path variable check that C:\Program Files\nodejs\;C:\Program Files
(x86)\Git\bin exists in your path environment variable as shrty has said.
You can test if node.js is install by node --version and git by git --version
Get the path where npm install -g cordova installed your
cordova. It produces something like "} (current: {"node":"0.10.36","npm":"1.4.28"})
C:\Users\kanu\AppData\Roaming\npm\cordova ->: if you go in
C:\Users\kanu\AppData\Roaming\npm\ directory you'll find cordova.exe there
What you have to do is to add ;C:\Users\magezi\AppData\Roaming\npm\ in environment after the git's one.
After that change the directory to where cordova.exe exists for me it was in C:\Users\kanu\AppData\Roaming\npm\ and from there you can test the installation of cordova by the command cordova --version(it will return the version)
open netbeans and try to create an cordova application. It should work
I had the same issue under linux, and was tinkering around with the user specific $PATH. What solved it eventually was to set the $PATH variable in the netbeans.conf located at $NETBEANS_PATH/etc/netbeans.conf
I added these three lines
export ANDROID_HOME=/home/paul/Android/Sdk
PATH="$PATH:/home/paul/opt/node-v4.4.7-linux-x64/bin/:/home/paul/Android/Sdk/tools"
export PATH
Afterwards I was finally able to setup any Cordova project :)