‘Ubuntu’+‘Atom’+‘gcc-make-run’更改调试终端为Gnome-terminal
来源:互联网 发布:ubuntu安装datautil 编辑:程序博客网 时间:2024/05/21 15:00
‘Ubuntu’+‘Atom’+‘gcc-make-run’更改调试终端为Gnome-terminal
0、为什么
在Ubuntu下安装了gcc-make-run插件后对C/C++代码编译运行。默认打开的是X-term,很丑而且。。。。。。算了就是很丑。
1、Ubuntu安装Atom
通过PPA安装
sudo add-apt-repository ppa:webupd8team/atom
sudo apt-get update
sudo apt-get install atom
2、相关插件的安装
2.1安装npm
sudo apt-get install npm
2.2命令行安装插件
windows: cd Users/用户名/.atom/package
ubuntu: cd ~/.atom/package
如果package文件夹不存在可以自己新建一个
git clone 插件的github仓库目录cd 克隆下来的插件目录npm install
2.3部分插件github仓库目录
atom-simplified-chinese-menu插件(汉化)
https://github.com/chinakids/atom-simplified-chinese-menu
gcc-make-run插件(C/C++编译插件)
https://github.com/tomlau10/gcc-make-run
linter-gcc插件(C/C++代码风格美化插件)
https://github.com/hebaishi/linter-gcc
linter插件
https://github.com/steelbrain/linter
3、修改配置文件
atom ~/.atom/package/gcc-make-run/lib/gcc-make-run.coffee
修改下列代码对应的部分,没接触过coffeescript,但是根据代码英文字母也能猜出来实际上就是修改when 'linux'...
后面的代码内容。
buildRunCmd: (info) -> # get config mk = atom.config.get('gcc-make-run.make') info.env = _extend({ ARGS: atom.config.get('gcc-make-run.args') }, process.env) if info.useMake switch process.platform when 'win32' then info.cmd = "start \"#{info.exe}\" cmd /c \"\"#{mk}\" -sf \"#{info.base}\" run & pause\"" when 'linux' then info.cmd = "gnome-terminal -t \"#{info.exe}\" -x \"" + @escdq("\"#{mk}\" -sf \"#{info.base}\" run") + "; read -n1 -p 'Press any key to continue...'\"" when 'darwin' then info.cmd = 'osascript -e \'tell application "Terminal" to activate do script "' + @escdq("clear && cd \"#{info.dir}\"; \"#{mk}\" ARGS=\"#{@escdq(info.env.ARGS)}\" -sf \"#{info.base}\" run; " + 'read -n1 -p "Press any key to continue..." && osascript -e "tell application \\"Atom\\" to activate" && osascript -e "do shell script ' + @escdq("\"osascript -e #{@escdq('"tell application \\"Terminal\\" to close windows 0"')} + &> /dev/null &\"") + '"; exit') + '"\'' else # normal run switch process.platform when 'win32' then info.cmd = "start \"#{info.exe}\" cmd /c \"\"#{info.exe}\" #{info.env.ARGS} & pause\"" when 'linux' then info.cmd = "gnome-terminal -x bash -c \"#{info.dir}/#{info.exe} #{info.env.ARGS} ; exec bash\"" when 'darwin' then info.cmd = 'osascript -e \'tell application "Terminal" to activate do script "' + @escdq("clear && cd \"#{info.dir}\"; \"./#{info.exe}\" #{info.env.ARGS}; " + 'read -n1 -p "Press any key to continue..." && osascript -e "tell application \\"Atom\\" to activate" && osascript -e "do shell script ' + @escdq("\"osascript -e #{@escdq('"tell application \\"Terminal\\" to close windows 0"')} + &> /dev/null &\"") + '"; exit') + '"\'' # check if cmd is built return true if info.cmd? atom.notifications.addError('gcc-make-run: Cannot Execute Output', { detail: 'Execution after compiling is not supported on your OS' }) return false
阅读全文
2 0
- ‘Ubuntu’+‘Atom’+‘gcc-make-run’更改调试终端为Gnome-terminal
- Atom利用gcc-make-run编译opencv工程
- Ubuntu下安装codeblocks及使用gnome-terminal终端
- ubuntu下终端(gnome-terminal)快捷键基本使用
- make gnome-terminal simi-transparent
- ubuntu codeblocks 更改调试终端
- GNOME终端(terminal)字体配置
- GNOME终端(terminal)字体配置
- ubuntu下code::blocks更改调试终端
- ubuntu下codeblocks更改调试终端
- Ubuntu下codeblocks更改调试终端
- Ubuntu下CodeBlocks更改调试终端
- ubuntu下codeblocks编译器更改调试终端
- Ubuntu中终端Terminal和GNOME文件管理器nautilus的互通方法及命令
- Linux 在终端中打开新的终端:gnome-terminal
- ubuntu 11.10 的终端 Terminal
- ubuntu终端(terminal)下听歌
- Ubuntu终端Terminal常用快捷键
- 监听器
- caffe openpose vs15
- excel函数总结
- Hadoop系列-MapReduce源码案例分析和编码规范(十)
- OpenStack 查询 Spice 端口
- ‘Ubuntu’+‘Atom’+‘gcc-make-run’更改调试终端为Gnome-terminal
- java事务以及支持事务的数据库
- 浮点型图像本地读写
- Win7下U盘安装Ubuntu14.04双系统步骤详解
- OJ百练
- 2017年5月iOS招人心得答案总结(基础篇)
- 安装VS2017记录
- 修改PHP上传文件的大小限制
- [笔记]删除git远程库中已存在的文件,并且在本地保留