Skip to content

Instantly share code, notes, and snippets.

View ryanoasis's full-sized avatar
💻
🏗️ 🔣 🌐 🐚

Ryan L McIntyre ryanoasis

💻
🏗️ 🔣 🌐 🐚
View GitHub Profile
@ryanoasis
ryanoasis / DevIcons-PR238-fix.diff
Last active February 10, 2019 07:12
DevIcons CtrlP issue PR 238
diff --git a/autoload/devicons/plugins/ctrlp.vim b/autoload/devicons/plugins/ctrlp.vim
index fe50746..1ea4898 100644
--- a/autoload/devicons/plugins/ctrlp.vim
+++ b/autoload/devicons/plugins/ctrlp.vim
@@ -1,9 +1,10 @@
" Initialize for up to date ctrlp fork: ctrlpvim/ctrlp.vim
" Support for kien/ctrlp.vim deprecated since v0.7.0
" @TODO implementation for CtrlP buffer and find file mode
+
function! devicons#plugins#ctrlp#init() abort
@ryanoasis
ryanoasis / font-patcher.diff
Last active April 6, 2017 22:11
Nerd Fonts font patcher fixes for v1.1.0 WIP
diff --git a/font-patcher b/font-patcher
index c94b029..6095a9d 100755
--- a/font-patcher
+++ b/font-patcher
@@ -143,20 +143,27 @@ fontname = fontname + additionalFontNameSuffix.replace(" ", "")
# let us try to get the 'style' from the font info in sfnt_names and fallback to the
# parse fontname if it fails:
try:
+ print sourceFont.sfnt_names
# search tuple:
@ryanoasis
ryanoasis / VimDevIcons-PR191-feedback.diff
Last active April 1, 2017 00:10
VimDevIcons Denite integration via PR 191 changes
diff --git a/plugin/webdevicons.vim b/plugin/webdevicons.vim
index 82d4717..da39cb3 100644
--- a/plugin/webdevicons.vim
+++ b/plugin/webdevicons.vim
@@ -539,11 +539,12 @@ function! s:initialize()
call s:initializeCtrlP()
endfunction
-if v:vim_did_enter
- call s:initialize()
@ryanoasis
ryanoasis / ctrlp.vim.diff
Created June 26, 2016 17:42
vim-devicons ctrlp integration option 2
diff --git a/autoload/ctrlp.vim b/autoload/ctrlp.vim
index 04f1aa8..aa2f799 100644
--- a/autoload/ctrlp.vim
+++ b/autoload/ctrlp.vim
@@ -1526,7 +1526,12 @@ endf
" *** Paths {{{2
" Line formatting {{{3
fu! s:formatline(str)
- let str = a:str
+ if exists('*WebDevIconsGetFileTypeSymbol')
@ryanoasis
ryanoasis / ctrlp.vim.diff
Created June 26, 2016 17:41
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)'],
\ }, {
@ryanoasis
ryanoasis / vim-devicons-115-experiment1.vim
Created March 2, 2016 20:42
Experiment to test vim-devicon's custom ctrlp open function changes (solve E16)
" setup
function! s:strip(input)
return substitute(a:input, '^\s*\(.\{-}\)\s*$', '\1', '')
endfunction
" current way:
function! Original115()
let line = ' ~/www/some/big/long/jenky/path/something.something/whatever_it_is/bigUgly/path/too/long/something.vim'
FUNCTION Alternate115()
Called 1 time
Total time: 0.000033
Self time: 0.000019
count total (s) self (s)
1 0.000002 let line = ' ~/www/some/big/long/jenky/path/something.something/whatever_it_is/bigUgly/path/too/long/something.vim'
1 0.000003 let glyphCandidate = char2nr(strpart(line, 0, 3))
@ryanoasis
ryanoasis / font-patcher-wip-#56-plus.diff
Created February 23, 2016 16:23
Nerd Fonts: SubFamily font name and name fixes plus additional improvements (WIP)
diff --git a/font-patcher b/font-patcher
index 57bb42b..4c9c6db 100755
--- a/font-patcher
+++ b/font-patcher
@@ -2,20 +2,31 @@
# coding=utf8
# version: 0.6.0
+version = "0.6.0"
+projectName = "Nerd Fonts"
@ryanoasis
ryanoasis / gist:7be48afae7c700d1a465
Created November 24, 2015 03:21
Vim become slow after update to 0.7.0 #127
--- a/plugin/webdevicons.vim
+++ b/plugin/webdevicons.vim
@@ -4,6 +4,7 @@
" License: see LICENSE
let s:version = '0.7.0'
+let s:operatingsystem = system("uname -s")
" standard fix/safety: line continuation (avoiding side effects) {{{1
"========================================================================