19

I've been using CtrlP for a while now, but I still haven't figured out how to re-index it. So whenever I want to create a new file I have to close all existing vim sessions, create the file, and then re-open them back. Otherwise the new file won't show up in the results.

I've been doing this without thinking much although this is really a huge pain in the ass. Today I decided to finally ask. Anyone know how to re-index CtrlP? I couldn't find it in the doc.

fernandohur
  • 7,014
  • 11
  • 48
  • 86
Vlad
  • 8,038
  • 14
  • 60
  • 92
  • 2
    CtrlP is the name of a plugin, not a shortcut. Well, it's also the default shortcut, but Vlad is talking about the plugin. – romainl Jul 20 '12 at 07:19

1 Answers1

24

Did you read CtrlP's documentation? The answer is there, of course:

F5

Seriously, :help pluginname should be the first command to issue after installing a plugin. After :helptags ~/.vim/doc, maybe.

romainl
  • 186,200
  • 21
  • 280
  • 313
  • 2
    I'm sorry about this, I have to admit that I totally missed it. By the way F5 doesn't work on my macbook, as it changes screen brightness. I've tried fn-F5 but that doesn't work either... – Vlad Jul 20 '12 at 07:55
  • 11
    I don't own a MacBook. The command is `:CtrlPClearCache`: if `` doesn't work for you try to map it to something that works. – romainl Jul 20 '12 at 08:16
  • 10
    I do have a MacBook, and `` works for me. You need to have CtrlP open first though. So, do `:CtrlP`, then push ``. On the mac, that'll likely need to be `Fn-`, unless you've told Mac OS X to treat the function keys as standard function keys (System Preferences -> Keyboard -> Keyboard -> Use all F1, F2, etc. keys as standard function keys). – John Szakmeister Jan 24 '13 at 10:16