Question

I'm using the german keyboard layout and so the different brackets (), [], {} are not "fluently" reachable while programming. I tried the US Layout but didn't like it either. So I came up with a solution that worked pretty well for me:

I installed an App called xType which would replace patterns of text. I thought about a character combination that is almost never used and I came up with § which is on "Shift+3" on the german keyboard. I combined this with Shift+1, Shift+2, Shift+3 to access the different brackets.

For example: §! would automatically be replaced with (), §" with [] and §§ with {\n\n\n}. This made my workflow a lot more relaxing and fluently.

BUT: This Software copy and pastes the brackets and so it overwrites my last copy.

So I tried out to use the xCode Codesnippets in this way but they are very slow and don't allow special characters. Is there a way to create fast shortcuts in xCode for snippets you want to access really fast?

Was it helpful?

Solution

After a while I found a solution that works great for me. I bought the app "Dash" on the AppStore and with its built-in snippet functionality it works as I wanted it to.

When the snippets are filled in with this tool, they don't fill my clipboard so I can paste what I wanted to. Furthermore I can put the cursor where I want it to be in the snippets.

So I can make a snippet called §! and it will write to bracket with the cursor within: (@cursor)

And it works really fast.

Edit: Just wanted to make sure I'm not advertising my own app nor am I related to the developers of Dash. It's just the solution that works best for me.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top