CtrlP - use the same root-folder after opened a file ...

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

CtrlP - use the same root-folder after opened a file ...

Petar Kadakevliev
Hello,

I can use CtrlP to set the root folder for a project, and after that - to perform a quick find for a file. So, I do this:

:CtrlP /path/to/project/root/folder -> Enter

and it scans the folder for the files in it. After that - <C-d> - and start typing the name of the file - and a list of files appear. Then I open the file and start to edit it.

And my question is: what should I do in this moment, if I want to start new search, but from the root folder again? ... without having to type

:CtrlP /path/to/project/root/folder -> Enter

again :) ...

Thanks in advance ;) ...

--
--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: CtrlP - use the same root-folder after opened a file ...

guyot.dam

2013/9/11 Petar Kadakevliev <[hidden email]>
Hello,

I can use CtrlP to set the root folder for a project, and after that - to perform a quick find for a file. So, I do this:

:CtrlP /path/to/project/root/folder -> Enter

and it scans the folder for the files in it. After that - <C-d> - and start typing the name of the file - and a list of files appear. Then I open the file and start to edit it.

And my question is: what should I do in this moment, if I want to start new search, but from the root folder again? ... without having to type

:CtrlP /path/to/project/root/folder -> Enter

again :) ...

Thanks in advance ;) ...

--
--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.

If you have a known file in your root folder you can set :
  let g:ctrlp_root_markers = [your_file.name]

This option is a liste of filenames, so [ and ] are mendatory.

CtrlP will search your path backward until he finds the given root file and set the root folder for your search.

--
--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: CtrlP - use the same root-folder after opened a file ...

Lech Lorens
In reply to this post by Petar Kadakevliev
On Wednesday, September 11, 2013 10:25:49 PM UTC+2, Petar Kadakevliev wrote:

> Hello,
>
> I can use CtrlP to set the root folder for a project, and after that - to perform a quick find for a file. So, I do this:
>
> :CtrlP /path/to/project/root/folder -> Enter
>
> and it scans the folder for the files in it. After that - <C-d> - and start typing the name of the file - and a list of files appear. Then I open the file and start to edit it.
>
> And my question is: what should I do in this moment, if I want to start new search, but from the root folder again? ... without having to type
>
> :CtrlP /path/to/project/root/folder -> Enter
>
> again :) ...
>
> Thanks in advance ;) ...

I normally open a new window (<Ctrl-w>n) and then invoke CtrlP which at this moment starts searching from the root. Then close the old window. You could also use :enew.

HTH,
Lech

--
--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.