Skip to content

Instantly share code, notes, and snippets.

@ryanoasis
Created June 26, 2016 17:41
Show Gist options
  • Select an option

  • Save ryanoasis/6705561d4f4ab6143ef00b04fe11ed84 to your computer and use it in GitHub Desktop.

Select an option

Save ryanoasis/6705561d4f4ab6143ef00b04fe11ed84 to your computer and use it in GitHub Desktop.
vim-devicons ctrlp integration option 1
diff --git a/autoload/ctrlp.vim b/autoload/ctrlp.vim
index 04f1aa8..0f3a59e 100644
--- a/autoload/ctrlp.vim
+++ b/autoload/ctrlp.vim
@@ -97,6 +97,7 @@ let [s:pref, s:bpref, s:opts, s:new_opts, s:lc_opts] =
\ 'compare_lim': ['s:compare_lim', 3000],
\ 'bufname_mod': ['s:bufname_mod', ':t'],
\ 'bufpath_mod': ['s:bufpath_mod', ':~:.:h'],
+ \ 'formatline_map_string': ['s:formatline_map_string', 's:formatline(v:val)'],
\ }, {
\ 'open_multiple_files': 's:opmul',
\ 'regexp': 's:regexp',
@@ -623,7 +624,7 @@ fu! s:Render(lines, pat)
en
if s:mw_order == 'btt' | cal reverse(lines) | en
let s:lines = copy(lines)
- cal map(lines, 's:formatline(v:val)')
+ cal map(lines, g:ctrlp_formatline_map_string)
cal setline(1, s:offset(lines, height))
cal s:unmarksigns()
cal s:remarksigns()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment