My NERDTree opening two panes when I toggle it open - bash

I've installed and uninstalled NERDTree in my .vimrc using vim-plugged. For some reason on my PopOS terminal when I open it, it shows two panes instead of one. I have this installed on different machines the same way without two panes opening. Any idea why?

I had a script in my .vimrc that was checking if it was open and if not, open it. Apparently, it wasn’t detecting it being open.

Related

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 do you add the cmd+backspace functionality on VSCode's Integrated Terminal to the Mac's

I've been dying to get this working on the default terminal on the mac, this feature is really useful when you write something wrong, and can just cmd + backspace to delete all the lines.
I googled online several times but I couldn't find anything related to this.
Well, the functionality is already there: ⌃+U will delete everything left to your cursor to the beginning of the line. You cannot, however, change this keyboard shortcut.
You can change application-specific keybindings by installing additional tools like, for example, Karabiner.
Alternatively, you can install iTerm2 as a Terminal replacement. That will allow you to enable this - and many other text editing keybindings - with one click in the settings.

is it possibile to open iTerm in current Finder position

Sometimes it could be very useful to open new iTerm window. I've seen this feature in Gnome window manager. It is possible to get same feature on MaxOsX? Is there a software to do that?
Go to System Preferences -> Keyboard -> Shortcuts -> Services -> Files and Folders and give preferred shortcuts.
The shortcut will open iTerm at the selected folder, instead of from the folder that has been opened.
You can right-click on the folder where you want iTerm2 to open, then select Services -> New iTerm2 Tab here.
You can also find other options in the Services menu to open iTerm2 and Terminal.
This was tested on iTerm2 3.x and Catalina and above.
There are two apps called "Go2Shell" and "ShellHere". Both place a small icon at the top of the finder window. When the icon is clicked a terminal window opens in the same directory as the finder window.
Go2Shell
Go2Shell can be downloaded from Mac App Store or developer's website. It is possible that you won't be able to install it from Mac App Store, because Go2Shell wasn't updated for a long time.
Go2Shell allows users to specify whether to open shell in Terminal or iTerm2.
ShellHere
Shellhere can be downloaded from here.
ShellHere allows users to open a folder only in uses only MacOS Terminal.
Problem with current solutions: Doesn't work in current folder. Only if you right click a folder.
So do this:
In Finder, press ⌥ + ⌘ + P to show the path bar.
Then, right click your folder and choose the option. Voila!
Try https://github.com/wonderyue/Go2ShellAppleScript.
Something like Go2Shell. The latest update of Go2Shell is five years ago, due to the compatibility problem, I make a similar one with AppleScript.
If you want to open iTerm in current Finder position try the following:
OpenInTerminal
https://github.com/Ji4n1ng/OpenInTerminal
Alternative and a bit older
TermHere
https://hashbang.productions/apps/termhere/ (last updated on 2016)
Both work without issues in MacOS Catalina
cdto doesn't support opening the folder in iTerm, so its a no go
If you have BetterTouchTool, you can just create a Finder trigger with action "Open Active/Selected Folder With Specific App" and select "iTerm". Works for me!
BetterTouchTool screenshot
EDIT:
You can even add Hotkey Window hotkey before "Open Active/Selected Folder With Specific App" to open the terminal in the hotkey window (as a tab). Really neat.
In hotkey window
I've been using cdto forever before accidentally stumbling on to the accepted answer. Will definitely try out the accepted answer, but leaving a link to cdto here if someone finds in useful
https://github.com/jbtule/cdto

Sublime only opens in Sublimerge view

I have the plugin Sublimerge installed in Sublime Text 3. In order to compare two files Sublimerge opens a new window (but without any menu). That is fine since the original Sublime window is still there.
Unfortunately the diff-window was the last one I closed and when I restart Sublime it opens the diff-view without menu.
Question is: How can I restore the default Sublime view?
To make my problem visible, this is what it looks like now:
Edit: Sublime is running on Linux Mint and is set to a German keyboard.
I had the same issue and in my case pressing ctrl+alt+p and selecting last project solved it.
If you are referring to the sidebar, you press super+k,super+b to toggle it on/off.
To close the sublimerge diff window, just press super+w.
edit after reading your comment/image:
To go back to a single pane view, press super+ctrl+1.
Ultimately, you can access the FileDiffs menu via the command palette (ctrl+shift+p) and type in menu.

VIM with Tree on OS X

I want to do text editing on a Mac and what I'd like to have is:
VIM editor built in
a tree view to open and switch between files more quickly
Should I go with vim and a tree plugin? Or is there a good text editing program with VIM built-in?
What are your experiences with that combination? Do you have any other recommendation?
Use NERDTree with macvim.
Have you tried gvim for mac http://macvim.org/OSX/index.php
I don't have a mac but do use gvim on various windows and linux installs.
Use VIM explorer
Vim has file explorer with standard installation, to open it on the left side, first open file with vim and do:
:vs
This will split the window in half with the same file, then:
:E
or
:Explore
there is help at the top and standard vim navigation works to open file or directory just hit Enter. To enable tree like view in there you will need this to be added to your ~/.vimrc:
g:netrw_liststyle=3
I never tried the above solutions but benefit of this is that you can get it working in couple of minutes with out of the box vim.
Bonus Feature
If you open directory with vim just hit i to change the modes.

Resources