English 中文(简体)
自动执行指挥系统
原标题:Executing commands in normal mode inside vim function
  • 时间:2012-05-17 07:58:16
  •  标签:
  • vim

我对两个指挥部进行了正常的勘测,一个是援引LaTeX(标上F6钥匙),另一个是BiBTeX(F5)。 我期待他们开展这些工作。 我的职能是按顺序排列,确保适当插入所有参考资料和引文。 这项职能是:

function FullDocumentGeneration()
  execute "normal <F6>"
  execute "normal <F5>"
  execute "normal <F6>"
  execute "normal <F6>"
endfunction

除细节外,这项工作做得很好:在管理指挥之后,有人(如在飞机上)表示要迫使步行返回正体(如同正常指挥时一样),但随后,执行行动冲进了没有我要求进入的任何过境点。 这尤其令人不安,因为我通常想检查方案产出,因此,我不得不敦促Ctrl-Z返回。 是否有办法避免这种情况? 我在行动中做了一些错误?

问题回答

Presumably, the next mapping interferes with the hit-enter prompt. Try inserting

call getchar()

在各行之间,可能还有<代码>echo“任何钥匙”。

当你使用时,一旦指挥完成,你就会回到你以前使用的任何方式。 由于你书写了做你想要做的任何事情的职能,因此不将其放在一条线上,如<代码>:!cmd line 1 &&cmd line2 &&cd Line3,然后一度损失。 或者,你可以写出你想要做的手稿,并在现在的档案中通过扩大<>%<>>>>>。 例如,我是用快车和late子撰写的,因此我一直在做以下工作。

:!rst2html.py % latex-files/%.tex && cd latex-files && pdflatex %.tex

。 <代码>%:p 扩展至目前公开档案的绝对路径。





相关问题
Autoupdate VIM Plugins?

Is it possible to update vim plugins automatically?

how to unindent in vim without leaving edit mode?

I m writing a lot of python code recently, and i used the tab-to-space mode in vim. I was just wondering how would i unindent in vim without leaving edit mode for example after i finished if...: block....

Scrolling inside Vim in Mac s Terminal

I ve been googling around trying to figure out if it s possible to use my mouse wheel to scroll while inside Vim in Mac s Terminal, with no luck. It seems as if only X11 or iTerm support this. Before ...

Vim - Deleting XML Comments

How do I delete comments in XML? If the opening and the closing comment tags are on the same line, I use :g/^<!--.*-->$/d to delete the comment. How to delete the comments that are spread ...

Limiting a match in vim to certain filetypes?

I have the following in my .vimrc to highlight lines longer than 80 chars: highlight OverLength ctermbg=red ctermfg=white guibg=#592929 match OverLength /\%81v.*/ This works quite well. However, the ...

Profiling Vim startup time

I’ve got a lot of plugins enabled when using Vim – I have collected plugins over the years. I’m a bit fed up with how long Vim takes to start now, so I’d like to profile its startup and see which of ...

热门标签