加载中...
Ubuntu/Vim/Vscode常用命令
发表于:2023-03-25 | 分类: Linux Ubuntu

Ubuntu/Vim/Vscode常用命令

Ubuntu命令

安装

1
sudo apt install ..

安装.deb文件

1
sudo dpkg -i *.deb

解压
zip

1
unzip *.zip

rar
1
unrar -x *.rar

卸载

1
sudo apt-get --purge remove <package>	

查找文件位置

1
whereis  xxx

查看串口
1
ll /dev/tty*

Vim常用命令

  • i:编辑模式
  • :q:不保存退出
  • :wq:保存退出
  • :!q:强制退出
  • :!wq:强制保存退出
  • esc:退回到命令模式

Vscode常用命令

ctrl+shift+space代码参数提示信息

vscode中的代码提示自定义

设置->用户代码片段->python.json

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{
// Place your snippets for python here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
"Print to console": {
"prefix": "ros2_node_py",
"body": [
"import rclpy",
"from rclpy.node import Node",
"",
"class Mynode(Node):",
" def __init__(self):",
" super().__init__(\"my_node\")",
"",
"def main():",
" rclpy.init()",
" rclpy.spin(Mynode())",
" rclpy.shutdown()",
"",
"",
"if __name__ == \"__main__\":",
" main()"
],
"description": "Log output to console"
}
}
上一篇:
Ubuntu22.04安装ROS2
下一篇:
Ubuntu配置Clash-for-Linux
本文目录
本文目录