Created
October 23, 2019 14:16
-
-
Save anddam/c980e48789aef2b97f1dc4dad30cfc59 to your computer and use it in GitHub Desktop.
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
vis:command_register("sts", function(argv, force, win, selection, range) | |
if vis.win.strip_trailing_spaces then | |
vis:command("x/ +$/ c//<Enter>") | |
vis:command(":x/ +$/ c//<Enter>") | |
vis:command(":x/ +$/ c//<Enter>:w<Enter>") | |
-- vis:map(vis.modes.NORMAL, ';w', ':x/ +$/ c//<Enter>:w<Enter>') vis:info("Line trailing spaces trimmed.") | |
end | |
return true; | |
end, "Strip line trailing spaces") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment