I don't know if you're into completion engines, but coc-java has an "Organize Imports" which does exactly what you're trying to do.
- Igbanam.
On Sat, Jan 14, 2023 at 1:52 AM Salman Halim <salmanhalim@gmail.com> wrote:
--On Fri, Jan 13, 2023 at 8:13 PM Tim Chase <vim@tim.thechases.com> wrote:On 2023-01-13 16:41, Salman Halim wrote:
> For example, I want to find a match for 'cat', but only in lines 50 to
> 100. If my cursor is before line 50 when I start, I can prefix my
> expression with \%>49 and pass 100 as the stopline, but that doesn't
> work if my cursor is AFTER line 50 as it starts the match at the cursor
> location.
> I don't want to first move my cursor.
While possibly not quite what you're looking for, if I want such, I use
:50,100g/cat
or, if I want to know which line-numberss:
:50,100g/cat/#
-timTim, this doesn't do what I'm trying to do, but the bigger problem is that :g absolutely moves the cursor, putting it on the last found match.Thanks very much,Salman
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CANuxnEcXzUyY%3Db8bEofU1yKQHWqbsOjmCrSKnApc57C9H%3DK3Gg%40mail.gmail.com.
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAOmRJrei37GrgJMg%2BjkPc0TXDMLv2HM450b%2BMmJDt0yYUM6QCw%40mail.gmail.com.
No comments:
Post a Comment