Created
August 23, 2022 17:49
-
-
Save abadger/f516f167a572231fa2a8bc5efec70c36 to your computer and use it in GitHub Desktop.
toggle vim for copy and paste (using snake)
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
@snake.key_map("<c-p>", mode=snake.INSERT_MODE) | |
def toggle_gutters_insert(): | |
"""Turn the gutters off in insert mode to make mouse selection easier""" | |
line_no_value = snake.get_option('nu') | |
signcolumn_value = snake.get_option('signcolumn') | |
if signcolumn_value != 'no' or line_no_value != '0': | |
snake.set_option('signcolumn=no') | |
snake.set_option('nonumber') | |
else: | |
snake.set_option('signcolumn=yes') | |
snake.set_option('nu') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment