Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

建议替换指南中的vim命令 #8

Open
keyile opened this issue Mar 12, 2019 · 1 comment
Open

建议替换指南中的vim命令 #8

keyile opened this issue Mar 12, 2019 · 1 comment

Comments

@keyile
Copy link

keyile commented Mar 12, 2019

日常/怎么编译 C 程序中,有一条vim printf.c命令,可能会给新人带来困扰:

  1. 有些系统没有预装vim(可能只安装了vi),可能会导致命令不存在错误。
  2. 对于不会编译C程序的新人来说,vim不寻常的操作逻辑可能导致困难。

我给出两个修改建议供参考:

  1. 使用geditnano命令。优点是它们更符合直觉。nano虽然是命令行程序,但也有明确的操作指示。缺点是同样系统可能没有预装,例如KDE等桌面不会预装gedit。
  2. 使用如下的命令:
    touch printf.c # 创建文件
    xdg-open printf.c # 调用默认编辑器
    
    缺点是做法非常规,可能让新人难以理解。

或者使用其他更好的方法。

@910JQK
Copy link
Owner

910JQK commented Apr 16, 2019

其實 editor 並不是重點(重點是 compiler),那一節面向的是「gcc 已經安裝了,怎麽用」這一典型問題,針對慣用 IDE 找不到 GUI 就手足無措的人。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants