<p>The soluction for this question is Ripple Edit scripts (<a href="https://aescripts.com/ripple-edit/" rel="nofollow noreferrer">https://aescripts.com/ripple-edit/</a>) with The functionality &quot;Closes the gap betweenlayers sequentially&quot;.</p>

CC BY-SA 4.0
2021-03-24T03:48:57.513Z
2021-03-24T03:48:57.513Z
Ricardo Almeida
<ol>
<li>Select all layers in timeline</li>
<li>Right click on any layers selected and click on &quot;keyframe assistant&quot; then select &quot;sequence layers&quot;</li>
<li>After open &quot;sequence layers window&quot;, just click &quot;OK&quot;</li>
<li>Done!</li>
</ol>

CC BY-SA 4.0
2022-08-29T09:51:23.047Z
2022-08-31T22:27:41.427Z
2022-08-31T22:27:41.427Z
amir azizi from iran
<p>There's a script that does it for you (I just wrote it). You can get it (free, open source, <a href="https://en.wikipedia.org/wiki/WTFPL" rel="noreferrer">WTFPL</a> license) here on <a href="https://blob.pureandapplied.com.au/removing-gaps-in-ae-comps/" rel="noreferrer">my blog</a>. With the playhead in a gap, run the script and it will pull the layers after the gap along so the gap disappears. </p>

<p>BTW all care, no responsibility. It works on my machine, but I've tested it like, twice. Save before using.</p>

CC BY-SA 4.0
2019-01-30T08:28:10.817Z
2019-01-30T08:28:10.817Z
stib
<p>...without having to carefully select everything after the gap, and shift it all up.</p>

<p>All articles/videos I see only talk about  trimming the timeline at the beginning or end, but I can't find anything about cutting out a piece in the middle. </p>

<p>Basically, I want the inverse of <a href="https://m.youtube.com/watch?v=IrPQR7UIVaI" rel="nofollow noreferrer">Trim Comp to Work Area</a>. I want to remove a piece of the full comp in the middle of the timeline.</p>

<p>Is that possible?</p>

CC BY-SA 4.0
2019-01-30T01:35:41.910Z
Sounds like a job for a script. \*fires up VSCode\*
stib
<after-effects><adobe><time>
How to delete a gap in an After Effects timeline
Joseph Silber
# How to delete a gap in an After Effects timeline

(Asked by: username_0 on 2019-01-29)

...without having to carefully select everything after the gap, and shift it all up.

All articles/videos I see only talk about trimming the timeline at the beginning or end, but I can't find anything about cutting out a piece in the middle.

Basically, I want the inverse of [Trim Comp to Work Area](https://m.youtube.com/watch?v=IrPQR7UIVaI). I want to remove a piece of the full comp in the middle of the timeline.

Is that possible?

**Tags:** after-effects, adobe, time

> **Comments:**
> **username_1**: Sounds like a job for a script. \*fires up VSCode\*  

---

## 3 answers

### Answer by username_1 on 2019-01-30. Score: 5 | Accepted answer

There's a script that does it for you (I just wrote it). You can get it (free, open source, [WTFPL](https://en.wikipedia.org/wiki/WTFPL) license) here on [my blog](https://blob.pureandapplied.com.au/removing-gaps-in-ae-comps/). With the playhead in a gap, run the script and it will pull the layers after the gap along so the gap disappears.

BTW all care, no responsibility. It works on my machine, but I've tested it like, twice. Save before using.


---

### Answer by username_2 on 2021-03-24. Score: 2

The soluction for this question is Ripple Edit scripts (<https://aescripts.com/ripple-edit/>) with The functionality "Closes the gap betweenlayers sequentially".


---

### Answer by username_3 on 2022-08-29. Score: 0

1. Select all layers in timeline
2. Right click on any layers selected and click on "keyframe assistant" then select "sequence layers"
3. After open "sequence layers window", just click "OK"
4. Done!


---

