Vim ~ Cobol问题

问题描述 投票:0回答:1

我使用的是gnu linux系统。

当我用Vim打开一个Cobol文件时。

vim xxx.cbl

我的vim键映射刚刚重置为正常,我不知道为什么,我不能这样工作。

但如果我打开任何扩展名为.c或.cpp或.txt的文本数据时

一切正常。

这是我的.vimrc。


set autoindent                                                     │
set cindent                                                        │
                                                                   │
inoremap <Esc> <Tab>                                               │
inoremap <Tab> <Esc>`^                                             │
                                                                   │
map <C-c> :w <CR> :!gcc % -o %< -lpthread && ./%< <CR>             │
map <C-P> :w <CR> :!clear;perl %<CR>                               │
                                                                   │
map <C-x> :w <CR>:!clear;python3 %<CR>                             │
                                                                   │
map <C-k> :w <CR> :!cobc % -free % -x % -o %<  && ./%< <CR>        │
                                                                   │
let cobol_legacy_code=1                                            │
                                                                   │
                                                                   │
                                                                   │
set expandtab           " enter spaces when tab is pressed         │
set textwidth=120       " break lines when line length increases   │
set tabstop=4           " use 4 spaces to represent tab            │
set softtabstop=4                                                  │
set shiftwidth=4        " number of spaces to use for auto indent  │
set autoindent                                                     │
syntax on                                                          │
                                                                   │
filetype plugin indent on                                          │
                                                                   │
execute pathogen#infect()               

Please help.What could be the Reason ?

linux vim cobol
1个回答
0
投票

你可能需要跟踪任何由文件类型.cbl触发的插件。

一个简单的开始可能是 :scriptnames 命令。

prompt$ vim normal.txt
:scriptnames

试着记住这些列表,或者在不同的终端窗口... ...

prompt$ vim file.cbl
:scriptnames

滚动到minibuffers底部的脚本名列表。视觉上比较一下,找出最后几个由Vim来源的文件中哪些可能是不同的。 开始查看.cbl触发的Vim脚本是否有不受欢迎的地方。 我们猜测它可能在自动加载的cobol.vim文件中,无论它在哪里被首次发现。 :scriptnames列出完整的路径名。

© www.soinside.com 2019 - 2024. All rights reserved.