Skip to content

Instantly share code, notes, and snippets.

@twosixcode
Created March 6, 2012 18:40
Star You must be signed in to star a gist
Save twosixcode/1988097 to your computer and use it in GitHub Desktop.
Make "Paste and Indent" the default paste in Sublime Text 2
// swap the keybindings for paste and paste_and_indent
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["super+shift+v"], "command": "paste" }
@afuggini
Copy link

Thanks!

@xander-miller
Copy link

Awesome Tip! Tweeted it. Thanks! 👍 😄

@rin
Copy link

rin commented Feb 4, 2015

Thank you!

Here, have a 🍺 .

@pixelbrackets
Copy link

Ah, nice one!

Note/Reminder for Linux & Windows users: use »CTRL« instead of »Super« (OS X) of course

// swap the keybindings for paste and paste_and_indent
{ "keys": ["ctrl+v"], "command": "paste_and_indent" },
{ "keys": ["ctrl+shift+v"], "command": "paste" }

@yberreby
Copy link

Thanks!

@ahnbizcad
Copy link

obviously. should have done this sooner.

This is so much win.

@sepehr
Copy link

sepehr commented Jul 30, 2015

👍

@antonpodolsky
Copy link

really weird decision not make this a default behaviour.
thanks!

@vkrakovna
Copy link

Thanks a lot! This should definitely be the default setting.

@NickWoodhams
Copy link

I have probably wasted an entire week of my life manually indenting. Didn't even know what paste and indent was until today. What a relief!

@bubakazouba
Copy link

wow, why didn't they teach us that in school :'(

@webcaetano
Copy link

Awesome

@tayhalla
Copy link

Been bugging me for over a year... this afternoon finally decided to do something about it and found this. Thanks!

@trjones1
Copy link

Nice!!!

@solepixel
Copy link

Greatest thing since sliced bread!

@digitaldeus
Copy link

Who knew!!!

@ismnoiet
Copy link

Save my day thanks.

@mathiastambjergsteengaard

Two thumbs up!!

@jeffrand
Copy link

@imkost
Copy link

imkost commented Mar 22, 2016

Thank you!

@augnustin
Copy link

Any chance on replacing: swap_line_up by swap_line_up_and_indent?
http://superuser.com/questions/1089928/sublime-text-swap-line-and-indent

@jenlampton
Copy link

👍

@rcanand
Copy link

rcanand commented Jan 22, 2017

👍

@adamwgriffin
Copy link

👍

@SirCameron
Copy link

Dude, you are the King of Town!

@qmclaugh
Copy link

qmclaugh commented Mar 7, 2018

Love it

@andriy-baran
Copy link

👍

@nkn81
Copy link

nkn81 commented Aug 22, 2018

Super Siked !! Works with Sublime Version 3.1.1, Build 3176

@josezulu
Copy link

josezulu commented Mar 1, 2020

Thanks!

@fjarrett
Copy link

This changed my life. I already use super+shift+v for Flycut clipboard history, so mine is:

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

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