Is there any way to have a second double quotes placed automatically, when I enter the first one in Xcode? There aren't any settings in Xcode regarding placing a second double quote automatically when entering the first one (like in VSCode eg).
Let the autocompletion work.
i.e.Type print then autocomplete to print(items: Any...) then press "
or ^"
take a look at this https://developer.apple.com/library/content/documentation/IDEs/Conceptual/xcode_help-command_shortcuts/TextCmdsByType/TextCmdsByType.html
Related
I just updated my Sublime Text version (Build 4107), and it seems to me a new behaviour appeared - that I would like to avoid.
Whenever I write a colon or comma, the auto-complete popup automatically displays, which is problematic because most of the time in this situation I am about to go to next line by pressing Enter. Thing is, if press Enter, I select now the first occurence of autocomplete instead of going to next line.
I can avoid this by doing "Alt + Enter" or by pressing "Esc" before Enter, but it is not a convenient solution. Is there any way to prevent this autocomplete popup to display afer this particular punctuation signs ?
I read about punctuation.separator scope naming (https://www.sublimetext.com/docs/scope_naming.html#punctuation). But I can't figure out how to use it in auto_complete_foo settings to do what I want.
Example :
Thanks for the help !
If you have a package SublimeCodeIntel, try to disable it, and check the problem is saved or not
It helped me
You can set "auto_complete_when_likely": false, in your user preferences which should prevent this behavior.
VSC allows, to mark one or multiple words and put e.g. brackets around them or "", by simply "writing" (, { or ". I love this feature and I'm missing it in VS 2019. Is there any setting I haven't seen when looking into this?
Thanks!
You can install the Selection Wrapper extension to wrap selected text depending on the key pressed.
My vscode does not automatically close the single and double quotes. I've disabled all extensions, but the problem still persists.
vscodeVersion 1.15.0 (1.15.0)
MAC osx: Version 10.12.6 (16G29)
It's worth noting that vscode has a separate editor setting for auto closing quotes from that of brackets. If you have: "editor.autoClosingQuotes": "never" in your settings, then vscode will never close quotes. On the other hand, if you have "editor.autoClosingQuotes": "always", then it will always add the extra closing quote.
Change your keyboard language to US only instead of US International.
FYI: this is a bug/feature, in that the double quotes auto-close when the cursor has nothing to the right of it. However, when there is something to the right of the cursor, then your only get one quote.
<h1 className="|> <== the closing > on the h1 tag prevents the auto-close.
<h1 className="|" > <== the space to the right allows auto-close to work.
I had a similar issue and came across this link that describes it.
Geany is the closest thing I can find to the perfect web development IDE. However, I can't find a way to automatically close curly brackets ({).
For example, typing:
function test()
{
..and pressing RETURN should cause this to happen:
function test()
{
// cursor ends up here (indented by 1 tab)
}
Is there anything that can make Geany do that?
This is a native feature of Geany,
Go to Preferences, then Completions, down there you can choose which one you want to auto close.
Check here for screenshots
You make something else:
If you want, open https://plugins.geany.org/autoclose.html and see "autoclose" plugin. You can install with :
sudo apt-get install geany-plugins-autoclose
and It is all
That isn't full answer to your question, but may be helpful.
I have Geany not in english, I make translations of menu's fields on my own.
Geany has a feature: when you type special text and press Tab, the text is going to be replaced with another text.
It works by default for if, else, for, while, do, switch and try.
Configuration of this feature is in [Tools]/[Config files]/[snippets.conf].
After doing some changes, save file and click [Tools]/[Reload configuration].
I added two lines to section C++:
class=class %cursor%%block%;\n
struct=struct %cursor%%block%;\n
With block=\s{\n\t%cursor%\n}
It doesn't let you press { Enter or { Tab to get
{
//cursor
}
because {=anything is ignored, I don't know why.
What you can do? You can have some another text, replaced using {\n\t%cursor%\n}, or define keybinding inserting it.
Geany can have user defined snippets. It is possible to open snippet configuration file from menu.
Tools ->
Configuration files ->
snippets.conf
Go to the language block where you want to add that feature.
For example:
[C]
if=if (%cursor%)%block_cursor%
else=else%block_cursor%
for=for (i = 0; i < %cursor%; i++)%block_cursor%
while=while (%cursor%)%block_cursor%
do=do\n{\n\t%cursor%\n} while (%cursor%)\n%cursor%
switch=switch (%cursor%)%brace_open%case %cursor%:\n\t\t%cursor%\n\t\tbreak;\n\tdefault:\n\t\t%cursor%\n%brace_close%%cursor%
At first it can be thought that the problem can be fixed just with adding this line
{=%\n{\n\t%cursor%\n}%
But Geany does not accept that when snippet is one non alphabetic character.
It will work for any other alphabetic character like this
b=%\n{\n\t%cursor%\n}% or bl=%\n{\n\t%cursor%\n}%
However I dont think it is what you want. The real solution you can find from geanys menu.
Edit
->Preferences
->Editor
->Completions
Tick the Auto-close quotes and brackets then click on apply and save
The Auto-close doesn't work if we place brackets inside another pair of brackets. For example, the inner bracket doesn't auto-close.{{|}
However, we can use the following snippet to create a block.
{={\n\t%cursor%\n}
But in order to use this snippet, we first have to include '{' char in our wordchars set by changing the below line in snippets.conf file.
wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789{
is there a way to have Xcode append a closing bracket ")" when I type the opening one "("? I know that it does this for those {}. I really miss Textmate :( A generic way to define which chars should be automatically inserted when the opening ones are entered would be kickass.
In Xcode 3.1 go to Preferences->Indentation
Check Syntax-ware indenting to on
and check Automatically insert closing "}"
and choose the characters you want to be inserted when the opening one is.
Also why not use Textmate nothing stops you and Xcode will notice if a file is edited externally
Have a look under Edit->Insert Text Macro->Objective C->Bracket Expression. This will insert a matched pair of brackets (or if you have something highlighted, put brackets around it). You could bind this to [ as a keyboard shortcut.
You can follow the instructions here to create one for parentheses. I tried but couldn't make it work.
http://cocoawithlove.com/2008/06/hidden-xcode-build-debug-and-template.html#textmacros
Personally, I drag the classes folder over to Textmate and edit there. I switch back to Xcode when I need to type in some long method name, or to build. I've been building a library of snippets for some of the common things I do in Textmate to make life easier there.