Javascript indentation in VIM

前端 未结 7 1016
遇见更好的自我
遇见更好的自我 2021-02-02 15:46

I\'m trying to get VIM to indent Javascript with the \'=\' and related commands. When I try to auto indent the following, for example:

   new function($) {
              


        
7条回答
  •  野的像风
    2021-02-02 16:23

    For me the presence of more than one '(' character before the '{' character on the same line seemed to change the indentation algorithm used by '='. Removing one of the '(' seemed to fix '=' for all parts of the file except other scope regions '{...}' which also had multiple '(' on the opening line.

    I'm using vim 7.4 in lubuntu

提交回复
热议问题