import venom
import vim

from helloworld import append_hello_world


venom.py_fn_to_vim_command("VenomHelloWorld", append_hello_world)

vim.map.nnoremap("<leader>vhw", ":VenomHelloWorld<CR>")
Exemplo n.º 2
0
import venom
import vim

from twoface import toggle_file, open_horizontal, open_vertical, open_tab

venom.py_fn_to_vim_command("TwofaceToggleFile", toggle_file)
venom.py_fn_to_vim_command("TwofaceOpenHorizontal", open_horizontal)
venom.py_fn_to_vim_command("TwofaceOpenVertical", open_vertical)
venom.py_fn_to_vim_command("TwofaceOpenTab", open_tab)

vim.map.nnoremap("<leader>tt", ":TwofaceToggleFile<CR>")
vim.map.nnoremap("<leader>th", ":TwofaceOpenHorizontal<CR>")
vim.map.nnoremap("<leader>tv", ":TwofaceOpenVertical<CR>")
vim.map.nnoremap("<leader>tb", ":TwofaceOpenTab<CR>")
Exemplo n.º 3
0
import venom
import vim

from yankee import lock_paste_register, unlock_paste_register, toggle_lock_register

venom.py_fn_to_vim_command("YankeeLockPasteRegister", lock_paste_register)
venom.py_fn_to_vim_command("YankeeUnlockPasteRegister", unlock_paste_register)
venom.py_fn_to_vim_command("YankeeToggleLockPasteRegister", toggle_lock_register)

vim.map.nnoremap("<leader>yl", ":YankeeLockPasteRegister<CR>")
vim.map.nnoremap("<leader>yu", ":YankeeUnlockPasteRegister<CR>")
vim.map.nnoremap("<leader>yt", ":YankeeToggleLockPasteRegister<CR>")
Exemplo n.º 4
0
import venom
import vim

from mercury import src, dst, execute

venom.py_fn_to_vim_command("MercuryLM", execute.build(src.line, dst.to_message))
venom.py_fn_to_vim_command("MercurySM", execute.build(src.selection, dst.to_message),
                           allow_range=True)
venom.py_fn_to_vim_command("MercuryBM", execute.build(src.buffer, dst.to_message))

venom.py_fn_to_vim_command("MercuryLV", execute.build(src.line, dst.to_vert_split))
venom.py_fn_to_vim_command("MercurySV", execute.build(src.selection, dst.to_vert_split),
                           allow_range=True)
venom.py_fn_to_vim_command("MercuryBV", execute.build(src.buffer, dst.to_vert_split))

venom.py_fn_to_vim_command("MercuryLH", execute.build(src.line, dst.to_hor_split))
venom.py_fn_to_vim_command("MercurySH", execute.build(src.selection, dst.to_hor_split),
                           allow_range=True)
venom.py_fn_to_vim_command("MercuryBH", execute.build(src.buffer, dst.to_hor_split))

venom.py_fn_to_vim_command("MercuryLR", execute.build(src.line, dst.to_register))
venom.py_fn_to_vim_command("MercurySR", execute.build(src.selection, dst.to_register),
                           allow_range=True)
venom.py_fn_to_vim_command("MercuryBR", execute.build(src.buffer, dst.to_register))

venom.py_fn_to_vim_command("MercuryLS", execute.build(src.line, dst.to_selection))
venom.py_fn_to_vim_command("MercurySS", execute.build(src.selection, dst.to_selection),
                           allow_range=True)
venom.py_fn_to_vim_command("MercuryBS", execute.build(src.buffer, dst.to_selection))

if "mercury_no_defaults" in vim.g and vim.g.mercury_no_defaults == "1":