Git Product home page Git Product logo

ctrlp.vim's People

Contributors

diegoviola avatar grimpy avatar icetan avatar jteplitz avatar kien avatar lucapette avatar mattn avatar olivia5k avatar ornicar avatar pidelport avatar rgrinberg avatar zah avatar zakj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ctrlp.vim's Issues

Matching files near current file get higher weight

It would be awesome, if when searching for file with ctrlp files that match pattern and are closer to current file (directory wise) would get higher weight

It make good sense, directories are used to store files by some logical groups. Files that are in same directory usually are related. Having files, that match patter and are closer to current file sowing before other files (that are not so close) could decrease amount of characters user needs to input to open file, that he/she want's to open.

For example think about ruby on rails apps
If you're editing app/view/some_name/_form.html.erb
and then you want to open index.html.erb

typing index (or less) could be enough for app/view/some_name/index.html.erb to be first match.

However, if such mathematics would slow vim a lot, better not to do it. I love ctrlp exactly for it's speed

P.S.
I hope you understand what I mean

Not matching files on large project

I've been trying to use ctrlp at work and on our main large project (a rails project) I try to find "user.rb" and it matches things like "app/controllers/status_controller.rb".

Is this a config issue on my end or an actual bug?

Open in buffer mode by default

It would be nice if the standard command could be open in buffer (or any other) mode by default. Right now, this behavior can be achieved by binding some other key to the default CtrlP command, and then binding to CtrlPBuffer. But this is wasteful if the first mode is never used. An option like 'g:ctrlp_default_open_mode' would be great.

File is created in wrong directory when g:ctrlp_working_path_mode = 1

I have g:ctrlp_working_path_mode = 1 since implementation of #30

I open vim in project directory

