Animations - Can you cut them?

I am currently working on a 2D game project and I am running into a few small issues with animation. I am trying to use the Animator to create basic states for the character, states such as Idle, Walking, Running and Jumping. I have managed to do this however I would like to know if it is possible to implement a system what can cut an animation halfway, if you look at this project : Project you will notice how if you tap the arrow keys, the character takes an entire step to the side. I would like to know, is it possible to prevent this, from my experimentation I have found that state conditions are only checked upon starting the animation, while playing it does not check the state conditions to see whether or not it can keep playing.

I am using this script to manage the states :

public class AnimManager : MonoBehaviour 
{
    Animator anim;

    public float fakeinput;

    public float threshold;

    public bool moving;
    public bool left;

    public int movingHash = Animator.StringToHash("Moving");
    public int leftHash = Animator.StringToHash("Left");

    void Start()
    {
        anim = GetComponent<Animator>();
    }

    void Update()
    {
        float move = Input.GetAxis("Horizontal");

        anim.SetFloat("Speed", move);

        //move = fakeinput; // FAKE INPUT FOR EASE OF ANIMATION TESTING

        if (move <= 0.0f + threshold && move >= 0.0f - threshold)
        {
            moving = false;
        }
        else
        {
            moving = true;
        }

        anim.SetBool("Moving", moving);

        anim.SetBool("Left", left);
    }
}

Is it possible for me to cancel or cut / blend back to idle if the animation is playing and the " moving " boolean is marked as false?

Any help would be massively appreciated.

use animation.blend

if(!moving){
animation.Blend("idle",1,0.1)
}

Why don’t you just delete the animation keys?