GitBash integration in Sublime Text Editor - sublimetext3

Is it possible?
I have insalled Terminal package for Sublime and insertred
"terminal": "C:\Program Files\Git\git-bash.exe"
in Terminal.sublime-settings configuration file.
Now I can open gitbash with Ctrl+Shift+T from inside Sublime Text Editor, but it's looks like no way to open current or project folder, like when using cmd.exe. I whant to find normal integrated terminal like in the webstorm or in VSCode and wondering why it's still nothing like that in Sublime. Glue and so on is no way.

Related

How can I open a file on the desktop with my program?

I want to open a file with my program, but I don't know how.
Here's what I mean:
I searched on internet and I found nothing (only the "Open with" method and that's not what I want).
Is it possible to make something like that?
This is done through the "Windows Registry":
Create a new .reg file with the following content:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\Python Script\command]
#="py -3 my_script.py %1"
Replace my_script.py with the full path to your python script.
%1 will be replaced with the path of the file you have clicked.
Then run the script and it should add your program to the context menu.

Yank command is not working in vim editor

I want to copy code from vi editor to clipboard so that I can paste it in the browser. I know the command gg"*yG and it's working when I open the code like vim code.py, but when I open like vi code.py, it doesn't work.
But normally when I type vi, it opens vim. I thought vi and vim are same command now, both referring to improved version of vi editor. Then why is this happening.
Summarizing from your comments, it seems like you have installed two versions of vim; one probably via your OS's installation procedures and one via homebrew.
vi is symlinked to the default installation, which was compiled without +clipboard, while vim would execute the binary from homebrew (because that's how your $PATH is configured), which with compiled with clipboard support.

Rails 5.2 Can't open rails credentials with Sublime Text

I am using Windows Subsystem for Linux with Rails 5.2 and Sublime Text 3.
When i do
EDITOR="subl --wait" rails credentials:edit
It says "New credentials encrypted and saved." but does not open the file to be edited with Sublime Text 3.
Also when trying Visual Studio Code with
EDITOR="code --wait" rails credentials:edit
Visual Studio Code opens but it is empty.
I can only edit the file with VIM and the command
EDITOR="vim" rails credentials:edit
The thing is i do not want to edit the file with vim.
What is the problem so it does not open the file to be edited with Sublime or VS Code?
I am using Rails 5.2
Thanks a lot in advance
On macOS, you would run this command to edit the credentials in Sublime. When you are done, save and close the file in Sublime:
EDITOR="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl -w" bin/rails credentials:edit
I am on windows 7x64 and stumbled upon this issue this morning.Solved it by adding atom to my system variable Path(so cmd & powershell & bash all know about it) and by adding powershell to my environment.I use separate environment for ruby & rails.
So now when I type set EDITOR=atom --wait && rails credentials:edit in cmd or
1st $env:EDITOR="atom --wait", 2nd rails credentials:editin powershell or
EDITOR="atom --wait" rails credentials:edit in bash,
I get the desired result wich is to open credentials and edit them :).. Hope this helps
PS. I didn't need to use --wait flag when setting the editor to subl or notepad!
EDITOR is just a temporary variable for the current session, meaning for the cmd,powershell or bash window that is opened at the moment!
By default Sublime Text Editor is not configured to be run directly from the command line. You're trying to set the EDITOR variable to "subl --wait", but the command line doesn't know what "subl" is! Try this post which goes into detail on setting up a "subl" alias for starting up sublime on the command line, then try again!
Open Sublime Text from Terminal in macOS
EDIT: Noticed you are on Ubuntu and not MacOS, but that post should still work as long as you're using bash, which is the default shell on Ubuntu.
I have succeeded my following this
SET EDITOR="full_path to sublime"
rails credentials:edit
after closing sublime only i am getting new credentials saved response.
Hope it helps

Smalltalk syntax highlighting in Sublime?

I'm trying to get sublime to highlight smalltalk .st files but am running into some trouble.
A quick search found this package, but after adding the repository like it says in the README, I don't see the package that its supposed to add when doing Package Control: install package.
I also tried looking into this one but am completely lost when it says This syntax file can be converted to .tmLanguage using PackageDev 'Convert to PList'. Place the converted file in Packages/Smalltalk/Smalltalk.tmLanguage and reopen any .st file.
Can anybody help me out please? I'm running ST3 on MacOSX.
The installtion instructions using Package Control did not work for me either, but you can take the language file, Smalltalk.tmLanguage, from Smalltalk syntax for Sublime Text 3 and use the manual installation instructions you cited:
Place the file in Packages/Smalltalk/Smalltalk.tmLanguage
As you asked about macOS, on macOS this means:
/Users/<your user name>/Library/Application Support/Sublime Text 3/Packages/Smalltalk/Smalltalk.tmLanguage
The Library folder might be hidden by default. Use the Terminal or Finder's Go ▶︎ Go To Folder… to access it.
For Smalltalk/X you can download a highlighting package at - sublime highlighting for smalltalk/X called Smalltalk.sublime-package.
You can copy it to the path provided by #MartinW above.

How to get a node or cmd terminal in sublime?

Is there a way to run npm commands from Sublime?
For instance, if I wanted to run npm install angular-ui-grid on the current folder in Sublime, how would I do that?
I've looked at posts that say I can build with Node in Sublime, but I don't think that means I can run npm install as if I was in a terminal.
I know you can run a Python terminal from Sublime with Ctrl+`, and you can open a command window at the current location, but is there any way to combine the two?
NOTE: Looking for a Windows cmd or powershell terminal.
I guess, you are looking for TerminalView
This is a Linux/macOS plugin for Sublime Text 3 that allows for terminals inside editor views. The plugin uses a pseudo-terminal to start the underlying shell which means it supports
Interactive applications
Auto-completion
Terminal shortcuts (ctrl+c, etc.)
Password prompt etc.
You can get this package here,
https://packagecontrol.io/packages/TerminalView
Hope this helps!

Resources