Vim突出显示FORTRAN的怪异部分 [英] Vim highlighting weird parts of FORTRAN

查看:135
本文介绍了Vim突出显示FORTRAN的怪异部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用VIM主题molokai,如果有什么不同的话.

I am using VIM theme molokai, if that makes any difference.

我最近一直在学习FORTRAN,当我使用VIM编写FORTRAN程序时,根据我的空白,我的颜色很奇怪.

I have been learning FORTRAN lately and when I write a FORTRAN program using VIM, I have weird coloring depending on my whitespace.

例如,如果我按原样翻页(不缩进),则仅在单词的一部分上显示此紫色突出显示(有时不显示,请注意打印"和读取").

For instance, if I tab things over as is (no indenting) I have this purple highlight on only a portion of the word (sometimes it isn't there, notice the PRINTs and READs).

如果我在其上进行分页,则看起来很正常:

If I tab it over it looks normal:

我是VIM的新手(更不用说FORTRAN了),所以我不确定发生了什么,我不介意一直盯着我,但我认为如果整个程序都浪费了那列白色,那似乎有点荒谬.空间.

I am new to VIM (not to mention FORTRAN) so I am not sure what's happening, I don't mind tabbing over all the time but I think it looks a little ridiculous if the whole program is wasting that column of white space.

推荐答案

如果搜索:help fortran,您将获得可以设置的选项列表. 这些是我在自己的.vimrc文件中设置的fortran选项. (尽管我不使用固定格式的代码)我知道有一个或两个fortran特定的脚本可以在线使用,但是我不使用它们.

If you search :help fortran, you'll get a list of options that you can set. These are the fortran options I set in my own .vimrc file. (I don't work with fixed-format code though) I know there are one or two fortran specific scripts that are available online, but I don't use them.

let fortran_free_source=1
let fortran_have_tabs=1
let fortran_more_precise=1
let fortran_do_enddo=1

这篇关于Vim突出显示FORTRAN的怪异部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