I opened up sublime text today after restarting my computer and suddenly (either through some random key strokes of my own or due to an update) I have these red diff makers beside line numbers for all file types and regardless of whether the file is part of a git repo. I've tried turning it off, but no such luck.
"mini_diff": false,
"show_git_status": false,
"allow_git_home_dir": false,
This is what the markers look like: they look like the error/ warning markers except they appear beside every modified line and do not go away when saved.
Related
When I open js file in sublime text 3 and place cursor in any string of the code I see following:
Below is added one line without the line number, and in this line indented who and when made changes to this part. The color of the line is gray, like the comment. This information is taken from git. If I move the cursor to another line of code, then in the old place this line disappears and appears in a new place. This happens on the js files. With vue files, everything is fine. How can I disable this?
PS: When I take a screenshot this gray line disappears, so I can not show it in the picture
I found the solution. I changed settings for gitgutter from
"show_line_annotation": "auto"
to
"show_line_annotation": "false"
Now all right
I'm writing a syntax definition for Sublime Text 3, using the new YAML fornat and not the deprecated one. I'm not seeing changes to the text I'm trying to highlight, though. When are changes to my syntax definition file applied to the files it's meant to highlight? And if I can force a definition reload, how can I do so?
Changes to .sublime-syntax files take effect as soon as they are saved - ST detects any changes made when the file is within the Packages folder structure. You can see this in the ST console (View menu -> Show Console) when saving the file:
generating syntax summary
Unfortunately, there is no timestamp on the entries, so sometimes it can help to manually enter something into the console to help visually separate the lines. i.e.
import time; time.asctime(time.localtime())
'Mon Jan 8 09:11:06 2018'
then, you know any lines that appear under that in the console happened after that time.
One caveat is that ST currently doesn't detect changes automatically when the files are in a symlinked folder: https://github.com/SublimeTextIssues/Core/issues/1154
In such cases, the only way to get ST to reload modified/new files is by restarting ST.
A new update to sublime text 3 seems to have changed the way the file tabs work. I'm not even sure what is the proper element for this name but something happened with this:
Before this most recent update, i think the tabs would just shrink as the number increased, and not being able to read the name was a signal that i need to close stuff. Now it feels a lot smarter, it makes sure that i can read the entire name, but then a whole bunch of them can be hidden and stacked at the very beginning or end. I dont like this, how can i change it back?
You can set "enable_tab_scrolling": false, in your user preferences to get the old ST2 behavior back.
When I write HTML in Sublime Text 3, I like having autocompletion of attributes and element names and so on, but Sublime Text is always over-predicting things and turning my text content into elements (inappropriately), when the vast majority of the document body I am writing is text, not elements. What gets really annoying is if I press Enter at the end of a line where it believes the word I am typing is a typo of a different element, I get some really frustrating behavior:
The workaround I see is to press EscEnter at the end of every line but that isn't particularly ergonomic (and I have severe RSI so I'd rather have things be ergonomic).
Here are the relevant portions of my Preferences.sublime-settings:
{
"auto_complete": false,
"auto_complete_selector": "source - (comment, string.quoted)",
"tab_completion": false,
"tab_size": 4,
"translate_tabs_to_spaces": true,
"trim_trailing_white_space_on_save": true,
"word_wrap": true
}
I have looked at the Sublime Text documentation regarding completions and snippets but it isn't obvious to me how to suppress completions entirely during a text context. I don't currently have any HTML-mode-specific options configured.
Sublime's HTML autocompletions are implemented in a Python script.
It is possible to edit it, such that HTML tags will only be offered when you type < and a letter - instead of offering them while typing "plain" text content inside HTML.
To do this:
Install PackageResourceViewer using Package Control (if it isn't already installed)
From the Command Palette, type PRV: O and select PackageResourceViewer: Open Resource
Select HTML
Select html_completions.py
Find the line # if the opening < is not here insert that (https://github.com/sublimehq/Packages/blob/77867ed8000601962fec21a012f42b789c42195b/HTML/html_completions.py#L243)
Change completion_list = [(pair[0], '<' + pair[1]) for pair in completion_list] to completion_list = []
Save the file
Note that this creates a file that will override the version that comes with ST, so when a new build of ST3 is released, your version will still be used. In case this file is ever updated, it might be a good idea to delete your version to ensure you have the latest changes, and then to re-apply the above steps (if necessary - maybe it will be "fixed" in a future update to not suggest anything when auto_complete is set to false). To do this:
Tools -> Browse Packages
HTML
Delete html_completions.py
Coming out of nothing every time I save, delete or add a new line of code, there is white-space so I have to be deleting empty-space.
Like this
See the yellow thing? What can I do about?
Add:
"trim_trailing_white_space_on_save": true,
to your User Settings file.