vi

How to effectively work with multiple files in Vim?

孤者浪人 提交于 2019-11-26 08:38:30
问题 I\'ve started using Vim to develop Perl scripts and am starting to find it very powerful. One thing I like is to be able to open multiple files at once with e.g. vi main.pl maintenance.pl and then hop between them with: :n :prev and see which file are open with :args And to add a file, I can say: :n test.pl which I expect would then be ADDED to my list of files, but instead it wipes out my current file list and when I type :args I only have test.pl open. So how can I ADD and REMOVE files to

Make Vim show ALL white spaces as a character

邮差的信 提交于 2019-11-26 04:57:03
问题 I can\'t find a way to make Vim show all white spaces as a character. All I found was about tabs, trailing spaces etc. 回答1: As others have said, you could use :set list which will, in combination with :set listchars=... display invisible characters. Now, there isn't an explicit option which you can use to show whitespace, but in listchars, you could set a character to show for everything BUT whitespace. For example, mine looks like this :set listchars=eol:$,tab:>-,trail:~,extends:>,precedes:<

VI服务器

浪尽此生 提交于 2019-11-26 02:12:48
  VI服务器是一个面向对象的、与平台无关的技术,可以提供一种通过编程方式来访问 labview 和LabVIEW应用程序的途径。   使用VI服务器来实现以下编程操作: 远程地调用一个VI。 将一个LabVIEW应用程序实例配置为一个服务器。这个服务器可以输出您能够从Wab站点上的其他LabVIEW实例中调用的VI。例如,如果您有一个从远程站点上采集和记录数据的 数据采集 应用程序,您就可以从您的本地 计算机 上不定期地采集这些数据。通过改变您的LabVIEW的参数配置,您可以使得某些VI更容易从网上得到,这样,传递最新的数据就如同一个子VI调用一样简单。VI服务器处理着网络的细节。VI服务器也能够跨平台工作,这样,客户端和服务器端就能够运行在不同的平台上。 编辑VI和LabVIEW的属性。例如,您可以动态地确定一个VI窗口的位置,或者移动前面板的滚动条以便使一部分窗口内容可见。您也可以用编程的方式把这些改变保存到磁盘中。 更新多个VI的属性,而不是手动地使用 文件 »VI 属性 对话框的形式来更改。 获得关于一个应用程序实例的信息,如版本号和版本。您也可以获得环境信息,如LabVIEW正在运行的平台。 当另一个VI需要调用VI时,动态地将它们加载到内存中,而不是打开一个VI时就把所有的子VI都加载进去。 为应用程序创建一个插件架构,以便在把程序发布之后还能够为其增加功能。例如

How to replace a character by a newline in Vim

浪尽此生 提交于 2019-11-26 01:50:02
问题 I\'m trying to replace each , in the current file by a new line: :%s/,/\\n/g But it inserts what looks like a ^@ instead of an actual newline. The file is not in DOS mode or anything. What should I do? If you are curious, like me, check the question Why is \\r a newline for Vim? as well. 回答1: Use \r instead of \n . Substituting by \n inserts a null character into the text. To get a newline, use \r . When searching for a newline, you’d still use \n , however. This asymmetry is due to the fact

What is your most productive shortcut with Vim?

情到浓时终转凉″ 提交于 2019-11-26 00:17:10
问题 Locked . This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions. I\'ve heard a lot about Vim, both pros and cons. It really seems you should be (as a developer) faster with Vim than with any other editor. I\'m using Vim to do some basic stuff and I\'m at best 10 times less productive with Vim. The only two things you should care about when you talk about speed (you may not care

编辑器之神&mdash;&mdash;vim

空扰寡人 提交于 2019-11-25 23:29:00
1、vi介绍 vi 编辑器是所有 Unix 及 Linux 系统下标准的编辑器,类似于 Windows 系统 notepad (记事本)编辑器,用于 Unix 及 Linux 系统的任何版本, vi 编辑器是完全相同的,因此可以在其他任何介绍 vi 的地方都能进一步了解它, vi 也是 Linux 中最高的文本编辑器,学会它后,我们讲啊流程的世界里畅行无阻,尤其是在终端中。 关于vim: vi和vim都是Linux中的编辑器,不同的是,vim计较高级,可以视为vi的升级版本,vi使用文本编辑,但是vim更适用于coding(写代码的)。 vim重点是光标的移动,模式的切换,删除,查找,替换,复制,粘贴,撤销命令的使用。 vim 具有程序编辑的能力,可以以字体颜色辨别语法的正确性,方便程序设计; vim可以当作vi的升级版本,他可以用多种颜色的方式来显示一些特殊的信息。 vim会依据文件扩展名或者是文件内的开头信息, 判断该文件的内容而自动的执行该程序的语法判断式,再以颜色来显示程序代码与一般信息。 vim里面加入了很多额外的功能,例如支持正则表达式的搜索、多文件编辑、块复制等等。 这对于我们在Linux上进行一些配置文件的修改工作时是很棒的功能。 2、vim模式有哪些?如何切换 ①三种模式 命令模式(默认):刚进入vim的时候,默认就是命令模式,可以复制行,删除行等。 输入模式

Linux工具使用

对着背影说爱祢 提交于 2019-11-25 19:44:33
Linux 工具使用 在Linux下从事C程序设计时,需要使用4种基本的工具,分别是编辑器、编译器、调试器、makefile。 编辑器用于源文件的编写,在当前的linux中存在很多的编辑器,有可视化工具,如KDE,也有经典的非可视化工具,如vi,vim。 编译器一般采用GCC,调试器采用GDB,而针对工程中数量众多的源文件的编译,一般采用make脚本,如果能够熟练应用这些工具,将会大幅度提升软件的开发能力。 VI的介绍及使用 1、vi介绍 Vi是linux系统中一款著名的编辑软件,也是linux系统中第一款全屏幕编辑软件,vi从诞生至今,为广大linux用户熟悉,几乎是应用linux系统必备的一项基本技能。 由于vi是基于命令交互的方式,对于使用惯了可视化工具的用户来说,在开始会很不适应,但相信经过慢慢的学习以及实践,你应该会喜欢上这款工具。 2、vi的启动 Vi的启动很简单,只需要在linux终端输入vi即可, 如果启动时没有指定名字或者指定的文件名不存在,则vi将打开一个新的缓冲区域来进行编辑,如果在打开时指定了一个已有的文件,则vi会将该文件的整个内容读取到已准备进行编辑的缓冲区当中。 3、vi的三种模式 Vi编辑器有三种基本的工作模式,分别是命令模式、插入模式、末行模式,在使用的时候,一般将末行模式也算是命令模式。 命令行模式----控制屏幕光标的移动、字符、字或者行的删除