Ubuntu16.04 atom : Could not find 'uncrustify'. The program may not be installed.

来源:互联网 发布:linux svn 上传文件 编辑:程序博客网 时间:2024/06/04 18:49

atom : Could not find ‘uncrustify’. The program may not be installed.

  • atom Could not find uncrustify The program may not be installed
      • 我猜测可能是ubuntu安装的uncrustify版本太旧了
      • 不过还有快捷键问题

sudo apt install linuxbrew-wrapper brew install homebrew/php/php-cs-fixer

Warning: /home/farfood/.linuxbrew/bin is not in your PATH. 结果是

==> Installing php-cs-fixer from homebrew/phpError: undefined method `rebuild' for #<BottleSpecification:0x0000000228e180>Please report this bug:    https://github.com/Linuxbrew/linuxbrew/blob/master/share/doc/homebrew/Troubleshooting.md#troubleshooting

sudo apt-get install uncrustify

问题还是没有解决:在atom中运行beautify还是出现了如下错误

Parsing: /tmp/input1161122-11997-c8z7uo.scb10dx6r as language CPP /tmp/input1161122-11997-c8z7uo.scb10dx6r:6 Garbage in col 9: 201c /tmp/input1161122-11997-c8z7uo.scb10dx6r:6 Garbage in col 26: 5c /tmp/input1161122-11997-c8z7uo.scb10dx6r:6 Garbage in col 28: 201d

我猜测可能是ubuntu安装的uncrustify版本太旧了

所以我要去下载一个新的试试。

git clone https://github.com/uncrustify/uncrustify.git

cd uncrustify/

cmake -DCMAKE_BUILD_TYPE=Release

遇到了问题

CMake Error at CMakeLists.txt:6 (message):

  In-source builds are not supported, please remove the `CMakeFiles'  folder and `CMakeCache.txt', and create a folder for the build:  mkdir build; cd build; cmake ..

按照提示删除相应文件,然后输入。

mkdir build cd buildcmke .. -DCMAKE_BUILD_TYPE=Releasemake

which uncrustify
却没有反应

sudo make install[100%] Built target uncrustifyInstall the project...-- Install configuration: "Release"-- Installing: /usr/local/bin/uncrustify-- Installing: /usr/local/share/man/man1/uncrustify.1which uncrustify /usr/local/bin/uncrustify

结果还是出现了一些问题。
我看了看官网文档
把配置加入了~/.uncrustify
(⊙o⊙)…,过了一会就好了

不过还有快捷键问题:

ubuntu16.04按下ctrl-alt-b出现小键盘
那就不能使用atom-beautify的快捷键了。
解决方案
有人说使用fn+ESC就好了。
我试了下,不行,然后找到了下面的:

1. 在搜狗拼音输入法选择设置2. 高级设置3. 高级设置最底部,找到fcitx设置4. 打开fcitx设置,选择Addon选项卡,取消选择虚拟键盘5. 注销或重启电脑

我觉得这样子应该是就可以了。

0 0
原创粉丝点击