Now if have some file opened and open ctrlp, type some file name, and press it will be created in project directory, instead of current buffer directory. (note, I haven't switched to project directory with '/' yet)

In case when g:ctrlp_working_path_mode = 1 and current buffer is not in project root, ctrlp should create files relative current buffer directory, unless user switched to project root dir (with /).

Update the list of items to match against, using the result of the previous match

This might be a bit hard to explain.

From what I see, each time a new character is added, the same huge list of items is filtered. It would speed things up quite a bit the list is filtered by the input (but not by the max height), and the result is used for subsequent filtering. Only the displayed list should then be reduced by the max height option.

Support for dotfiles

It appears that ctrlp does not find dotfiles/dotdirs with the current globbing. Would it be possible for you to add support for this, possibly by adding a second call to globpath? I was unable to find a single glob that will expand to both normal files and dotfiles, but I admit I haven't spent much time looking into it yet.

Horizontal Splits

When i'm in a vertical split and attempt to open a horizontal split, it opens it below the vertical buffer instead of in the buffer. CommandT would split the vertical buffer itself as if you typed :split.

Is there any way to have ctrlp do this?

Performance is slow with large files open

After opening a file of about 200 lines, performing a search becomes extremely slow. I'll type my query, and watch it catch up to me at about 1 letter per second.

Add support for fuzzy tag search

The one feature that is keeping me on FuzzyFinder at the moment is the :FufTag mode. Would it be possible to add a fuzzy tag search to ctrlp?

Use CursorHold to update the list of matching items

It would be an improvement if, when the ctrlp window appears, the updatetime is changed to something small, and the list of matching items is only updated when that autocommand is triggered.

That would speed things up quite a bit, when you know what you want to write

Create new file

In LustyExplorer it is possible to create new files, by typing the name of an non-existing file and pressing CTRL-e. Would it be possible to add a similar feature to ctrlp?

Freezes when searching in SFTP (SSH) directories.

I've noticed that ctrlp seems to freeze when a search is initiated inside a SFTP volume. I mount a lot of remote servers via SFTP with osxfuse and use my local MacVim configuration to work with remote files in this manner. Is there any chance that this problem can be correct? Thanks, for the great plugin!

Doesn't see files in directories with accented characters

It seems the plugin doesn't see files that have accented characters (for example some of these: ěščřžýáíé) in the path.
I experienced the issue on this path: /Users/martin/Desktop/vš/_novell/TEXPR. Opened vim in there, pressed ^P and saw this:
issue
The directory isn't empty:
ls
And I can get to the files from the ^P when I switch to the MRU files listing:
mru

Let use specify full path for ctrlp cache directory

Let user set g:ctrlp_cache_dir entirely, and don't append "/.ctrlp_cache"
If I set g:ctrlp_cache_dir to my custom directory such as ~/tmp/.vim/ctrlp there is no point in "/.ctrlp_cache" part.
But it's very annoying if I want to cd to it.

Ok, I can set g:ctrlp_cache_dir to ~/tmp/.vim/, but again, there will be invisible, and annoying.
So please let the user set full path for cache directory

wildignore makes problems for fugitive.vim

set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*.so

Is a bad idea, It breaks fugitive plugin.
A much better is to simply

let g:ctrlp_user_command = "find %s -type f | egrep -v '/\.(git|hg|svn)/' | egrep -v '\.(swp|swo|log|gitkep|keepme|so|o)$'"

This is very fast and it will filter all directories and files, that you really don't want to find without breaking fugitive.

Perhaps some info about this in help and/or from page should be added

Otherwise this is great plugin.

Ability to open buffer twice with :CtrlPBuffer

Hi,

Your plugin is simply fantastic. The only thing that is a discomfort is buffer handling. I use vim tabs as split-windows layouts. That's why I often open same buffer in different tabs. Unfortunately ctrlp's buffer selector always jumps to buffer if it's visible anywhere. It would be great if this behavior was customizable - jump to buffer or (re)open buffer.

How to reproduce:
Open 2 files in a split.
Create a tab.
Go to tab.
Try to open any file from first tab with :CtrlPBuffer
Vim will jump to first tab and activate open buffer.

Now what I'd love is to select a buffer with you plugin and use c-x,c-v or c-t to reopen it again. Ideally the plugin could exclude current buffer from search this way :)

Open new window from netrw buffer

Hi,

When I run vim via vim . to open it with the current directory listing and then ctrl-p to another file, the new split window is opened instead of using the current one.

I explicitly set the following options:

let g:ctrlp_split_window = 0
let g:ctrlp_open_new_file = 0

After some digging in the code I found that netrw sets noma, nobl and bf=nofile.
This "breaks" s:normcmd call in the ctrlp#acceptfile and executes bo vne ... instead of bo e ....

Maybe there is some work around for such an issue? Netrw lets me redefine its buffer settings via g:netrw_bufsettings but honestly I don't want to see its buffers in the 'ls' and make them modifiable.

I'd appreciate your help, thanks!

Bad help description g:ctrlp_working_path_mode = 1

help says that setting ctrlp_working_path_mode to one means

1 - the parent directory of the current file.

However ctrlp opens file directory

for example:

/some/path/to/current_file

/some/path/to = current_file directory
/some/path = parent directory of current_file

You should remove "the parent" (or simply "parent") part

cursor color messed up

So I did:

set gcr=a:blinkon0

In my .vimrc as well as set a color for the cursor in my theme. The problem is that it works fine, but when I pull up CtrlP, it somehow resets the color of the cursor to something else (transparent in MacVim). This only happens when I add the above line to turn off blinking. I tried searching around the code, the only relevant thing I could find was this but I don't know if it'd be the culprit.

CtrlPCurWD CtrlPRoot broken

Guess no one has used these yet! I tracked these down to the following lines

if exists('a:1') && len(a:1) == 1 && !type('a:1')
    let l:pathmode = a:1
elseif exists('a:1') && len(a:1) > 1 && type('a:1')

which should be changed to

if exists('a:1') && len(a:1) == 1 && !type(a:1)
    let l:pathmode = a:1
elseif exists('a:1') && len(a:1) > 1 && type(a:1)

Slow performance?

Anyone else seeing quite bad performance? For example, :CtrlPBuffer takes up to 1 second before displaying anything on screen, even with relatively small buffer counts, like 3. I'd like this to be lightning fast, if possible...

Algorithm Improvement

Hey Kien,

I get some weird results when in comes to matches of a query,

In one particular Rails project I work on there's a break model (app/models/break.rb) and unit test file (test/unit/break_test.rb).

But when I search break_test with CtrlP instead of getting the unit test I get a migration file with the name: db/migrate/xxx_break_out_custom_charge_settings.rb

:S

wildignore use is not consistent with vim

I start vim from a directory that contains a folder named cache and have the following settings:

let g:ctrlp_working_path_mode = 0
set wildignore=cache/*

Using :edit command, the cache directory is not listed but I can find it in ctrlp files list. I have to set wildignore with */cache/* to really filter it.
Is it possible that ctrlp can have the same behavior as vim?

Thank you for the excellent plugin!

search from projects directory if search starts with /

It would be super cool, if when g:ctrlp_working_path_mode is set to 1
When you open ctrlp and start typing file name with / (i.e. / is first character you typed), ctrlp would switch to project directory (g:ctrlp_working_path_mode == 2)

This would be extremely flexible and super useful

<down> in OSX

When I press <down> or <up> a "A" or "B" is insert in file.
<crtl-p> and <ctrl-n> work ok for move up or down.

I use vim 7.3 in OSX Lion.

Segfault

Hi!

You're plugin is super promising. While using it, though, I started running into issues where VIM would randomly segfault on me. I wasn't getting that any time prior to installing your plugin, so it's likely the culprit. I'm more than happy to help out with debugging any way I can.

Cheers!

ctrlp Does not close after selecting a file

Using version 7.2.445 from the repos

This is a weird one and I have finally been able to reproduce it.

  1. Create a directory structure like the following
dir/
  hi.php
  inner/
     hey.php
  1. Create a symbolic link to dir in a different directory, and navigate there (I don't know if this is the problem or not)
  2. Open vim and ctrlp in the linked dir directory, open the file inner/hey.php
  3. ctrlp , .. and then open hi.php

screenshots

After trying to open that file, the ctrlp window stays open. If I try to ctrlp it again I get this.
If I try and close I get this
And then generally I mash :q and end up with this

extra info

  • Before testing I moved my .vimrc to a different folder, so I do not think that is a factor
  • My system is a brand new debian squeeze vps, I have barely anything customized.
  • It doesn't occur 100% of the time, but often enough to be a problem

I really really like this script (awesome job), although this little bug is making it unusable at the moment.

Custom ignore for ctrlp

It would be nice to be able to set what files/directories to ignore without changing the wildignore setting. I use both ctrlp and Nerd Tree, but I want them to ignore different things. I don't want ctrlp to look inside the node_modules directory, but I want Nerd Tree to show the contents of that folder.

CtrlP breaks unnamed (") register

After opening buffer from CtrlP result, CtrlP overrides unnamed register with "^[yPVyPP...". Please restore original content of unnamed register after sil! norm! gv"vy in s:lastvisual() same as 'v' register.

Possible to exclude home directory?

When using CtrlP in the home directory, which usually contains a lot of files, it take a lot of time to index all of them to default depth 40. Is there a way to limit the depth to 1 only when opening CtrlP in the home directory (or any other "troublesome" directory for that matter)?

Calling multiple times ctrlp

When we use Ctrlp we choose a file, we open a new buffer, then usually i re-press <c-p> to activate "finder" but create a new instance (with some problems) instead to activate old one.

wildignore

The docs say to use
set wildignore+=/.git/,/.hg/,/.svn/ " Linux/MacOSX

However after doing this BundleInstall does not work from the vundo plugin. Perhaps this is actually an issue with vundo - but I encountered this problem and thought I should mention it.

ctrlp_working_path_mode = 2 produces and error in FindRoot

With the following line in my vimrc:

let g:ctrlp_working_path_mode = 2

Every time I invoke ctrlp, I receive the following error:

Error detected while processing function ctrlp#init..ctrlp#SetWorkingPath..56_FindRoot:
line 10:
E121: Undefined variable: a:1
E116: Invalid arguments for function 56_FindRoot
line 11:
E171: Missing :endif
line 10:
E121: Undefined variable: a:1
E116: Invalid arguments for function 56_FindRoot
line 11:
E171: Missing :endif
line 10:
E121: Undefined variable: a:1
E116: Invalid arguments for function 56_FindRoot
line 11:
E171: Missing :endif
line 10:
E121: Undefined variable: a:1
E116: Invalid arguments for function 56_FindRoot
line 11:
E171: Missing :endif
line 10:
E121: Undefined variable: a:1

Tag search

It would be awesome to be able to run a ctrlP command to search through the current tags, that way I could jump to a specific function rather than just the file.

Feature request: options when current buffer is unsaved

Currently, when 'hidden' is off and the current buffer is not saved, attempting to open a file with ctrl-p fails silently. It would be great to have a config option to make open the file in a tab or a split in this situation.

Or at least display the "No write since last change" error so the user knows what's going on.

Switch to project mode with / automatically

This is related to issue #30

Right now I'm at work, and using ctrlp as usual (except that I use new feature).
It works good, but it's annoying to press enter after / (and it slows you down)

ctrlp should switch mode automatically, because there are no files with / in filename anyway.

This would make it faster to navigate.

Think about this scenario:
let g:ctrlp_working_path_mode = 1

open buffer and search for file, switch to it.
Now you need to open some other file in other directory.
Since you know file is in other directory, you open ctrlp and type /
ctrlp immediately switches to project root
and you type your file you want to search.

Having user hit Enter after typing / isn't really useful in this case, don't you think.

Open Multiple Files

It'd be cool to be able to do something like mark multiple to all be opened at once.

ignoring .git/objects

I would like ignore only .git/objects, for this I put in ´~/.vimrc´

  set wildignore+=.git/objects/*

But if I write a j in ctrlp plugin, this show

 > .git/objects/00/ff78...
 > .git/objects/00/632...
 ...

I use vim 7.3 in OSX Lion

Can't open files with # in its name

When I try to open a file with # in its filename it doesn't open the file. The message error is bellow:

Error detected while processing function 53_AcceptSelection:
line 80:
E499: Empty file name for '%' or '#', only works with ":p:h": bo e /home/thiago/
Sources/Cormen/#1/mergesort.py

Close ctrlp

Hi, finally I think I found the problem,

when I invoke ctrlp, then I press <esc> when I can found the file, this will not close ctrlp and switch to another buffer. Re-calling ctrlp create a new instance.

How I can close it when no matches was found?

Cannot backspace characters from within the prompt

When I have the prompt open and I'm typing to filter results, if I make a typo and then hit backspace to delete it, it doesn't actually delete the character, it just moves to the left of it as if I hit the "left" key.

Is this the expected behavior or could it be some other plugin on my end causing this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.