sublime-text-handle-trailing-space

Ref: Bind shortcut to command palette command?

  1. 使用 sublime 自带的功能 Trim Trailing White Space (cmd+shift+p -> type in “trim” -> enter)

  2. 安装插件 Highlight Trailing Whitespace

  3. 找出清除最后的空格的命令: sublime -> view -> “show console” -> type in “sublime.log_commands(True)” -> cmd+shift+p -> trim -> enter -> record the command -> setup the keybindings

1
2
// sublime -> preference -> keybindings
{ "keys": ["ctrl+shift+t"], "command": "trim_trailing_white_space" }