Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CtrlPLine version that only searches the current buffer #396

Closed
rgrinberg opened this issue Apr 14, 2013 · 6 comments
Closed

CtrlPLine version that only searches the current buffer #396

rgrinberg opened this issue Apr 14, 2013 · 6 comments

Comments

@rgrinberg
Copy link
Contributor

This is the slightly more useful use case for me. Although the current behaviour is also useful sometimes.

@kien
Copy link
Owner

kien commented Apr 15, 2013

Vim's /pattern has always done the job just fine for me. I'm not sure if a slight improvement will be worth adding this.

@rgrinberg
Copy link
Contributor Author

Yes I completely understand your position since it's only a tiny improvement. For me the change is worth is however because it's superior over /pattern because it does not jump from where you're navigating. Sometimes I would only like to reference the lines and immediately jump back. This saves me the interruption of context switching. And it's also superior to quickfix because of the incremental nature. In any case this is a trivial change to make so I will gladly keep it in my own fork.

Are you against the feature on principle or is just you don't think it's worth your time?

@kien
Copy link
Owner

kien commented Apr 15, 2013

Neither. I simply want to avoid it being redundant. I'll look into this regardless.

@saamalik
Copy link

@rgrinberg Have you tried setting the 'incsearch' option? Try /pattern with this option. The buffer will scroll to the appropriate match, and when you're done committing the line to your brain-memory, just hit ESC and you'll be back to where you started from. This trick even works with i_Ctrl-O =)

@kien kien closed this as completed in 27e2375 Jul 5, 2013
@dusans
Copy link

dusans commented Aug 4, 2013

This works if i do for instance
:CtrlPLine _vimrc
but i cant get it working with
:CtrlPLine expand("%")
What am i doing wrong?

@kien
Copy link
Owner

kien commented Aug 4, 2013

@dusans expand("%") is a function call. So the correct syntax is :execute "CtrlPLine ".expand("%"). But in this case, you can just use :CtrlPLine %.

liskin pushed a commit to liskin/ctrlp.vim that referenced this issue May 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants