How to mark unsaved lines in Sublime Text 3? - text

I want to know which lines I changed in the file since the last save. How can I configure Sublime Text 3 so it will mark it near the line number?
Thanks in advance!

try
Preferences -> Setting user
"highlight_modified_tabs": true

Related

How to auto-break a long word when auto-wrapping text

I know we can use "word_wrap": "auto" in the User settings to make Sublime Text 3 auto wrap text, but how can I make it break a long word when wrapping?
In a sentence like:
a long word aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
I want it to
a long word aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaa
but not:
a long word
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
First, I saw advice to add "auto_wrap_break_long_word" : false, to the setting file, but it made no sense to me.
And then, I get advice from comments by using Sublime Wrap Plus
However, it is not what I want.
The Readme of Sublime Wrap Plus says:
Enhanced “wrap lines” command for Sublime Text 2 or 3. This is for the manual hard line wrap command. It does not affect the automatic soft line wrapping.
But what I want is not “HARD line wrap” because it will add real some line breaks and change the text file. And what I want is to break long word in “SOFT line wrap”(which will not change texts but only change how it looks)
In fact , I've tried to install the Sublime Wrap Plus package and set "WrapPlus.break_long_words":true in Preferences >> Settings — User.
But nothing changed about my SOFT line wrap.
THANKS for all advice anyway!

How to delete all lines in a textpad document which have a specific text

I want to use textpad on a .csv file to remove all lines of text that include the following phrase
"Norwegian Cruise Line"
So it does a search and replace on the following and deletes the whole line and repeats through the document:
"V186552004127",18,**"Norwegian Cruise Line"**,655,9751509,"Norwegian Bliss","Superior","Bahamas & Florida",12/04/2020 00:00:00,"Caribbean","Ocean","Scenery","Adventure","History",9,"New York",0,"New York",1,0,,7,0," ",8.00,19/04/2020 00:00:00,"NYK","New York","USA, NY","Disembark",0,0,"",0,0,0,0
Thanks in advance
You can use the following steps:
Open the Find Dialog with F5
Enter your search term and klick Mark All. This will bookmark all lines containing your serached term.
From the Edit menu or the context menu select Delete|Bookmarked Lines
I'm not sure about textpad, but you can use something like visual studio code or sublime which supports multi line cursors. Then, for example, in visual studio code just highlight the phrase you want and hit ctrl+F2 or right click and hit change all occurrences. From there you can hit ctrl+shift+k to delete the lines.
Using regular expressions in Textpad:
Search:
.*"Norwegian Cruise Line".*\r
Replace With:
(empty)
Replace All
This will search zero o more characters before target text followed by zero or more characters and a newline. Will erase all lines containing "Norwegian Cruise Line" (including quotes).

Sublime Text Carrying The Code One Line Above

My problem is a code editing problem in Sublime text. After I delete some line, I want to carry whole code below in that line to one line above. Right now I am doing this via deleting the line manually. Are there any shortcuts that I can do it easily?
What I want to remove:
What I want to achieve via shortcuts:

How to show invisible line endings in Sublime Text 3?

I would like to display invisible line endings in Sublime Text 3, as for example in Notepad++. How can we do that?
This is useful because when the automatic word wrap mode is ON for example, because it becomes hard to distinguish soft line breaks from real ones.
The package RawLineEdit is pretty good for this. It toggles on-and-off a mode where you view and can edit line endings by selecting Raw Line Edit: Toggle from the Sublime ctrlshiftp command prompt.
This is good if you want to be able to flick line endings visibility on and off on the occasions when you want to see it (it's not the best option if you want line endings to be always visible).
It's also very useful for seeing (and editing) if you've ended up with crlf problems, with windows-style cr carriage return characters getting mixed up with the standard lf line end characters shown as ¬:
I have written a basic plugin to display line endings as an explicit character, inline. There's certainly some room for improvement but it does the job.
It is available here: https://github.com/sdive/sublime-text_managelineendings
The other suggestions found here didn't work for the character I was encountering (U+2028). I found that this plugin was able to show me where the character was occurring:
https://packagecontrol.io/packages/Highlight%20Dodgy%20Chars
ctrl + shift + p on editor
now, type toggle word wrap and select it

Insert Break After Wrapping Width 80 characters in Sublime Text 3

In sublime text 3, it will be nice if a line break is inserted after wrapping the code after 80 characters. However, I have not found this plugin yet. Does anyone know the configuration/plugin?
I found the link for wrapping lines after 80 characters. 80-characters / right margin line in Sublime Text 3
I successfully used regex find-replace in Sublime Text:
replace
(.{80})
with
$1\n
Check out AutoWrap. It will hard wrap automatically whenever you hit the ruler. It works nearly perfectly for me.

Resources