Skip to content

Instantly share code, notes, and snippets.

@ryanoasis
Created November 24, 2015 03:21
Show Gist options
  • Select an option

  • Save ryanoasis/7be48afae7c700d1a465 to your computer and use it in GitHub Desktop.

Select an option

Save ryanoasis/7be48afae7c700d1a465 to your computer and use it in GitHub Desktop.
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
"========================================================================
@@ -529,12 +530,11 @@ endfunction
" scope: public
function! WebDevIconsGetFileFormatSymbol(...)
let fileformat = ""
- let operatingsystem = system("uname -s")
if &fileformat == "dos"
let fileformat = "<U+E70F>"
elseif &fileformat == "unix"
- if operatingsystem == "Darwin\n"
+ if s:operatingsystem == "Darwin\n"
let fileformat = "<U+E711>"
else
let fileformat = "<U+E712>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment