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()
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:
replace_selected_text(text2banana(get_selected_text()))
except:
print("banana: select the text you want to convert")
except TypeError:
enc_line()
EOL
endfun!
fun! s:Dec()
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()))
except TypeError:
dec_line()
EOL
endfun!

Loading…
Cancel
Save