This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def check_capability(backend) | |
| if !has_capability?(backend) | |
| raise Failure.new(capability, "#{capability} capability not supported by backend #{backend.class.name}") | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let winwidth = winwidth(".") | |
| if winnr("$")==#1 | |
| let winwidth = g:NERDTreeWinSize | |
| endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def has_capability?(backend) | |
| !capability or backend.has_capability?(capability) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def has_capability?(backend) | |
| !capability or backend.has_capability?(capability) | |
| end | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| UNITS = { | |
| :memory => "MB", | |
| :storage => "GB", | |
| :architecture => "label", | |
| :cpu => "count" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def self.unit(name) | |
| UNITS[name] | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def self.unit(name) | |
| UNITS[name] | |
| end |