4 ms·
Some nice tips. ST was great for me for Python work, but became borderline unusable for me because of one weird thing. In HTML mode it autocompletes snippets ba
by sago 10y ago
Some nice tips. ST was great for me for Python work, but became borderline unusable for me because of one weird thing. In HTML mode it autocompletes snippets based on the empty string.
So typing ">" + Enter or even " " + Enter inserts the <a href=""></a> snippet. So I literally can't insert a newline at the end of any content without hitting escape.
Doesn't seem to happen in other languages. But I couldn't find how or why or how to prevent it. So I gave up. In a related note, I found documentation a bit limited.
- arsham 10y agoHave you tried ctrl+enter ? It makes a new line after the current line regardless of where in the line the cursor is. ctrl+shift+enter creates a line above.
- trishume 10y agoI set my autocomplete/snippet expansion key to tab (it's a Sublime setting) so that I never have any conflicts. Sublime actually tries harder than other editors to avoid these, but it's not perfect. See for example https://github.com/sublimehq/Packages/blob/master/Ruby/Completion%20Rules.tmPreferences https://github.com/sublimehq/Packages/blob/master/Ruby/Compl... which stops it from autocompleting on common end of line keywords in Ruby. This wasn't a default in Emacs so I had to spend a couple of hours figuring out how to do this myself before I could do newlines: https://github.com/syl20bnr/spacemacs/pull/174 https://github.com/syl20bnr/spacemacs/pull/174 I'm not sure there are any editors that have auto-complete on enter but don't have any issues with conflicts.