= form_for(@user) do |f|
  - if @user.errors.any?
    #error_explanation
      %h2
        = pluralize(@user.errors.count, "error")
        prohibited this user from being saved:
      %ul
        - @user.errors.full_messages.each do |message|
          %li= message
  -if current_page? edit_user_path
    .input-field
      = f.label :username
      = f.text_field :username
    .input-field
      = f.label :avatar_url, "Enter a url to update your profile picture."
      = f.text_field :avatar_url
  .input-field
    = f.label :email
    = f.text_field :email
  .input-field
    = f.label :password
    = f.password_field :password
  .input-field
    = f.label :password_confirmation
    = f.password_field :password_confirmation
  .actions
    = f.submit

= form_for(@user) do |f|
  - if @user.errors.any?
    #error_explanation
      %h2
        = pluralize(@user.errors.count, "error")
        prohibited this user from being saved:
      %ul
        - @user.errors.full_messages.each do |message|
          %li= message
  - if current_page? edit_user_path
    .input-field
      = f.label :username
      = f.text_field :username
    .input-field
      = f.label :avatar_url, "Enter a url to update your profile picture."
      = f.text_field :avatar_url
  .input-field
    = f.label :email
    = f.text_field :email
  .input-field
    = f.label :password
    = f.password_field :password
  .input-field
    = f.label :password_confirmation
    = f.password_field :password_confirmation
  .actions
    = f.submit

Add space before the if statement
Add space before the if statement
