Created
December 4, 2012 00:42
-
-
Save dyng/4199450 to your computer and use it in GitHub Desktop.
vim光标位置的备份和恢复
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(line_bak, col_bak) = (vim.eval("line('.')"), vim.eval("col('.')")) | |
""" | |
do something | |
""" | |
vim.command("call cursor('{0}', '{1}')".format(line_bak, col_bak)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment