How do I remove a completion in Sublime Text 2 - sublimetext2

How do I remove a completion from Sublime Text 2?
Specifically, in a Ruby file, after the num symbol #, hitting tab autocompletes to # =>.
I don't need this completion, and it's really annoying when trying to write comments. How do I remove it?

It's a snippet installed by default with the Ruby package.
In order to disable it:
Open Sublime Text 2.
Select Preferences -> Browse Packages...
It will open a directory, open the directory Ruby
Rename the file Add-'#-=-'-Marker.sublime-snippet in Add-'#-=-'-Marker.sublime-snippet.old

Assuming that you run SublimeText2 on Mac go to Preferences > Browse Packages. In the folder Packages find the Folder Ruby. In Ruby find the file Add-'#-=-'-Marker.sublime-snippet and manipulate it.
But I strongly recommend to put the changes in a user file. I think this is Preferences > Settings - More > Syntax Specific - User
See: http://www.sublimetext.com/docs/2/settings.html

Related

Cannot start editting my Html file in Visual Studio Code

I create a file with html extension with visual studio code. I can create the file but I cannot edit it. Can you help me solve this issue
Try running Visual Studio Code as an administrator if you are using Windows.
Right Click Visual Studio Code > Run as Administrator, follow the instructions from then on.
You can also edit file permissions entering here:
Right Click File > Properties > Security tab
This should lead you to an User Selection screen, select your user and click Edit, see if the checkmarks for Write and Read are activated, activate them otherwise, click OK and restart Visual Studio Code, try to access the file then.
If you are using Linux, try changing the read and write permissions so that you can make modifications to the file. This is done through chmod. Use Bash (or the terminal emulator you are given for doing this).
Example:
chmod +rw <file_here>
That should be enough.
More description would be better...Don't understand " create a file with html extension". Try to create a .txt file and open it with vscode and see if you can edit it. If can, you can create another .txt file in your PC, change the suffix of the filename(.txt) to (.html) and then try to open it with vscode, check if you can edit it.
html extension with visual studio code it have a lot of problems, so you can create index.html by yourself. Example:
Open VS then press on File then click on new window.
You can save as this window in your project folder.
Don't forgot to save it with .html file type so browser and VS can read it.

Sublime not loading "Color scheme - default.sublime-package"

I opened the ~/Applications/Sublime Text.app/contents/MacOS/Packages/Color Scheme - Default.sublime-package with vim and changed some settings in the color theme that I was using. When I then saved the changes and restarted sublime text 3, the changed wasn't in effect (I tried multiple times and double checked everything).
Should you be able to just edit the package without extracting/unzipping anything? I read at different places that you should unzip and then edit, why is that?
Does ST3 read the color theme from somewhere else? Does this apply to all sublime-package files? A short explanation would be nice.
You shouldn't be modifying anything in that folder. The changes you make there will get overwritten by whatever you have in your Packages folder anyways (not the Packages folder you went to). The correct Packages folder you want to go to can be found by doing Preferences -> Browse Packages.
The best way to make modifications to files in a package is to use a plugin called PackageResourceViewer which you can install with Package Control. Once you have it installed, just do the following:
Open up the command palette with ⌘+Shift+P
Type in PackageResourceViewer: Open Resource and press Enter
Use the arrow keys to find the package and file you want to make modifications to and then press Enter
If you'd like to see the entire contents of a package (all the folders and files inside it), just do the following and a folder with the package name will be created in your Packages folder
Open up the command palette with ⌘+Shift+P
Type in PackageResourceViewer: Extract Package and press Enter
Use the arrow keys to find the package you want to extract and then press Enter
Go to your Packages folder by doing Preferences -> Browse Packages and you will see the entire folder for your package.

Sublime Text 2 - Package Control installed but the list not shown

