Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

Based on this answer on SOthis answer on SO

:/^\s*-/,/^only/-1 !sort -u

provided the cursor is not placed anywhere on the lines starting with -

And, I don't know why

:/^\s*-/,/^\s*[^-]/-1 !sort -u

works only if cursor is positioned on the line immediately before start of search pattern

Based on this answer on SO

:/^\s*-/,/^only/-1 !sort -u

provided the cursor is not placed anywhere on the lines starting with -

And, I don't know why

:/^\s*-/,/^\s*[^-]/-1 !sort -u

works only if cursor is positioned on the line immediately before start of search pattern

Based on this answer on SO

:/^\s*-/,/^only/-1 !sort -u

provided the cursor is not placed anywhere on the lines starting with -

And, I don't know why

:/^\s*-/,/^\s*[^-]/-1 !sort -u

works only if cursor is positioned on the line immediately before start of search pattern

Source Link
Sundeep
  • 1.1k
  • 8
  • 20

Based on this answer on SO

:/^\s*-/,/^only/-1 !sort -u

provided the cursor is not placed anywhere on the lines starting with -

And, I don't know why

:/^\s*-/,/^\s*[^-]/-1 !sort -u

works only if cursor is positioned on the line immediately before start of search pattern