For example, in a test class, in a nested function, the bracket does not carry over to its definition. How to add this feature?

To auto add a closing bracket I use electric pair mode;

class test{ fuction helloWorld(){ echo"hello world"; } } 

but you need:

 class test{ fuction helloWorld(){ echo"hello world"; } } 

    2 answers 2

    The question is not clear, but I would venture to suggest installing:

     electric-indent-mode 

      Use:

       ;; АВТОЗАКРЫТИЕ!!!!!!!!!!!!!!! (electric-pair-mode 1) ;; автозакрытие {},[],() с переводом курсора внутрь скобок (electric-indent-mode -1) ;; отключить индентацию electric-indent-mod'ом (default in Emacs-24.4) (setq electric-pair-pairs '( (?\" . ?\") (?\{ . ?\}) (?\< . ?\>) ) )