I wrote a lengthy code block and was wondering if there is a simple way to "split" it where I want.
For example, place the cursor/mouse half way down and press.... (?) and the code block would split into two code blocks.
Hi @eli and welcome to the community.
There might be an app in the marketplace with that feature, there are many that specialize in offering a better code macro experience.
Within the Confluence tooling, you can't do that.
Having said that, you can use two Expand macros and place a code bloc with 1/2 of the code in each.
Simply name your Expands like 'code sample part 1' and 'code sample part 2' to achieve the similar effect.
Sure, you need to split the code manually but you'll also make the page more palatable.
I use this trick when I have two or more code samples doing the same thing for different languages. So my expands are called like Java, Python, C++ etc.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.