JetBrains系列--工具使用方法
JetBrains系列–工具使用方法
介绍
JetBrains 系列IDE是当前最流行最实用的IDE之一了,笔者根据个人实用情况,将相关使用注意事项记录在此处,以便于后续查阅和学习!具体包括软件的常用方式、技巧,linux 下快捷图标配置。
今后将长期在此基础上对本文进行更新补充,包括相关使用技巧和注意事项!
常用IDE
2.1 IDEA
-
常见命令
Ctrl+Shift+T 跳转所需要的类
Ctrl + Shift + R 找到所需要的文件(全局查找)
Ctrl + shift+alt + N 找到所需要的函数和变量
Ctrl + H 搜索字符串
Ctrl + shift + a–>输入要做的事情
Ctrl +alt+L 格式化代码,或者code->reformat code
Ctrl + D 复制当前行
Ctrl + R 替换快捷键 -
查看类方法
查看 Diagram图形 的类层次结构图 Crtl + Alt + U(mac option+command+U)
Crtl + Alt + U 或 Crtl + Alt + Shift + U
或者右键diagram然后再选择对应选项,如变量、函数等 -
添加常用插件
File->settings->plugins->搜索或者选择需要的插件即可;笔者此处使用Scala 、Interrij Light Theme、EduTools、Kubernetes几个常用插件。 -
python项目配置interpreter
File->Project Structure->Platform Settings->SDKs
->单击+号,选择pythonSDK home path即可添加python interpreter,重启即可生效。 -
显示tab或空格键
- File->Settings->Editor->General->Appearance->选中Show whitespaces和Show indentguides;
- 右下角选中space或者tab->configure indents for …->Tab and Indents->可以选择是否使用tab character;
-
显示类函数变量结构
- view->tool Windows->structure
- alt+7
2.2 pycharm
- 添加Python版本
初次打开项目的时候,没有添加对应的Python版本,则需要手动添加对应版本;
File->Settings->Project:ProjectName->ProjectInterpreter->选中对应Python版本->Apply即可。
2.3 goland
-
Ubuntu 安装卸载go
- 安装方法1
apt install golang-go 卸载: apt-get remove golang-go apt-get remove --auto-remove golang-go
- 安装方法2:
wget https://studygolang.com/dl/golang/go1.12.5.linux-amd64.tar.gz tar -zxvf go1.12.5.linux-amd64.tar.gz mv go /usr/local/ 配置: vim .bashrc export GOROOT=/usr/local/go # 安装目录。 export GOPATH=$HOME/go # 工作环境 export GOBIN=$GOPATH/bin # 可执行文件存放 export PATH=$GOPATH:$GOBIN:$GOROOT/bin:$PATH # 添加PATH路径
- 测试:
go version
参考:ubuntu 安装 golang
GoLand常用快捷键
- 安装方法1
-
常见命令/快捷键
- 显示类函数变量结构
- view->tool Windows->structure
- alt+7
- 格式化代码快捷键
- ctrl+alt+L
- 显示类函数变量结构
-
goland 支持python
需要安装插件 Python Community Edition , 然后新建py文件的时候会提示没有python解释器,按需添加即可 -
go 语言常用文档
2.4 clion
- clion正常使用需要依赖gcc和g++
apt install gcc apt install g++
3 快捷方式
linux 下的快捷方式主要放在 /usr/share/applications目录下,也可以放在用户目录的 .local 文件夹下面; 此处放在更加通用的 /usr/share/applications 目录。
如果系统没有生成对应的快捷图标,直接将该信息copy到指定的位置即可; jetbrains 系列其它产品做法类似,只需要更改可执行脚本、图标、名称即可。
- idea 快捷方式
$ cat idea.desktop
[Desktop Entry]
Name=IDEA
Comment=Code Editing. Redefined.
GenericName=IDEA
Exec=/home/xg/soft/jetbrains/ideaIU-2021.1.2/bin/idea.sh %F
Icon=/home/xg/soft/jetbrains/ideaIU-2021.1.2/bin/idea.png
Type=Application
StartupNotify=false
StartupWMClass=Code
Categories=Utility;TextEditor;Development;IDE;
MimeType=text/plain;inode/directory;application/x-code-workspace;
Actions=new-empty-window;
Keywords=idea;
X-Desktop-File-Install-Version=0.24
[Desktop Action new-empty-window]
Name=IDEA
Exec=/home/xg/soft/jetbrains/ideaIU-2021.1.2/bin/idea.sh %F
Icon=/home/xg/soft/jetbrains/ideaIU-2021.1.2/bin/idea.png
- pycham 快捷方式
$ cat pycharm.desktop
[Desktop Entry]
Name=PC
Comment=Code Editing. Redefined.
GenericName=pycharm
Exec=/home/xg/soft/jetbrains/pycharm-2021.3.1/bin/pycharm.sh %F
Icon=/home/xg/soft/jetbrains/pycharm-2021.3.1/bin/pycharm.png
Type=Application
StartupNotify=false
StartupWMClass=Code
Categories=Utility;TextEditor;Development;IDE;
MimeType=text/plain;inode/directory;application/x-code-workspace;
Actions=new-empty-window;
Keywords=pycharm;
X-Desktop-File-Install-Version=0.24
[Desktop Action new-empty-window]
Name=PC
Exec=/home/xg/soft/jetbrains/pycharm-2021.3.1/bin/pycharm.sh %F
Icon=/home/xg/soft/jetbrains/pycharm-2021.3.1/bin/pycharm.png
- goland 快捷方式
$ cat goland.desktop
[Desktop Entry]
Name=GoLand
Comment=Code Editing. Redefined.
GenericName=GoLand
Exec=/home/xg/soft/jetbrains/goLand-2021.2.2/bin/goland.sh %F
Icon=/home/xg/soft/jetbrains/goLand-2021.2.2/bin/goland.png
Type=Application
StartupNotify=false
StartupWMClass=Code
Categories=Utility;TextEditor;Development;IDE;
MimeType=text/plain;inode/directory;application/x-code-workspace;
Actions=new-empty-window;
Keywords=goland;
X-Desktop-File-Install-Version=0.24
[Desktop Action new-empty-window]
Name=GoLand
Exec=/home/xg/soft/jetbrains/goLand-2021.2.2/bin/goland.sh %F
Icon=/home/xg/soft/jetbrains/goLand-2021.2.2/bin/goland.png
- webstorm 快捷方式
$ cat webstorm.desktop
[Desktop Entry]
Name=WS
Comment=Code Editing. Redefined.
GenericName=webstorm
Exec=/home/xg/soft/jetbrains/webStorm-2021.3.1/bin/webstorm.sh %F
Icon=/home/xg/soft/jetbrains/webStorm-2021.3.1/bin/webstorm.png
Type=Application
StartupNotify=false
StartupWMClass=Code
Categories=Utility;TextEditor;Development;IDE;
MimeType=text/plain;inode/directory;application/x-code-workspace;
Actions=new-empty-window;
Keywords=webstorm;
X-Desktop-File-Install-Version=0.24
[Desktop Action new-empty-window]
Name=IDEA
Exec=/home/xg/soft/jetbrains/webStorm-2021.3.1/bin/webstorm.sh %F
Icon=/home/xg/soft/jetbrains/webStorm-2021.3.1/bin/webstorm.png
4 说明
- 笔者使用Ubuntu1910|debian9.11|Windows10系统测试,有特殊情况会单独备注说明!
- ubuntu 下卸载pycharm、IntelliJIdea、GoLand 方法
cd /home/UserName/.config/JetBrains 删除不需要的文件夹,然后删除解压的安装包即可。
- 参考网址
www.jetbrains.com