IDE(IDEs)长期以来一直围绕着开发人员,但老一代的开发人员过去常常直接从终端窗口编写代码。尽管IDE(IDEs)提高了工作效率,并通过自动完成和IntelliSense等功能使编码变得更容易。使用像Vi/Vim这样的基本文本编辑器有其自身的好处。由于没有模板,您可以从头开始编写代码。它加深了您对编程语言的了解,并确保您理解代码的每一部分。如果您从事软件开发,您一定听说过并害怕过旧的Vim。在这篇文章中,我们介绍了如何 在 Windows 10/8/7 上设置和安装Vim 文本编辑器。(Vim Text Editor)
在Windows 10上安装Vim 文本编辑器(Vim Text Editor)
大多数崭露头角的开发人员都害怕使用Vim,即使我也是。但是一旦你习惯了它,你就会意识到你对键盘和编程语言有更好的控制。尽管Vim是作为 Vi 文本编辑器在UNIX系统中引入的,但也有一种解决方法可以在Windows上安装它。
对于所有Vi/Vim的人,我必须告诉你,这是最古老和最稳定的文本编辑器之一。它在终端窗口中运行,并具有强大的功能,例如多级撤消树、广泛的插件系统以及与许多其他工具的集成。如果您是Linux用户并希望在Windows上安装(Windows)Vi/Vim,那么您来对地方了。
第 1 步(Step 1):您需要下载Vim 文本编辑器 Windows(Vim Text Editor Windows)安装程序才能开始。前往此链接(this link)并下载适用于Windows的安装程序。
第 2 步(Step 2):现在打开设置文件并按照屏幕上的说明进行操作。在安装程序询问您安装类型的步骤中,选择完整(Full)并点击下一步。
第三步:(Step 3:)安装完成后,打开CMD窗口,输入vim,回车。瞧(Voila),现在你在Vim 文本编辑器(Vim Text Editor)中。因为使用Vim并不像现在这样简单,所以打字是行不通的。
学习 Vim
学习Vim的最佳方法之一是阅读官方文档。此(This)链接将带您到文档,该文档可以进一步引导您找到学习 vim 的最佳资源。如果您正在寻找更快的东西,只需在vim窗口中输入(vim ):help,您就可以浏览内置指南。
这似乎没用,但退出 vim 的正确方法是输入:q而不是点击(:q)Window上的关闭按钮。
如果您已经在UNIX系统上使用过(UNIX)Vim 文本编辑器(Vim Text Editor),那么您应该会有类似的感觉。所有命令都应该按原样工作,并且没有多少不同之处。如果你想在Windows上配置(Windows)Vi/Vim,你需要编辑配置文件。
在 UNIX 上,配置文件称为.vimrc而在 Windows 上称为_vimrc。
配置文件可以位于您的 $ VIM文件夹中,该文件夹不过是C:\Program Files (x86)\Vim\_vimrc。
如果要添加一些自定义配置,可以编辑此文件。
所以,这一切都是关于在Windows上安装和运行(Windows)Vim。你也可以直接从开始(Start)菜单启动Vim 。编辑器还与文本文件相关联,因此您可以选择它作为打开文本文件的默认程序。这个Vim安装还附带了 g Vim,它只不过是一个带有一些GUI的(GUI)Vim。如果您对Vim(Vim)不满意,可以使用 g Vim。g Vim可以单独配置,运行方式与Vim不同。
如果您在安装过程中遇到任何问题,请在评论中分享。此外,请在下面的评论中分享您在Windows上使用(Windows)Vim 文本编辑器的经验。(Vim Text Editor)
How to install Vim Text Editor on Windows 10
IDEs have surrounded developers since long, but the older generаtion of developers used to writе their codе right from thе terminal windоw. Although IDEs increase productivity and made it easier to code with features such аs auto-complete and IntelliSense. Using a bare-bones text editor like Vi/Vim has itѕ own benefits. You get to writе the code from scratch as there are no templates. It deeрens уour knowledgе about a programming language and makes surе you understаnd each bit of the code. If you are into software development, уou must have heard and feared about the good old Vim. In this poѕt, we’ve covered how to setup and install Vim Text Editor on Windows 10/8/7.
Installing Vim Text Editor on Windows 10
Most of the budding developers are afraid of using Vim, even I am. But once you get used to it, you realize that you have a better command over the keyboard and the programming language. Although Vim was introduced in UNIX systems as Vi text editor, there is a workaround to install it on Windows too.
For all those who are new to Vi/Vim, I must tell you that this is one of the oldest and one of the most stable text editor. It runs within the terminal window and comes with powerful features such as multi-level undo tree, extensive plugin system and integration with many other tools. If you were/are a Linux user and looking to install Vi/Vim on Windows, you are at a right place.
Step 1: You need to download the Vim Text Editor Windows installer to get started. Head over to this link and download the installer for Windows.
Step 2: Now open the setup file and follow the on-screen instructions. In the step where the setup asks you for the installation type, select Full and hit next.
Step 3: Once the installation is complete, open a CMD window and type in vim and hit enter. Voila, now you are inside Vim Text Editor. Typing something won’t work because using Vim is not as simple as is.
Learning Vim
One of the best ways to learn Vim is to go through the official documentation. This link will take you to the documentation which can further navigate you to the best sources to learn vim. If you are looking for something quicker, just type :help inside the vim window, and you can go through the inbuilt guide.
This may seem useless, but the correct way to quit vim is by typing :q and not by hitting the close button on the Window.
If you’ve been already using Vim Text Editor on UNIX systems, then this should feel similar. All the commands should work as it is and there are not many things that are different. If you want to configure Vi/Vim on Windows, you need to edit the configuration file.
On UNIX, the config file is called .vimrc whereas on Windows it is called _vimrc.
The configuration file can be located inside your $VIM folder which is nothing but C:\Program Files (x86)\Vim\_vimrc.
You can edit this file if you want to add some custom configuration.
So, this was all about installing and running Vim on Windows. You can also start Vim directly from the Start menu. The editor also associates itself with the text files, so you can choose it as a default program to open text files. This Vim installation also comes with gVim which is nothing but a Vim with some GUI. You can use gVim if you are not comfortable with Vim. gVim can be configured separately, and it runs differently from Vim.
If you face any issues in installation, do share them in the comments. Also, share your experience about using Vim Text Editor on Windows in the comments down below.