Sublime text 3 with Git-Bash - sublimetext3

I was wondering how you can open Sublime text 3 with Git-Bash I keep getting errors saying that bash: subl: command not found does anyone know how to get the file to open up??

You need to add the folder containing subl.exe to your PATH. Here's how to do that in Windows 10:
Open the Windows menu and click on Settings.
In the search box, type in path. Choose the following from the dropdown: Edit environment variables for your account. This window should open:
In the top pane, click on Path, then click the Edit… button. A new window will open up.
Click the New button, then (carefully) type in C:\Program Files\Sublime Text 3. This is assuming you used the installer and didn't choose a custom location for a portable install. If you do have a portable install, use the Browse… button and select the installation folder that way.
Hit OK to close the window, then OK again to close the other one. Finally, close out of Settings.
Completely close out of and restart Git Bash. subl should now be available on the command line.

Related

Terminal doesn't open window on top Mac - Atom

I am currently using Atom to code in Python3 on my Mac and I have a package installed ("atom-python-run") which launches a terminal window with the command "python3 {path}" with 'path' being the current working directory with filename.py included. It opens just fine and runs perfectly, but the window doesn't open on top of my atom window but behind it instead. I have to click it every time to see the terminal window and it's really frustrating. I also hate using CMD+Tab to find it as well.
This is a bug in the package I'm using (I think) and I don't want to wait for them to fix it. Are there any methods in OS X to ALWAYS open Terminal on top of every other window? Or a third-party application? I can't find a solution to this problem anywhere online.
If you install the scripts package and use it, the output will be written to a window in the Atom application and will be shown at completion. Go to the Atom package page and search for the word script. You should get a hit on the "script" package. Install this package by just clicking on the install button and then open Atom and the python script you wish to run. Now in Atom go to the packages menu item and from that menu select "script". You'll be given several options, choose "run script" and your script should run showing the output in a window at the bottom of the Atom window.

How to open command prompt in Atom editor?

How can I run command prompt in Atom Editor? Do I need to install any package for the same? I could not find any videos or links regarding this issue.
Go to File -> Settings -> Install
Search for package -> platformio-ide-terminal
After installation of this package
Go to Packages tab in a menu bar where you can see all the packages installed
click on platformio-ide-terminal -> New Terminal [Now you will get the terminal window]
There are 2 packages that I use to open a terminal window in Atom. They are 'platformio-ide-terminal' and Termination. Load either one of these and the name will appear under the package menu. Selecting either one will allow you to open a terminal window in bottom third of Atom window.

Opening Microsoft Visual Studio Code from command prompt Windows

Is there a way to launch Microsoft Visual Studio Code from the command line in windows? I can't even seem to find the directory for code on my computer. It didn't even ask me where to download it.
Navigate to the directory that you want to open and type code . to launch VS Code.
As many folks already suggested ways to open code from command prompt using code . command. This will only open Visual Studio Code Stable build. But If you have downloaded Visual Studio Code Insider build/version (Which has all latest build/features but unstable version) then you need to follow below instructions in windows :
Go to Control Panel\System and Security\System. Click on Advanced System Settings
Click on Environment Variables
Under System Variables tab, Click on Edit for Path Variable
Add a new path C:\Users\tsabu\AppData\Local\Programs\Microsoft VS Code Insiders\bin
(or)
C:\Program Files\Microsoft VS Code Insiders\bin based on location at which you have installed vscode insider in your machine.
Open a new command prompt and type code-insiders . to open vscode-insider
build/version
Short answer:
code your_path your_filename
Long answer:
Here your_path can simply be . if you want to use the current directory as your working path. Or .. for 1 level up, etc.
code is the name of the executable of Visual Studio Code (code.exe). If it doesn't launch, perhaps your VSC path hasn't been added to the path environment variable. Run this command to add it:
set PATH=";C:\Program Files\Microsoft VS Code\bin"
Of course you'll need to specify a different path if your VSC is installed somewhere else.
How can you find out the installation path? (click for screenshot) Go to "Start" menu, type in "Visual Studio Code", right click on the found program, "Properties", check "Target". Now you'll see!
It may come already added to your path when installed. Try using code <filename> in your command line. If it's not you can add the command line script's directory to your path. The command line script's directory is downloaded by default in the following location
C:\Users\<username>\AppData\Local\Code\bin
Point your command prompt to the specific folder that has the file that you want to open. Let's say you want to open the file titled main.scss. Simply run this command:
start code main.scss
If Visual Studio Code is already open, you can simply do:
code main.scss

Can't open cygwin terminal after installation

I just installed cygwin in my windows7 pc. After installation when i click on 'Cygwin Terminal' from start menu it shows a message like this - message title: Missing Shortcut "Windows is searching for mintty. To locate the file yourself, click Browse" with two buttons below "Browse" and "Cancel".
Then if I select mintty.exe manually from "C:\cygwin\bin" by clicking Browse button it doesn't load anything. How can I be get rid of this?
Open the Cygwin Terminal properties (by right click on the icon and go to properties) check the path of 'mintty'. If everything looks right and it is still giving error, change the 'mintty' to 'mintty.exe'. This solved my problem.
For Installing Cygwin follow the steps given here-
-Link is now dead-
http://www.news.amigowork.com/how-to-install-unix-in-windows/
if problem is still there
then
go to installation directory and open Cygwin.bat
or
go to bin folder of installation directory and open mintty.exe.
it will solve your problem.
Open the Cygwin Terminal properties (by right click on the icon and go to properties) check the path of 'mintty'. If it is not as per your minty(you will get it inside bin folder) location change it.
I had installed cygwin in e drive. But the path (in property, by right click on icon )showed c drive. When i changed it to e, the problem went away. It was on Windows 7 and cygwin installation was latest on 4th Jan 2018.

Add Sublime Text 2 to the right click context menu in Ubuntu 12.04

Title pretty much sums my question. I want to open a folder in sublime text by right clicking the folder and clicking on "open folder in sublime text" context menu. I am using Ubuntu 12.04
Assuming you followed guide on:
http://www.technoreply.com/how-to-install-sublime-text-2-on-ubuntu-12-04-unity/
You simply need to add a %f to your Exec line in sublime.desktop like:
Exec=sublime %f
This is what I have managed to get Right click context menu for Sublime Text 3:
Using Nautilus-Actions Configuration Tool, either installed through Ubuntu software center with this link or through ubuntuupdates.org
This will allow you to create right click context menus and actions to your liking.
I have created such an extension:
Nautilus-Actions_XML_Schema
OR
Nautilus-Actions_Schema
For further information check out: blog.ndroidians.com
Right click -> open with other application -> show all applications -> open with sublime text
This guide worked form me on Ubuntu and Mint. http://www.technoreply.com/how-to-install-sublime-text-2-on-ubuntu-12-04-unity/
Make sure that you have copied the sublime .desktop file into the /usr/share/applications/ directory. That should work resolve this issue.
To open a folder in sublime from nemo by right clicking in the pane for that directory, go into the folder "usr/share/nemo/actions" as sudo and create the file "subl.nemo_action" and put the following contents into it:
[Nemo Action]
Name=Open folder in Sublime Text
Comment=Open current folder in Sublime Text
Icon-Name=subl
Selection=any
Extensions=any
EscapeSpaces=true
Exec=/bin/sh -c "cd %P && subl ."
Dependencies=subl;
I found this solution HERE, but had to change "subl3" to "subl" for my case, and had to find where to locate the file.

Resources