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
import sys | |
try: | |
from tkinter import Tk | |
except ImportError: | |
from Tkinter import Tk | |
r = Tk() | |
r.withdraw() | |
r.clipboard_clear() | |
r.clipboard_append(sys.version) |
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
"user-defined command for use with UltiSnips to view snippet definition | |
command! -complete=custom,ListSnippets -nargs=1 Snipe call ViewSnippet(<q-args>) | |
function! ViewSnippet(word) | |
"you have to call this function to populate `g:current_ulti_dict_info` with | |
"information about the available snippets | |
call UltiSnips#SnippetsInCurrentScope(1) | |
let dict = g:current_ulti_dict_info | |
if has_key(dict, a:word) | |
let matches = matchlist(dict[a:word].location, '\v(.*):(\d+)') |