Skip to content

won't allow } if braces are unbalanced #69

@mmikeww

Description

@mmikeww

Sometimes you want to put an if-condition around a statement:

function()
{
   statement
}

You want it to look like this:

function()
{
   if (condition)
   {
      statement
   }
}

So you add the if line above the statement, then press enter and you type {. vim-smartinput will auto close the closing } which you then delete. Then you go underneath the statement and try to add the } but smartinput will not allow you to type it, thinking that you are already trying to type the matching outer brace.

Suppose this file, with the cursor indicated by #, type } and it will not input

function()
{
   if (condition)
   {
      statement
   #
}

Is there an easier way to do this that I'm not understanding?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions