|
|
@ -24,21 +24,24 @@ python3 sys.path.append(vim.eval('expand("<sfile>:h")'))
|
|
|
|
|
|
|
|
|
|
|
|
fun! s:Enc()
|
|
|
|
fun! s:Enc()
|
|
|
|
python3 << EOL
|
|
|
|
python3 << EOL
|
|
|
|
from banana import text2banana,get_selected_text,replace_selected_text
|
|
|
|
from banana import text2banana,get_selected_text,replace_selected_text,enc_line
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
replace_selected_text(text2banana(get_selected_text()))
|
|
|
|
replace_selected_text(text2banana(get_selected_text()))
|
|
|
|
except:
|
|
|
|
except TypeError:
|
|
|
|
print("banana: select the text you want to convert")
|
|
|
|
enc_line()
|
|
|
|
|
|
|
|
|
|
|
|
EOL
|
|
|
|
EOL
|
|
|
|
endfun!
|
|
|
|
endfun!
|
|
|
|
|
|
|
|
|
|
|
|
fun! s:Dec()
|
|
|
|
fun! s:Dec()
|
|
|
|
python3 << EOL
|
|
|
|
python3 << EOL
|
|
|
|
from banana import text2dec,get_selected_text,replace_selected_text
|
|
|
|
from banana import text2dec,get_selected_text,replace_selected_text,dec_line
|
|
|
|
|
|
|
|
|
|
|
|
replace_selected_text(text2dec(get_selected_text()))
|
|
|
|
try:
|
|
|
|
|
|
|
|
replace_selected_text(text2dec(get_selected_text()))
|
|
|
|
|
|
|
|
except TypeError:
|
|
|
|
|
|
|
|
dec_line()
|
|
|
|
|
|
|
|
|
|
|
|
EOL
|
|
|
|
EOL
|
|
|
|
endfun!
|
|
|
|
endfun!
|
|
|
|