I have looked through commands and plugins and I have not found a reasonable solution as of yet. May be obvious, but I am very new to the editor and I am trying to phase out my old editor.
Thanks!
I have looked through commands and plugins and I have not found a reasonable solution as of yet. May be obvious, but I am very new to the editor and I am trying to phase out my old editor.
Thanks!
Hi,
I know this will be an easy question, but I am trying to find duplicate lines, I did the Edit - Sort Lines and then the Permute Unique, but I don’t see where the duplicates are? Is there a way to segment them or highlight them?
hey, I know the thread is kinda old, but as I’m here, lets share a tip
I’m using the mac os version, so, my shortcuts should be different. Well, when I need to highlight duplicate values (even lines) I use the cmd+d to select them all.
Hope it helps you OP!
You can use the Compare side-by-side package and use a duplicate tab of your file before using Ctrl+Shift+P, “Permute Lines” then “Compare with…” and select the original file.
The removed lines will be highlighted.
Edit > Permute Lines > Unique
works fine for me, but is there a way I could assign this command a shortcut? We already have F9 to Sort Lines, after all … I’d hate to have to take my hands off the keyboard.
PS: There still is no comprehensive list of all available commands, correct?
Since it’s available in the main menu, just use View Package File
and view Default/Main.sublime-menu
and find out where that item is. After finding that item, just use Preferences: Key Bindings
from the command palette and make a custom binding for it
{
"keys": ["<my_favorite_shortcut>"],
"command": "permute_lines",
"args": {
"operation": "unique"
},
},
Thanks a lot! It’s actually permute_lines but that worked fine:
{
"keys": ["shift+f9"],
"command": "permute_lines",
"args": {
"operation": "reverse"
},
},
{
"keys": ["alt+f9"],
"command": "permute_lines",
"args": {
"operation": "unique"
},
},
{
"keys": ["ctrl+alt+f9"],
"command": "permute_lines",
"args": {
"operation": "shuffle"
},
},
Sorry. Looks like I did not look too closely at the command name. Edited the post to reflect
Text editor can be complex tool, but with some effort and experimentation, you can find a solution that work for you.