pymatcher.txt 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. *pymatcher.txt*
  2. Version: 1.0c
  3. Author : FelikZ <thefelikz gmailcom>
  4. License: {{{
  5. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  6. OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  7. MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  8. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  9. CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  10. TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  11. SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  12. }}}
  13. CONTENTS *pymatcher-contents*
  14. Introduction |pymatcher-introduction|
  15. Install |pymatcher-install|
  16. ==============================================================================
  17. INTRODUCTION *pymatcher-introduction*
  18. *pymatcher* is a replacement for standard fuzzy matcher provided with CtrlP
  19. because of its performance issues on huge projects. Tested on 350k files.
  20. Some queries causes |CtrlP|'s standard matcher freezes up to 15 seconds. This
  21. matcher provides ~700ms performance on the same hardware with same queries.
  22. Pull requests to improve above performance are much appreciated.
  23. ==============================================================================
  24. INSTALL *pymatcher-install*
  25. NeoBundle installation:
  26. >
  27. NeoBundle 'FelikZ/ctrlp-py-matcher'
  28. <
  29. To enable |pymatcher| insert the following in your .vimrc:
  30. >
  31. " PyMatcher for CtrlP
  32. if !has('python')
  33. echo 'In order to use pymatcher plugin, you need +python compiled vim'
  34. else
  35. let g:ctrlp_match_func = { 'match': 'pymatcher#PyMatch' }
  36. endif
  37. <
  38. To improve |CtrlP| experience it is strongly recommended to install |AG|
  39. >
  40. https://github.com/ggreer/the_silver_searcher
  41. <
  42. and then use following |CtrlP| settings in your .vimrc:
  43. >
  44. " Set delay to prevent extra search
  45. let g:ctrlp_lazy_update = 350
  46. " Do not clear filenames cache, to improve CtrlP startup
  47. " You can manualy clear it by <F5>
  48. let g:ctrlp_clear_cache_on_exit = 0
  49. " Set no file limit, we are building a big project
  50. let g:ctrlp_max_files = 0
  51. " If ag is available use it as filename list generator instead of 'find'
  52. if executable("ag")
  53. set grepprg=ag\ --nogroup\ --nocolor
  54. let g:ctrlp_user_command = 'ag %s -i --nocolor --nogroup --ignore ''.git'' --ignore ''.DS_Store'' --ignore ''node_modules'' --hidden -g ""'
  55. endif
  56. <
  57. ==============================================================================
  58. vim:tw=78:ts=8:ft=help:norl:noet:fen: