bgneal@3: *ctrlp.txt* Fuzzy file, buffer, mru and tag finder. v1.6.5 bgneal@0: *CtrlP* *ControlP* *'ctrlp'* *'ctrl-p'* bgneal@0: =============================================================================== bgneal@0: # # bgneal@0: # :::::::: ::::::::::: ::::::::: ::: ::::::::: # bgneal@0: # :+: :+: :+: :+: :+: :+: :+: :+: # bgneal@0: # +:+ +:+ +:+ +:+ +:+ +:+ +:+ # bgneal@0: # +#+ +#+ +#++:++#: +#+ +#++:++#+ # bgneal@0: # +#+ +#+ +#+ +#+ +#+ +#+ # bgneal@0: # #+# #+# #+# #+# #+# #+# #+# # bgneal@0: # ######## ### ### ### ########## ### # bgneal@0: # # bgneal@0: =============================================================================== bgneal@0: CONTENTS *ctrlp-contents* bgneal@0: bgneal@0: 1. Intro........................................|ctrlp-intro| bgneal@0: 2. Options......................................|ctrlp-options| bgneal@0: 3. Commands.....................................|ctrlp-commands| bgneal@0: 4. Mappings.....................................|ctrlp-mappings| bgneal@0: 5. Input Formats................................|ctrlp-input-formats| bgneal@0: 6. Extensions...................................|ctrlp-extensions| bgneal@0: bgneal@0: =============================================================================== bgneal@0: 1. Intro *ctrlp-intro* bgneal@0: bgneal@3: Full path fuzzy file, buffer, mru and tag finder with an intuitive interface. bgneal@0: Written in pure Vimscript for MacVim and Vim version 7.0+. Has full support for bgneal@3: Vim’s |regexp| as search pattern, built-in MRU files monitoring, project’s root bgneal@0: finder, and more. bgneal@0: bgneal@0: To enable optional extensions (tag, quickfix, dir...), see |ctrlp-extensions|. bgneal@0: bgneal@0: =============================================================================== bgneal@0: 2. Options *ctrlp-options* bgneal@0: bgneal@0: Below are the available options and their default values:~ bgneal@0: bgneal@0: *'g:ctrlp_map'* bgneal@0: Use this option to change the mapping to invoke |CtrlP| in |Normal| mode: > bgneal@0: let g:ctrlp_map = '' bgneal@0: < bgneal@0: bgneal@3: *'g:ctrlp_cmd'* bgneal@3: Set the default opening command to use when pressing the above mapping: > bgneal@3: let g:ctrlp_cmd = 'CtrlP' bgneal@3: < bgneal@3: bgneal@0: *'g:loaded_ctrlp'* bgneal@3: Use this to disable the plugin completely: > bgneal@0: let g:loaded_ctrlp = 1 bgneal@0: < bgneal@0: bgneal@0: *'g:ctrlp_by_filename'* bgneal@0: Set this to 1 to set search by filename (not full path) as the default: > bgneal@0: let g:ctrlp_by_filename = 0 bgneal@0: < bgneal@0: bgneal@0: *'g:ctrlp_regexp_search'* bgneal@0: Set this to 1 to set |regexp| search as the default: > bgneal@0: let g:ctrlp_regexp_search = 0 bgneal@0: < bgneal@0: bgneal@0: *'g:ctrlp_match_window_bottom'* bgneal@0: Set this to 0 to show the match window at the top of the screen: > bgneal@0: let g:ctrlp_match_window_bottom = 1 bgneal@0: < bgneal@0: bgneal@0: *'g:ctrlp_match_window_reversed'* bgneal@0: Reverse the sort order of the matched files in the match window. The default bgneal@0: setting is from bottom to top: > bgneal@0: let g:ctrlp_match_window_reversed = 1 bgneal@0: < bgneal@0: bgneal@0: *'g:ctrlp_max_height'* bgneal@0: Set the maximum height of the match window: > bgneal@0: let g:ctrlp_max_height = 10 bgneal@0: < bgneal@0: bgneal@0: *'g:ctrlp_jump_to_buffer'* bgneal@3: Set this to 0 to disable the jump-to-open-buffer feature. bgneal@3: Set to 2 to also jump tab if the selected buffer’s opened in another tab. bgneal@3: Set to 1 to only jump to it if it’s opened in the current tab: > bgneal@3: let g:ctrlp_jump_to_buffer = 2 bgneal@0: < bgneal@0: bgneal@0: *'g:ctrlp_working_path_mode'* bgneal@0: When starting up the prompt, temporarily set the working directory (i.e. the bgneal@0: |current-directory|) to: bgneal@0: 1 - the parent directory of the current file. bgneal@0: 2 - the nearest ancestor that contains one of these directories/files: bgneal@0: .git/ bgneal@0: .hg/ bgneal@0: .bzr/ bgneal@0: _darcs/ bgneal@0: root.dir bgneal@0: .vimprojects bgneal@0: 0 - don’t manage working directory. bgneal@0: > bgneal@0: let g:ctrlp_working_path_mode = 2 bgneal@0: < bgneal@0: bgneal@0: *'g:ctrlp_root_markers'* bgneal@0: Use this to set your own root markers in addition to the default ones. Your bgneal@0: markers will take precedence: > bgneal@0: let g:ctrlp_root_markers = [''] bgneal@0: < bgneal@0: These markers (builtins and yours) will serve as identifiers for the '/' and bgneal@0: '\' special inputs (section 5.e) bgneal@0: bgneal@0: *'g:ctrlp_use_caching'* bgneal@0: Set this to 0 to disable per-session caching. When disabled, caching will still bgneal@0: be enabled for directories that have more than 4000 files: > bgneal@0: let g:ctrlp_use_caching = 1 bgneal@0: < bgneal@0: Note: you can quickly purge the cache by pressing while inside |CtrlP|. bgneal@0: bgneal@0: *'g:ctrlp_clear_cache_on_exit'* bgneal@0: Set this to 0 to enable cross-sessions caching: > bgneal@0: let g:ctrlp_clear_cache_on_exit = 1 bgneal@0: < bgneal@0: bgneal@0: *'g:ctrlp_cache_dir'* bgneal@0: Set the directory to store the cache files: > bgneal@0: let g:ctrlp_cache_dir = $HOME.'/.ctrlp_cache' bgneal@0: < bgneal@0: bgneal@0: *'g:ctrlp_prompt_mappings'* bgneal@0: Use this to customize the mappings inside |CtrlP|’s prompt to your liking. You bgneal@0: only need to keep the lines that you’ve changed the values (inside []): > bgneal@0: let g:ctrlp_prompt_mappings = { bgneal@0: \ 'PrtBS()': [''], bgneal@0: \ 'PrtDelete()': [''], bgneal@0: \ 'PrtDeleteWord()': [''], bgneal@0: \ 'PrtClear()': [''], bgneal@0: \ 'PrtSelectMove("j")': ['', ''], bgneal@0: \ 'PrtSelectMove("k")': ['', ''], bgneal@0: \ 'PrtHistory(-1)': [''], bgneal@0: \ 'PrtHistory(1)': [''], bgneal@0: \ 'AcceptSelection("e")': ['', '<2-LeftMouse>'], bgneal@0: \ 'AcceptSelection("h")': ['', '', ''], bgneal@0: \ 'AcceptSelection("t")': ['', ''], bgneal@0: \ 'AcceptSelection("v")': ['', '', ''], bgneal@0: \ 'ToggleFocus()': [''], bgneal@0: \ 'ToggleRegex()': [''], bgneal@0: \ 'ToggleByFname()': [''], bgneal@3: \ 'ToggleType(1)': ['', ''], bgneal@0: \ 'ToggleType(-1)': ['', ''], bgneal@0: \ 'PrtCurStart()': [''], bgneal@0: \ 'PrtCurEnd()': [''], bgneal@0: \ 'PrtCurLeft()': ['', ''], bgneal@0: \ 'PrtCurRight()': ['', ''], bgneal@0: \ 'PrtClearCache()': [''], bgneal@0: \ 'PrtDeleteMRU()': [''], bgneal@0: \ 'CreateNewFile()': [''], bgneal@0: \ 'MarkToOpen()': [''], bgneal@0: \ 'OpenMulti()': [''], bgneal@0: \ 'PrtExit()': ['', '', ''], bgneal@0: \ } bgneal@0: < bgneal@0: If you have problem with moving left instead of deleting a char, add this bgneal@0: to your |vimrc|: > bgneal@0: let g:ctrlp_prompt_mappings = { bgneal@0: \ 'PrtBS()': [''], bgneal@0: \ 'PrtCurLeft()': [''], bgneal@0: \ } bgneal@0: < bgneal@0: bgneal@0: *'g:ctrlp_mruf_max'* bgneal@0: Specify the number of recently opened files you want |CtrlP| to remember: > bgneal@0: let g:ctrlp_mruf_max = 250 bgneal@0: < bgneal@0: bgneal@0: *'g:ctrlp_mruf_exclude'* bgneal@0: Files you don’t want |CtrlP| to remember; use |regexp| to specify the patterns: bgneal@0: > bgneal@0: let g:ctrlp_mruf_exclude = '' bgneal@0: < bgneal@0: Examples: > bgneal@0: let g:ctrlp_mruf_exclude = '/tmp/.*\|/temp/.*' " MacOSX/Linux bgneal@0: let g:ctrlp_mruf_exclude = '^C:\\dev\\tmp\\.*' " Windows bgneal@0: < bgneal@0: bgneal@0: *'g:ctrlp_mruf_include'* bgneal@0: And if you want |CtrlP| to only remember some files, specify them here: > bgneal@0: let g:ctrlp_mruf_include = '' bgneal@0: < bgneal@0: Example: > bgneal@0: let g:ctrlp_mruf_include = '\.py$\|\.rb$' bgneal@0: < bgneal@0: bgneal@0: *'g:ctrlp_mruf_case_sensitive'* bgneal@0: Match this with your file system case-sensitivity setting to avoid duplicate bgneal@0: MRU entries: > bgneal@0: let g:ctrlp_mruf_case_sensitive = 1 bgneal@0: < bgneal@0: bgneal@0: *'g:ctrlp_dotfiles'* bgneal@0: Set this to 0 if you don’t want |CtrlP| to search for dotfiles and dotdirs: > bgneal@0: let g:ctrlp_dotfiles = 1 bgneal@0: < bgneal@3: You can use |'wildignore'| to exclude anything from the search. bgneal@3: e.g. exclude version control directories: > bgneal@0: set wildignore+=*/.git/*,*/.hg/*,*/.svn/* " Linux/MacOSX bgneal@0: set wildignore+=.git\*,.hg\*,.svn\* " Windows bgneal@0: < bgneal@3: Note: the `*/` in front of each glob is required. bgneal@0: bgneal@0: Other note: |wildignore| influences the result of |expand()|, |globpath()| and bgneal@0: |glob()| which many plugins use to find stuff on the system (e.g. fugitive.vim bgneal@0: looks for .git/, some other plugins look for external exe tools on Windows). bgneal@0: So be a little mindful of what you put in your |wildignore|. bgneal@0: bgneal@3: *'g:ctrlp_custom_ignore'* bgneal@3: In addition to |'wildignore'|, use this for files and directories you want only bgneal@3: |CtrlP| to not show. Use |regexp| to specify the pattern: > bgneal@3: let g:ctrlp_custom_ignore = '' bgneal@3: < bgneal@3: bgneal@0: *'g:ctrlp_highlight_match'* bgneal@0: Use this to enable/disable highlighting of the matched patterns and to specify bgneal@0: the highlight group that’ll be used: > bgneal@0: let g:ctrlp_highlight_match = [1, 'Identifier'] bgneal@0: < bgneal@0: bgneal@0: *'g:ctrlp_max_files'* bgneal@0: The maximum number of files to scan, set to 0 for no limit: > bgneal@0: let g:ctrlp_max_files = 20000 bgneal@0: < bgneal@0: bgneal@0: *'g:ctrlp_max_depth'* bgneal@0: The maximum depth of a directory tree to recurse into: > bgneal@0: let g:ctrlp_max_depth = 40 bgneal@0: < bgneal@0: Note: the larger these values, the more memory Vim uses. bgneal@0: bgneal@0: *'g:ctrlp_user_command'* bgneal@0: Specify an external tool to use for listing files instead of Vim’s globpath(). bgneal@0: Use %s in place of the target directory: > bgneal@0: let g:ctrlp_user_command = '' bgneal@0: < bgneal@0: Examples: > bgneal@0: let g:ctrlp_user_command = 'find %s -type f' " MacOSX/Linux bgneal@0: let g:ctrlp_user_command = 'dir %s /-n /b /s /a-d' " Windows bgneal@0: < bgneal@0: You can also use 'grep', 'findstr' or something else to filter the results. bgneal@0: Examples: > bgneal@0: let g:ctrlp_user_command = 'find %s -type f | grep (?!tmp/.*)' bgneal@0: let g:ctrlp_user_command = 'dir %s /-n /b /s /a-d | findstr .*\.py$' bgneal@0: < bgneal@0: Use a version control listing command when inside a repository, this is a lot bgneal@0: faster when working with large projects: > bgneal@0: let g:ctrlp_user_command = [repo_marker, vcs_ls_command, fallback_command] bgneal@0: < bgneal@0: If the fallback_command is empty or not defined, globpath() will then be used bgneal@0: when searching outside a repo. bgneal@0: Examples: > bgneal@0: let g:ctrlp_user_command = ['.git/', 'cd %s && git ls-files'] bgneal@0: let g:ctrlp_user_command = ['.hg/', 'hg --cwd %s locate --fullpath -I .'] bgneal@0: < bgneal@0: bgneal@0: *'g:ctrlp_open_new_file'* bgneal@0: Use this option to specify how the newly created file is to be opened when bgneal@0: pressing : bgneal@0: 1 - in a new tab bgneal@0: 2 - in a new horizontal split bgneal@0: 3 - in a new vertical split bgneal@0: 0 - in the current window bgneal@0: > bgneal@0: let g:ctrlp_open_new_file = 3 bgneal@0: < bgneal@0: bgneal@0: *'g:ctrlp_max_history'* bgneal@0: The maximum number of input strings you want |CtrlP| to remember. The default bgneal@0: value mirrors Vim’s global |'history'| option: > bgneal@0: let g:ctrlp_max_history = &history bgneal@0: < bgneal@0: Set to 0 to disable prompt’s history. bgneal@0: bgneal@0: *'g:ctrlp_open_multi'* bgneal@0: If non-zero, this will enable opening multiple files with and : > bgneal@0: let g:ctrlp_open_multi = '1v' bgneal@0: < bgneal@0: For the number: bgneal@0: If bigger than 1, it’ll be used as the maximum number of windows or tabs to bgneal@0: create when opening the files (the rest will be hidden buffers). If is 1, bgneal@0: will open all files, each in a new window or new tab. bgneal@0: For the letter: bgneal@0: t - each in a tab bgneal@0: h - each in a horizontal split bgneal@0: v - each in a vertical split bgneal@0: bgneal@0: *'g:ctrlp_dont_split'* bgneal@0: When opening a file with , |CtrlP| avoids opening it in windows created by bgneal@0: plugins, help and quickfix. Use this to setup some exceptions: > bgneal@0: let g:ctrlp_dont_split = '' bgneal@0: < bgneal@0: Acceptable values are partial names or filetypes of the special buffers. Use bgneal@0: |regexp| to specify the pattern. Example: > bgneal@0: let g:ctrlp_dont_split = 'netrw\|help' bgneal@0: < bgneal@0: bgneal@0: *'g:ctrlp_follow_symlinks'* bgneal@0: Set this to 1 to follow symbolic links when listing files: > bgneal@0: let g:ctrlp_follow_symlinks = 0 bgneal@0: < bgneal@0: bgneal@0: *'g:ctrlp_lazy_update'* bgneal@0: Set this to 1 to enable the lazy-update feature: only update the match window bgneal@0: after typing’s been stopped for a certain amount of time: > bgneal@0: let g:ctrlp_lazy_update = 0 bgneal@0: < bgneal@0: If is 1, update after 250ms. If bigger than 1, the number will be used as the bgneal@0: delay time in milliseconds. bgneal@0: bgneal@0: *'g:ctrlp_use_migemo'* bgneal@0: Set this to 1 to use Migemo Pattern for Japanese filenames. Migemo Search only bgneal@0: works in |regexp| mode. To split the pattern, separate words with space: > bgneal@0: let g:ctrlp_use_migemo = 0 bgneal@0: < bgneal@0: bgneal@0: =============================================================================== bgneal@0: 3. Commands *ctrlp-commands* bgneal@0: bgneal@0: *:CtrlP* bgneal@0: :CtrlP [starting-directory] bgneal@0: Open |CtrlP| in find file mode. bgneal@0: bgneal@0: If no argument is given, the value of |g:ctrlp_working_path_mode| will be bgneal@0: used to determine the starting directory. bgneal@0: You can use to auto-complete the [starting-directory] when typing it. bgneal@0: bgneal@0: *:CtrlPBuffer* bgneal@0: :CtrlPBuffer bgneal@0: Open |CtrlP| in find buffer mode. bgneal@0: bgneal@0: *:CtrlPMRU* bgneal@0: :CtrlPMRU bgneal@0: Open |CtrlP| in find Most-Recently-Used file mode. bgneal@0: bgneal@0: *:ClearCtrlPCache* bgneal@0: :ClearCtrlPCache bgneal@0: Flush the cache for the current working directory. The same as pressing bgneal@0: inside |CtrlP|. bgneal@0: bgneal@0: *:ClearAllCtrlPCaches* bgneal@0: :ClearAllCtrlPCaches bgneal@0: Delete all the cache files saved in |ctrlp_cache_dir|. bgneal@0: bgneal@0: *:ResetCtrlP* bgneal@0: :ResetCtrlP bgneal@0: Reset all options, take in new values of the option variables in section 2. bgneal@0: bgneal@0: ------------------------------------------------------------------------------- bgneal@0: The following commands ignore the current value of |g:ctrlp_working_path_mode|: bgneal@0: bgneal@0: :CtrlPCurWD *:CtrlPCurWD* bgneal@0: This acts like |:CtrlP| with |path_mode| = 0 bgneal@0: bgneal@0: :CtrlPCurFile *:CtrlPCurFile* bgneal@0: This acts like |:CtrlP| with |path_mode| = 1 bgneal@0: bgneal@0: :CtrlPRoot *:CtrlPRoot* bgneal@0: This acts like |:CtrlP| with |path_mode| = 2 bgneal@0: bgneal@0: =============================================================================== bgneal@0: 4. Mappings *ctrlp-mappings* bgneal@0: bgneal@0: *'ctrlp-'* bgneal@0: bgneal@0: Default |Normal| mode mapping to open the |CtrlP| prompt in find file mode. bgneal@0: bgneal@0: Once inside the prompt:~ bgneal@0: bgneal@0: *'ctrlp-fullregexp'* bgneal@0: Toggle between the string mode (section 5.a & b) and full |regexp| mode. bgneal@0: (note: in full |regexp| mode, the prompt’s base is 'r>>' instead of '>>>') bgneal@0: bgneal@0: See also |input-formats| and |g:ctrlp_regexp_search|. bgneal@0: bgneal@0: bgneal@0: Toggle between full path search and filename only search. bgneal@0: (note: in filename mode, the prompt’s base is '>d>' instead of '>>>') bgneal@0: bgneal@0: , 'forward' bgneal@0: bgneal@0: Scroll to the 'next' search mode in the sequence. bgneal@0: bgneal@0: , 'backward' bgneal@0: bgneal@0: Scroll to the 'previous' search mode in the sequence. bgneal@0: bgneal@0: bgneal@0: Toggle the focus between the match window and the prompt. bgneal@0: bgneal@0: , bgneal@0: bgneal@0: Move selection down bgneal@0: bgneal@0: , bgneal@0: bgneal@0: Move selection up bgneal@0: bgneal@0: bgneal@0: Move the cursor to the 'start' of the prompt bgneal@0: bgneal@0: bgneal@0: Move the cursor to the 'end' of the prompt bgneal@0: bgneal@0: , bgneal@0: bgneal@0: Move the cursor one character to the 'left' bgneal@0: bgneal@0: , bgneal@0: bgneal@0: Move the cursor one character to the 'right' bgneal@0: bgneal@0: bgneal@0: Delete a preceding inner word bgneal@0: bgneal@0: bgneal@0: Clear the input field bgneal@0: bgneal@0: bgneal@0: Open selected file in the active window if possible. bgneal@0: bgneal@0: bgneal@0: Open selected file in a new 'tab' bgneal@0: bgneal@0: bgneal@0: Open selected file in a 'vertical' split bgneal@0: bgneal@0: , bgneal@0: , bgneal@0: bgneal@0: Open selected file in a 'horizontal' split bgneal@0: bgneal@0: bgneal@0: Create a new file and its parent directories. bgneal@0: bgneal@0: bgneal@0: Next string in the prompt’s history bgneal@0: bgneal@0: bgneal@0: Previous string in the prompt’s history bgneal@0: bgneal@0: bgneal@0: Mark/unmark a file to be opened with . bgneal@0: bgneal@0: bgneal@0: Open files marked by . bgneal@0: bgneal@0: bgneal@0: - Refresh the match window and purge the cache for the current directory. bgneal@0: - Remove deleted files from MRU list. bgneal@0: bgneal@0: bgneal@0: Clear MRU list. bgneal@0: bgneal@0: , bgneal@0: , bgneal@0: bgneal@0: Exit |CtrlP|. can also be used to stop the file scan. bgneal@0: bgneal@0: Choose your own mappings with |g:ctrlp_prompt_mappings|. bgneal@0: bgneal@0: When inside the match window (press to switch):~ bgneal@0: bgneal@0: a-z bgneal@0: 0-9 bgneal@0: ~^-=;`',.+!@#$%&_(){}[] bgneal@0: Cycle through the lines with the first letter (of paths or filenames) that bgneal@0: matches that key. bgneal@0: bgneal@0: =============================================================================== bgneal@0: 5. Input Formats *ctrlp-input-formats* bgneal@0: bgneal@0: Formats for inputting in the prompt:~ bgneal@0: bgneal@0: a) Simple string. bgneal@0: e.g. 'abc' is understood internally as 'a[^a]\{-}b[^b]\{-}c' bgneal@0: bgneal@0: b) Vim |regexp|. If the input string contains '*' or '|', it’ll be treated as bgneal@0: a Vim’s |regexp| |pattern| without any modification. bgneal@0: e.g. 'abc\d*efg' will be read as 'abc\d*efg'. bgneal@0: bgneal@0: See also |ctrlp-fullregexp| (key map) and |g:ctrlp_regexp_search| (option). bgneal@0: bgneal@0: c) End the string with a colon ':' followed by a Vim command to execute that bgneal@0: command after opening the file. If you need to use ':' in the command, bgneal@0: escape it with a backslash: '\:'. bgneal@0: e.g. 'abc:45' will open the selected file and jump to line 45. bgneal@0: 'abc:/my\:function' will open the selected file and jump to the first bgneal@0: instance of 'my:function'. bgneal@0: 'abc:+setf\ myfiletype|50' will open the selected file and set its bgneal@0: filetype to 'myfiletype' then jump to line 50. bgneal@0: bgneal@0: See also Vim’s |++opt| and |+cmd|. bgneal@0: bgneal@0: d) Type exactly two dots '..' at the start of the prompt and press enter to go bgneal@0: backward in the directory tree by 1 level. If the parent directory is bgneal@0: large, this might be slow. bgneal@0: bgneal@3: e) Similarly, submit '/' or '\' to find and go to the project’s root. If the bgneal@0: project is large, using a VCS listing command to look for files might help bgneal@0: speeding up the intial scan (see |g:ctrlp_user_command| for more details). bgneal@0: bgneal@0: f) Type the name of a non-existent file and press to create it. bgneal@0: e.g. 'parentdir/file.txt' will create a directory named 'parentdir' as well bgneal@0: as 'file.txt'. bgneal@0: Use '\' in place of '/' on Windows (if |'ssl'| is not set). bgneal@0: bgneal@0: g) Submit ? to open this help file. bgneal@0: bgneal@0: =============================================================================== bgneal@0: 6. Extensions *g:ctrlp-extensions* bgneal@0: bgneal@0: Extensions are optional. To enable an extension, add its name to the variable bgneal@0: g:ctrlp_extensions: > bgneal@3: let g:ctrlp_extensions = ['tag', 'buffertag', 'quickfix', 'dir'] bgneal@0: < bgneal@0: The order of the items will be the order they appear on the statusline and when bgneal@0: using , . bgneal@0: bgneal@0: Available extensions:~ bgneal@0: bgneal@0: *:CtrlPTag* bgneal@0: * Tag mode:~ bgneal@0: - Name: 'tag' bgneal@0: - Command: ':CtrlPTag' bgneal@0: - Search for a tag within a generated central tags file, and jump to the bgneal@0: definition. Use the Vim’s option |'tags'| to specify the names and the bgneal@0: locations of the tags file(s). Example: `set tags+=tags/help,doc/tags` bgneal@0: bgneal@3: *:CtrlPBufTag* bgneal@3: * Buffer Tag mode:~ bgneal@3: - Name: 'buffertag' bgneal@3: - Command: ':CtrlPBufTag' bgneal@3: - Search for a tag within the current buffer and jump to the definition. bgneal@3: Requires |exuberant_ctags|. bgneal@3: bgneal@0: *:CtrlPQuickfix* bgneal@0: * Quickfix mode:~ bgneal@0: - Name: 'quickfix' bgneal@0: - Command: ':CtrlPQuickfix' bgneal@0: - Search for an entry in the current quickfix errors and jump to it. bgneal@0: bgneal@0: *:CtrlPDir* bgneal@0: * Directory mode:~ bgneal@0: - Name: 'dir' bgneal@0: - Command: ':CtrlPDir' bgneal@0: - Search for a directory and change the working directory to it. bgneal@0: - Mappings: bgneal@0: + change the local working directory for |CtrlP| and keep it open. bgneal@0: + change the global working directory (exit). bgneal@0: + change the local working directory for the current window (exit). bgneal@0: + change the global working directory to |CtrlP|’s current local bgneal@0: working directory (exit). bgneal@0: bgneal@3: ------------------------------------------------------------------------------- bgneal@3: Buffer Tag mode options:~ bgneal@3: bgneal@3: *'g:ctrlp_buftag_ctags_bin'* bgneal@3: If ctags isn’t in your $PATH, use this to set its location: > bgneal@3: let g:ctrlp_buftag_ctags_bin = '' bgneal@3: < bgneal@3: bgneal@3: *'g:ctrlp_buftag_systemenc'* bgneal@3: Match this with your OS’s encoding (not Vim’s). The default value mirrors Vim’s bgneal@3: global |'encoding'| option: > bgneal@3: let g:ctrlp_buftag_systemenc = &encoding bgneal@3: < bgneal@3: bgneal@3: *'g:ctrlp_buftag_types'* bgneal@3: Use this to set the arguments for ctags, jsctags... for a given filetype: > bgneal@3: let g:ctrlp_buftag_types = '' bgneal@3: < bgneal@3: Examples: > bgneal@3: let g:ctrlp_buftag_types = { bgneal@3: \ 'erlang' : '--language-force=erlang --erlang-types=drmf', bgneal@3: \ 'javascript' : { bgneal@3: \ 'bin': 'jsctags', bgneal@3: \ 'args': '-f -', bgneal@3: \ }, bgneal@3: \ } bgneal@3: < bgneal@3: bgneal@0: =============================================================================== bgneal@0: EXTENDING *ctrlp-extending* bgneal@0: bgneal@0: Extending |CtrlP| is very simple. Simply create a vim file following a short bgneal@0: guidelines, place it in autoload/ctrlp/ and add its name to your .vimrc. bgneal@0: bgneal@0: To see how it works, get the sample.vim from the extensions branch on the main bgneal@0: git repository (https://github.com/kien/ctrlp.vim/tree/extensions), and place bgneal@0: it along with the parent directories somewhere in your runtimepath. Then put bgneal@0: this into your .vimrc: > bgneal@0: let g:ctrlp_extensions = ['sample'] bgneal@0: < bgneal@0: A new search type will show up the next time you open |CtrlP|. bgneal@0: bgneal@0: For more details, check out the comments inside sample.vim.~ bgneal@0: bgneal@0: =============================================================================== bgneal@0: CREDITS *ctrlp-credits* bgneal@0: bgneal@0: Developed by Kien Nguyen , initially based on the Command-T bgneal@0: and the LustyExplorer plugins. No code was taken from these plugins, but I did bgneal@0: clone the majority of their (awesome) interfaces and the way they work. bgneal@0: bgneal@0: This was originally written as a module for a would-be larger plugin called bgneal@0: AutoDoc.vim which I’ve stopped developing because of lost of interest. I really bgneal@0: liked the way Command-T and LustyExplorer deal with user’s input, so I wrote a bgneal@0: pure Vimscript version of their prompt window, intended to use it for the bgneal@0: aforementioned plugin. bgneal@0: bgneal@0: Homepage: http://kien.github.com/ctrlp.vim bgneal@0: Git repository: https://github.com/kien/ctrlp.vim bgneal@0: Mercurial repository: https://bitbucket.org/kien/ctrlp.vim bgneal@0: bgneal@0: =============================================================================== bgneal@0: THANKS *ctrlp-thanks* bgneal@0: bgneal@0: Thanks to everyone that has submitted ideas, bug reports or helped debugging on bgneal@0: gibhub, bitbucket, and through email. bgneal@0: bgneal@0: Special thanks:~ bgneal@0: bgneal@0: * Woojong Koh bgneal@0: Forked and suggested the support for VCS listing commands. bgneal@0: bgneal@0: * Yasuhiro Matsumoto bgneal@0: Added option to use Migemo for Japanese language. bgneal@0: bgneal@0: =============================================================================== bgneal@0: CHANGELOG *ctrlp-changelog* bgneal@0: bgneal@3: + New feature: Buffer Tag extension. bgneal@3: + New command: |:CtrlPBufTag|. bgneal@3: + New options: |g:ctrlp_cmd|, bgneal@3: |g:ctrlp_custom_ignore| bgneal@3: bgneal@0: Before 2011/11/30~ bgneal@0: bgneal@0: + New features: Tag, Quickfix and Directory extensions. bgneal@0: + New commands: |:CtrlPTag|, |:CtrlPQuickfix|, |:CtrlPDir|. bgneal@0: + New options: |g:ctrlp_use_migemo|, bgneal@0: |g:ctrlp_lazy_update|, bgneal@0: |g:ctrlp_follow_symlinks| bgneal@0: bgneal@0: Before 2011/11/13~ bgneal@0: bgneal@0: + New special input: '/' and '\' find root (section 5.e) bgneal@0: + Remove ctrlp#SetWorkingPath(). bgneal@0: + Remove |g:ctrlp_mru_files|, make MRU permanent. bgneal@0: + Extend |g:ctrlp_open_multi|, add new ways to open files. bgneal@0: + New option: |g:ctrlp_dont_split|, bgneal@0: |g:ctrlp_mruf_case_sensitive| bgneal@0: bgneal@0: Before 2011/10/30~ bgneal@0: bgneal@0: + New feature: Support for custom extensions. bgneal@0: also removes non-existent files from MRU list. bgneal@0: + New option: |g:ctrlp_jump_to_buffer| bgneal@0: bgneal@0: Before 2011/10/12~ bgneal@0: bgneal@0: + New features: Open multiple files. bgneal@0: Pass Vim’s |++opt| and |+cmd| to the opening file bgneal@0: (section 5.c) bgneal@0: Auto-complete each dir for |:CtrlP| [starting-directory] bgneal@0: + New mappings: mark/unmark a file to be opened with . bgneal@0: open all marked files. bgneal@0: + New option: |g:ctrlp_open_multi| bgneal@0: + Remove |g:ctrlp_persistent_input|, |g:ctrlp_live_update| and . bgneal@0: bgneal@0: Before 2011/09/29~ bgneal@0: bgneal@0: + New mappings: , next/prev string in the input history. bgneal@0: create a new file and its parent dirs. bgneal@0: + New options: |g:ctrlp_open_new_file|, bgneal@0: |g:ctrlp_max_history| bgneal@0: + Added a new open-in-horizontal-split mapping: bgneal@0: bgneal@0: Before 2011/09/19~ bgneal@0: bgneal@0: + New command: |ResetCtrlP| bgneal@0: + New options: |g:ctrlp_max_files|, bgneal@0: |g:ctrlp_max_depth|, bgneal@0: |g:ctrlp_live_update| bgneal@0: + New mapping: bgneal@0: bgneal@0: Before 2011/09/12~ bgneal@0: bgneal@0: + Ability to cycle through matched lines in the match window. bgneal@0: + Extend the behavior of |g:ctrlp_persistent_input| bgneal@0: + Extend the behavior of |:CtrlP| bgneal@0: + New options: |g:ctrlp_dotfiles|, bgneal@0: |g:ctrlp_clear_cache_on_exit|, bgneal@0: |g:ctrlp_highlight_match|, bgneal@0: |g:ctrlp_user_command| bgneal@0: + New special input: '..' (section 5.d) bgneal@0: + New mapping: . bgneal@0: + New commands: |:CtrlPCurWD|, bgneal@0: |:CtrlPCurFile|, bgneal@0: |:CtrlPRoot| bgneal@0: bgneal@0: + New feature: Search in most recently used (MRU) files bgneal@0: + New mapping: . bgneal@0: + Extended the behavior of . bgneal@0: + New options: |g:ctrlp_mru_files|, bgneal@0: |g:ctrlp_mruf_max|, bgneal@0: |g:ctrlp_mruf_exclude|, bgneal@0: |g:ctrlp_mruf_include| bgneal@0: + New command: |:CtrlPMRUFiles| bgneal@0: bgneal@0: First public release: 2011/09/06~ bgneal@0: bgneal@0: =============================================================================== bgneal@0: vim:ft=help:et:ts=2:sw=2:sts=2:norl