Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8799041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T00:13:48+00:00 2026-06-14T00:13:48+00:00

Using the CtrlP plugin, I’m typing .. several times to get to the root

  • 0

Using the CtrlP plugin, I’m typing .. several times to get to the root directory of a project, then perform the search from there.

However after I reopen CtrlP it still searches in the directory of the current file.

How can I get it to stick to the directory that I originaly set ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T00:13:49+00:00Added an answer on June 14, 2026 at 12:13 am

    By reading its documentation, of course.

    • If you want CtrlP to always open in your project’s root directory, if applicable, just add this line to your ~/.vimrc:

      let g:ctrlp_working_path_mode=2
      
    • But you could also use both :CtrlP to browse in the current directory and :CtrlpRoot to browse in the root of your project.

    • Or simply use :CtrlPLastMode to launch CtrlP in… the last mode.

    • If your project doesn’t fit CtrlP’s definition of a project, a simple mapping could be enough:

      nnoremap <key> :CtrlP /path/to/project<cr>
      

      or you could use this option:

      let g:ctrlp_root_markers = ['']
      

    edit

    My answer was based on the version of CtrlP currently installed on my machine.

    The latest version adds an optional argument to :CtrlPLastMode: --dir which does exactly what you are looking for:

    :CtrlPLastMode --dir
    

    The g:ctrlp_working_path_mode values are different, too. I believe r is the equivalent of 2.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Once I run search all using Ctrl + Shift + F then my search
i'm using sass for my project, in intellij using sass plugin. i want to
I'm using vim's taglist plugin to navigate source files in my project, but I've
How to select all columns from tables in join using linq Sql: select CTRL_RUN_JOB.*,
A lot of times I find myself using Ctrl + W = , which
I'm using a virtual ListCtrl in wxpython. I am trying to select several rows
Using Eclipse Version: Helios Service Release 2 Build id: 20110218-0911 with Android plugin. I
I am using ruby 1.8.7 and rails 2.3.4 . I am developing a plugin
I'm using Vim (7.2.445 on Debian Squeeze) with the vim-snipmate plugin (specially this fork
I'm using ctrl + q very often to get to the last edit location.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.