I am using Sublime Text 2 for Mac. I have installed the Package Control for Sublime Text 2, following the instructions from https://sublime.wbond.net/installation#st2 without any trouble. However, when I open up Ctrl+Shif+P to search for available packages, it does not show any.
See the image screenshot here
Do you have any solutions for it? I try restart Sublime but it doesn't solve the problem.
Take a look in your user Preferences.sublime-settings and remove the Package Control from the "ignored_packages" list if it is there.
If you use a Linux based system, you may have to check permissions of /home/user/.config/sublime-text-3. Check if the directory is owned by your user. If not, change the owner user for that directory.
Click the Preferences > Browse Packages and check whether Package control file is there or not.
You can manually put package control file there by downloading it from here and get rid of issues.
I had the same problem. I had to restart my computer to properly reset Sublime Text 2. It seems from your comment that you also got the Package Control list to show up after restarting your computer.
Your screenshot image is currently broken, but make sure you have the zipfile "Package Control.sublime-package" in the Installed Packages directory.
Open the console and run this command:
curl http://sublime.wbond.net/Package%20Control.sublime-package -o ~/Library/Application\ Support/Sublime\ Text\ 2/Installed\ Packages/Package\ Control.sublime-package
Then restart sublime.
See this issue: https://github.com/wbond/sublime_package_control/issues/652

Sublime text version of Notepad++ 's "open current dir cmd"

I installed Sublime text 2 on my windows system . I'm trying to create a shortcut that would open the command line on the current file directory like i can using notepad++ . Also , on a similar note , how do i use/create shortcuts for "Open containing folder" in a way notepad++ allows me.
I think what you're looking for is the Terminal plugin by wbond, the author of Package Control. You can right-click and select Open Terminal Here... or use the CtrlShiftT keybinding to open a terminal at any file's directory, or use CtrlAltShiftT to open it at the directory containing the current project file.

Syntax Highlighting for Laravel Blade Template Engine in Sublime Text 2

In Sublime Text 2, what steps do I need to take to get Syntax Highlighting for the Laravel Blade Template Engine to work?
As described in http://daylerees.com/2012/04/06/notable-blade-syntax-support-by-medalink/, I took https://github.com/Medalink/Laravel-Blade, unzipped it and copied the folder into Sublime's packages folder.
However, it doesn't seem to work (see screenshot), even if I set it manually using Tools\Command Palette...\Set Syntax: Blade
Is this only meant to work with particular Color Schemes (if so, which ones), or what am I missing? (I just started using Sublime Text today)
The easiest way to install plugins for Sublime Text 2 is through Package Control.
To install Package Control:
Installation is through the Sublime Text 2 console. This is accessed via the ctrl+` shortcut. Once open, paste the following command into the console:
import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print 'Please restart Sublime Text to finish installation'
This command creates the Installed Packages folder for you (if necessary), and then downloads the Package Control.sublime-package into it.
When you have Package Control installed all you need to do to install the Blade syntax highlighter is to:
Open the command palette and type "install package"
Press enter
Wait for a new palette to show up after it has fetched the package list
Type "blade syntax"
Press enter
Enjoy
For Sublime text 3 as well as sublime text 2
install Sublime Package Control (more help on: http://wbond.net/sublime_packages/package_control/installation)
then restart sublime text (2/3)
and press ----> control (or command in mac) + shift + p
there search for package control: install package
wait for another interaction screen
search for Laravel Blade (and other packages if you want)
{
For video tutorials on this and other , subscrive this channel : https://www.youtube.com/channel/UChEv_j3fE4k2r7KcEApFDyQ
}
Also, once you have Package Control installed, you should also install the package 'DetectSyntax'. It will automatically detect the blade syntax so you don't have to manually set it for each file.
In case you installed the Laravel Blade Syntax Highlighter using Package control, that plugin, for some reason keeps throwing out errors.
Package Control: The package specified, laravel-blade, is not available
What I did is just Preference > Browse packages and then rename the folder into laravel-blade. Seems working with no pesky errors now. What I did is just gut feel. I did not even read anything in the files in the folder.
--
Edited: Go to Preference > Browse packages > Package Control.sublime-settings and remove the offending entry.
mine was stored in users folder, just do a folder search for "laravel-blade" and remove the entry from json config
Find: laravel-blade
Where: /Users/:username/Library/Application Support/Sublime Text 2/Packages