ubuntu 16.04 gedit 配置
2016-12-28 23:01
190 查看
ubuntu 16.04 gedit 配置
1. 功能说明
说明:1. 配置使用gedit调用python工具 调用终端显示python运行结果
2. 配置使用gedit调用终端 显示shell运行结果
3. 配置使用gedit编辑markdown文件,同时在firefox 中预览markdown文本
4. 其它配置可以按照同样方法,通过文件扩展名判断文件类型,并调用相应工具实现需要功能
2. 配置步骤
(1)通过 编辑->首选项->插件 安装外部工具:(2) 通过 工具-> ManageExternalTools 新建一个shell脚本命令
点击左下角 “+” 创建新的功能脚本 –>输入名称 –>输入shell脚本(可从下面复制粘贴) —> 输入快捷键
3. 外部插件的shell脚本
#!/bin/sh fullname=$GEDIT_CURRENT_DOCUMENT_NAME dir=$GEDIT_CURRENT_DOCUMENT_DIR name=`echo $fullname | cut -d. -f1` type=`echo $fullname | cut -d. -f2` if [ $type = "py" ] ;then echo "run $fullname:>>\n" gnome-terminal --hide-menubar --working-directory=$dir "Terminal-$name" -x bash -c "python $fullname echo;echo 'press ENTER to continue';read" elif [ $type = "sh" ] ;then echo "run $fullname:>>\n" gnome-terminal --hide-menubar --working-directory=$dir "Terminal-$name" -x bash -c "./$fullname echo; echo 'press ENTER to continue';read" elif [ $type = "md" ] ;then echo " view $fullname in firefox>>" firefox $fullname fi
4. 效果
运行python创建一个新文件,命名为test.py 编辑好内容后,直接按住 ctrl+F11 在下方toolOutput 中显示运行结果
运行shell
创建一个新文件,命名为hello.sh 编辑好内容后,直接按住 ctrl+F11 在下方toolOutput 中显示运行结果
firefox 浏览器中预览markdown文件
创建一个新文件,命名为test.md 编辑好内容后,直接按住 ctrl+F11 在下方toolOutput 中显示运行结果
火狐浏览器预览效果
相关文章推荐
- ubuntu下eclipse及Gedit中文乱码问题解决,配置GB18030编码
- 大自然的搬运工:Ubuntu环境下gedit的一些个简单配置
- Ubuntu 16.04 64位中文版 配置 LAMP+phpMyAdmin PHP(7.0)开发环境
- Ubuntu16.04系统下CUDA7.5配置Caffe教程
- Ubuntu16.04配置Hbase-1.2.1伪/全分布式环境
- ubuntu下eclipse及Gedit中文乱码问题解决,配置GB18030编码
- Caffe学习(1):Ubuntu16.04上Caffe配置安装(Only CPU)
- ubuntu-16.04中浏览器的配置-字体调整和flash播放器的安装
- Ubuntu 16.04系统下配置cocos2dx-3.10
- Ubuntu 16.04 配置ipv6源
- ubuntu16.04 jdk环境变量配置和安装android studio
- Ubuntu 16.04配置JDK1.8.0_77教程
- Win7下安装Ubuntu16.04以及Ubuntu配置Android环境
- Ubuntu 16.04 配置中文输入法
- ubuntu 12.04里的 gedit 中文乱码 问题解决,要用dconf-editor配置
- ubuntu16.04下安装wireshark(以及配置非root)
- 如何配置Ubuntu 16.04 GRUB 2引导加载程序
- Ubuntu 16.04配置OpenCV 3.1.0 for Java
- ubuntu16.04 jdk1.6.0_45配置