WebStorm:如何上下移动单个行

时间:2018-10-18 13:49:07

标签: webstorm

所以我的代码如下:

export const authConfig = {
  oidc: {
    clientId: "0oa19fzd9fdwFwrSF2p7",
    devClientId: "0oa17vykv1gc7XM1Q2p7",
    issuer: "https://blackboardinsurance.okta.com",
    redirectUri: "/implicit/callback",
    scope: "openid profile email",
  },
};

export const oktaClientId =
  process.env.NODE_ENV === "development"
    ? authConfig.oidc.devClientId
    : authConfig.oidc.clientId;

如果我将光标放在第一行上,然后按映射到“向下移动行”的 Shift + Command +向下箭头,则整个导出语句将向下移动,然后看起来像这样:

export const oktaClientId =
  process.env.NODE_ENV === "development"
    ? authConfig.oidc.devClientId
    : authConfig.oidc.clientId;

export const authConfig = {
  oidc: {
    clientId: "0oa19fzd9fdwFwrSF2p7",
    devClientId: "0oa17vykv1gc7XM1Q2p7",
    issuer: "https://blackboardinsurance.okta.com",
    redirectUri: "/implicit/callback",
    scope: "openid profile email",
  },
};

总有一条线可以将其向下移动吗?还是WebStorm阻止了这种情况的发生?我希望它看起来像这样:

oidc: {
    export const authConfig = {
    clientId: "0oa19fzd9fdwFwrSF2p7",
    devClientId: "0oa17vykv1gc7XM1Q2p7",
    issuer: "https://blackboardinsurance.okta.com",
    redirectUri: "/implicit/callback",
    scope: "openid profile email",
  },
};

1 个答案:

答案 0 :(得分:2)

Shift + Command + down-arrow映射到代码|下移语句操作,该操作应该用于移动语句而不是一行。要移动单个行,请尝试代码|向下移动行-Alt + Shift + down-arrow