Skip to content

Instantly share code, notes, and snippets.

View mfojtik's full-sized avatar

Michal Fojtik mfojtik

View GitHub Profile
else
let url = s:GistPost(user, token, content, private)
endif
endif
if len(url) > 0
if g:gist_open_browser_after_post
echo a:line2
call append(line('.'), "")
call app
if editpost == 1
let url = s:GistUpdate(user, token, content, gistid, gistnm)
elseif deletepost == 1
call s:GistDelete(user, token, gistid)
else
let url = s:GistPost(user, token, content, private)
endif
rl = s:GistPost(user, token, content, private)
endif
endif
if len(url) > 0
if g:gist_open_browser_after_post
call append(a:line2, "# ".url)
endif
if g:gist_put_url_to_clipboard_after_post > 0
if g:gist_put_url_to_clipboard_after_post == 2
let url = url . "\n"
def check_capability(backend)
if !has_capability?(backend)
raise Failure.new(capability, "#{capability} capability not supported by backend #{backend.class.name}")
end
end
let winwidth = winwidth(".")
if winnr("$")==#1
let winwidth = g:NERDTreeWinSize
endif
def has_capability?(backend)
!capability or backend.has_capability?(capability)
end
def has_capability?(backend)
!capability or backend.has_capability?(capability)
end
UNITS = {
:memory => "MB",
:storage => "GB",
:architecture => "label",
:cpu => "count"
}
def self.unit(name)
UNITS[name]
end
def self.unit(name)
UNITS[name]
end