Fixed smart indent when pressing Enter inside {} #68

Closed
wants to merge 41 commits into
from

Conversation

Projects
None yet
7 participants

There do seem to be test cases for this, however, this functionality did not work for me in vim 7.3. I attached a fix.

Owner

kana commented Jan 19, 2013

Thank you. I'll review it later.
By the way, there are more than 700 patches to Vim 7.3. Please let me know more details of your Vim version.
And please exclude unrelated commits for the title of the pull request.

atsepkov Tweaked {"Enter"} logic to be bulletproof (will now work in cases when
there is more content on the line after the brackets)
2c1ce15

I'll undo the mduem removal, that was only removed so my vundle could sync to the updated version. As far as vim version, it's the standard one from 'vim' apt-get package in Linux Mint 13:

VIM - Vi IMproved 7.3 (2010 Aug 15, compiled May 4 2012 04:25:35)
Included patches: 1-429
Modified by pkg-vim-maintainers@lists.alioth.debian.org
Compiled by buildd@

dag commented Jun 14, 2013

For me it works as long as I'm using smartinput's <CR> mappings. Except for <C-j>, this is not the case if I load the endwise plugin, regardless of load order: endwise just writes over any existing mappings, but smartinput does not. On the other hand if I load smartinput before supertab, and I don't load endwise, then smartinput breaks the supertab mappings for selecting a completion.

In short, Vim scripting is a mess. Perhaps a "framework" for hooking into things like "hit Enter in Insert mode" without breaking other plugins would be possible and desirable, that then all these addons would use [if installed; could probably fall back to normal mappings].

@atsepkov Are you using any plugin that maps Enter in Insert mode, besides smartinput? What does :imap <CR> say?

faceleg commented Jun 3, 2015

Can this be merged? @kana?

faceleg commented Jun 10, 2015

@kanaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

Senpaaaiiiiiiiiiiiiiii

Shougo commented Jun 11, 2015

@atsepkov You should remove tags file from this PR.

Hey guys, sorry for being slow to respond, have a few other projects I've been working on. By tags, do you mean docs/tags? I think that was there with the original version I forked from, but I have no problem removing it. Also, just wanted to mention, I've made a number of changes in my own fork since the merge request, mainly revolving around better handling of block spacing and indentation and automatic semi-colon/comma addition/removal. That's something the community may or may not want (although judging by comments from other members it sounds like they do).

Shougo commented Jun 29, 2015

I think that was there with the original version I forked from, but I have no problem removing it.

Oh, OK.

@kana ping

suy commented Nov 29, 2015

I'm not sure what it should be done with this pull request, but I think it should be closed and start over. The commits that are sent to this pull request do a lot more than what it was originally intended, have some errors/noise, and in the end just fork the plugin while renaming it.

Agreed, I made this pull request a long time ago. Since then I've tweaked a lot of the library to make it more suitable for my own needs. At this time to pull request is no longer relevant, and I have long forgotten about it.

atsepkov closed this Nov 29, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment