Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Note to self: Reminder of how to make paste & indent the default in sublime text 2 -- for future reference

Paste & Indent (Sublime Text 2)

To make "Paste & Indent" the default behavior in Sublime Text 2:

  1. CMD+SHIFT+P
  2. Type "key bindings"
  3. Choose "Key Bindings - User"
  4. Add the following:
	// swap the keybindings for paste and paste_and_indent
	// (see https://gist.github.com/twosixcode/1988097)
	{ "keys": ["super+v"], "command": "paste_and_indent" },
	{ "keys": ["super+shift+v"], "command": "paste" }

See also https://gist.github.com/twosixcode/1988097 (Thanks @twosixcode)

@mikermcneil

This comment has been minimized.

Copy link
Owner Author

@mikermcneil mikermcneil commented May 21, 2021

All key bindings I tend to use: (updated as of Q2 2021)

[
	{ "keys": ["ctrl+w"], "command": "toggle_setting", "args": {"setting": "word_wrap"}},

	{ "keys": ["super+v"], "command": "paste_and_indent" },
	{ "keys": ["super+shift+v"], "command": "paste" },

	{ "keys": ["ctrl+super+right"], "command": "indent" },
	{ "keys": ["ctrl+super+left"], "command": "unindent" }
]

@mikermcneil

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment