Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from neovim import attach
- nvim = attach('child', argv=["/bin/env","nvim","--embed"])
- buffer = nvim.current.buffer
- buffer[0] = 'visual mode'
- nvim.feedkeys("fmve")
- print("Current caret position: {}".format(nvim.windows[0].cursor))
- cmd ='getpos("'<")'
- print("Start of visual selection: {}".format(nvim.eval(cmd)))
- Current caret position: [1,10]
- Start of visual selection: [0,0,0,0]
- Start of visual selection: [1,8,1,11]
Add Comment
Please, Sign In to add comment