# Insert new line after specific character

**URL:** <https://forum.sublimetext.com/t/insert-new-line-after-specific-character/15190>\
**Category:** Technical Support\
**Created:** [June 2, 2015, 10:40pm UTC](https://forum.sublimetext.com/t/insert-new-line-after-specific-character/15190 "2015-06-02T22:40:46Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![apc](https://forum.sublimetext.com/letter_avatar_proxy/v4/letter/a/9fc29f/32.png) [@apc](https://forum.sublimetext.com/u/apc)\
**Post date:** [June 5, 2015, 2:02am UTC](https://forum.sublimetext.com/t/insert-new-line-after-specific-character/15190/4 "2015-06-05T02:02:09Z")

</div>

OK, I think this seems to work.

```auto
{ "keys": " "],
		"context":  
				{"key": "selector", "operator": "equal", "operand": "text.tex.latex"},
				{"key": "preceding_text", "operator": "regex_match", "operand": "^.*\\.$"}
				],
		"command": "insert", "args": {"characters": " %\n"}
	}
```

I may be about to break something, for all I know. But so far, it does the trick.

---

_[View the full topic](https://forum.sublimetext.com/t/insert-new-line-after-specific-character/15190)._
