iTerm2 click to open selected path - macos

➜ ~ brew remove proxifier
==> Uninstalling Cask proxifier
Error: It seems there is already an App at '/usr/local/Caskroom/proxifier/2.22/Proxifier.app'.
Here's a common log, which contains a path and iTerm2 recognizes it, we can quickly open that path by holding down the Command key and clicking on it.
But what I want to ask is if there is a way to quickly open a selected part of the path. For example, when I use the cursor to select /usr/local/Caskroom/proxifier, is there any built-in way to quickly open it in the Finder in iTerm. For example, open it by clicking on it with Option + Command. I know this can be done with Automator, but before do that I'd like to know if there is a built-in way to fix it.

Hold the command (⌘) key on your keyboard and click on a filename or a path, it tries to open it. This can be enabled or disabled in iTerm2 Preferences

Related

Mac Terminal Directory

I realize my directory at the top is spelled wrongly and now I can't do any cmd on my terminal. How do I go about to change it back or undo it?
screenshot
The path is wrong
You likely need to edit your ~/.bash_profile and fix what is wrong there.
This file might be invisible, so when you open Finder, press CMD+Shift+. to make these files appear. You can press that combination again to hide them, after you're done.
In their terminal app go to Terminal > Preferences. Under "Shells open with," select "Command (complete path)," then enter the path /usr/bin/bash.

Right click in finder - open folder in sublime?

I'd like to be able to right click a folder in finder then choose an option on that menu to open it directly in sublime, including its full contents tree. This saves me the repetitive task of opening a terminal, manually navigating to the correct directory, then typing subl .
I followed the instructions here (2012) but it doesn't seem to work for me on the current version of OS X.
I followed the method here:
https://gist.github.com/vincentmac/6703537
and it worked for me.
I had to include willcharlton's correction as well:
/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl -n "$#"
Also -n allows you to open it in a new sublime window, -a allows you to add to existing sublime window.

Emacs editor "locks" out terminal when being used

The issue I am having is when I open a file via emacs it will open another window in the emacs text editor, but lock out the terminal. What I mean by lock out is that the terminal seems to be linked to the window of emacs that had opened up. When I first downloaded the software I did not have this issue and was able to open multiple emacs windows at once but now I have to close out of the current emacs window to open another. Any suggestions on fixing this?
It sounds like you want to have the file pop up in a window when you open it, rather than fill the whole terminal.
If that's the case, you should
install a graphical version of Emacs from http://emacsformacosx.com/
put alias emacs=/Applications/Emacs.app/Contents/MacOS/Emacs in you ~/.bashrc
open files with emacs file.txt &. The file will open in a separate window and you can keep using your terminal

Read only for open directories in vim

Then I open vim from terminal and open an directory like vim ., my starts in Read Only Mode.
I cant figure out why this happen and how I can change it.
If I start MacVim everything is fine. But then I start vim from the terminal and open a directory this screen comes. I can navigate one dir up and back again, and I have write access.
EDIT
I installed all my vim settings on Ubuntu 15.04. Now I can use
Does anybody know how to change this behaviour of vim?
Now I can use netw with the command vim . like I always used.
As you can see, there is no RO (read only) mark. How can
I have this in Mac on iTerm too?
What you see is exactly what you are supposed to see when doing $ vim .: the built-in netrw plugin displays a listing of the current directory that you can use to navigate your project.
If you don't want that listing, don't ask for it:
$ vim
or:
$ vim file
ctrl-p is not mapped by netrw; on my system, its set up by the yankring plugin. If vim is doing something other than going up one line, then you have a plugin involved. Try using :map to see what its mapped to; then do a search for that in your plugins directory.
The netrw way of opening a file in the same window is to use the <enter> key, although the g:netrw_browse_split variable may be used to change that default behavior.
Netrw opens in read-only mode, and that's not going to change. The file being opened should not be in read-only mode, however, if that's what you meant. If you're having a problem of that sort, please update your netrw; the most up-to-date version is at http://www.drchip.org/astronaut/vim/index.html#NETRW .
After I installed macvim 7.4 Every thing works!

Delete gnome terminal configuration

I made a mistake in my gnome terminal configuration. I entered a command to start with in the preferences, but that command fails, and now all I get is a window that opens and closes right away, and I basically can't use gnome terminal anymore :-( Is there any way I can remove the configuration file and restart fresh??
Thanks!
Open the XTerm (Standard terminal for linux) and enter this command
gnome-terminal -e bash
It opens the gnome-terminal. Open profile preferences and configure your terminal to "Hold the terminal open".
Editing preferences
$HOME/.gconfd/saved_state
the above file might be of interest depending on exactly what configuration you changed. Of course, it holds configuration from other programs as well.
If you are on the newer gnome terminal that uses dconf, it's a little trickier, but still doable:
Profiles are stored with a UUID, you need to find the UUID of the profile to remove:
dconf dump /org/gnome/terminal/ | less
Search for a visible-name='...' entry matching the profile you want to remove. Look above that for the section header like [legacy/profiles:/:...]. The full name of the item you want to delete is thus /org/gnome/terminal/legacy/profiles:/:.... Delete it thus:
dconf reset -f /org/gnome/terminal/legacy/profiles:/:...
Side note: This Q&A probably should be moved to unix.stackexchange.com.

Resources