Skip to content

Instantly share code, notes, and snippets.

@olov
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save olov/8913629 to your computer and use it in GitHub Desktop.
Save olov/8913629 to your computer and use it in GitHub Desktop.
// let's begin with this function. f() was previously commented out using Cmd--
function context() {
if (foo) {
// f();
g();
}
}
// we remove the if-statement and let its block run unconditionally instead.
// Cmd-x to delete leading and trailing line, CmdAlt-I to reindent the two remaining one by one:
function context() {
// f();
g();
}
// if the two remaining are reindented both at the same time, the result is this instead:
function context() {
// f();
g();
}
// but this is what i want and end up doing manually:
function context() {
// f();
g();
}
@prigara
Copy link

prigara commented Feb 10, 2014

Hello! So you want there to be the same number of spaces between // and f() as before g(), right?
You know that in both cases if you uncomment that line you'll have to auto-indent the code again to get the right formatting? Sorry for all the questions, I'm just a bit confused why you prefer that way of indentation.

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