convert entire line without selection

master
Totem4 Totem4 4 years ago
parent 6fe44cbb93
commit e753504d3d

@ -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
try:
replace_selected_text(text2dec(get_selected_text())) replace_selected_text(text2dec(get_selected_text()))
except TypeError:
dec_line()
EOL EOL
endfun! endfun!

Loading…
Cancel
Save