小编Coo*_*SRS的帖子

在 VS Code 中一次向上或向下移动多行光标

\n

注意:我在 Google 和其他 SO 帖子中进行了搜索,但没有一个对我有帮助。

\n
\n

我知道我们可以用Alt+向上或向下移动Arrow。有没有办法同时移动 25 条线?我不想按Alt+ \xe2\x86\x9125 次。

\n

是否有插件或内置功能可以执行此操作?

\n

我问的原因是,由于 VS Code 中的相对行号功能,一次移动多行更容易。

\n

我不想指定keybindings.json(如此处所示)中的每个数字。

\n

line-numbers visual-studio-code

15
推荐指数
1
解决办法
8555
查看次数

如何在管道中使用猫

我有以下命令:

httpd.conf | grep AuthUserFile | cut -d" " -f4 | sed -e 's|["'\'']||g' 
Run Code Online (Sandbox Code Playgroud)

其输出是:

/etc/httpd/secure/htpasswd.training
Run Code Online (Sandbox Code Playgroud)

我做了:

httpd.conf | grep AuthUserFile | cut -d" " -f4 | sed -e 's|["'\'']||g'| cat 
Run Code Online (Sandbox Code Playgroud)

然而这刚刚返回:

/etc/httpd/secure/htpasswd.training
Run Code Online (Sandbox Code Playgroud)

我想抓取文件的内容。我该怎么做呢?

unix bash cut pipe cat

8
推荐指数
1
解决办法
2万
查看次数

Java 中的 InterruptedException 是什么?

我在代码中多次看到出现中断异常。我如何解决它?

例子:

for (int i = 0; i < readLimit; i++) {
    if (fileName.exists())
        return readFile(fileName);
        Thread.sleep(1000); // Here is where I get the error
    }
}
Run Code Online (Sandbox Code Playgroud)

java android interrupted-exception

0
推荐指数
1
解决办法
2661
查看次数