# vim-windows **Repository Path**: mwmi/mingw-gvim ## Basic Information - **Project Name**: vim-windows - **Description**: 在windows下,使用mingw编译vim并制作安装包 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-01-01 - **Last Updated**: 2025-07-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: Vim, mingw, Windows, 文本编辑器, notepad ## README # 使用mingw编译vim并制作安装包 > vim地址:https://github.com/vim/vim ## 安装软件和依赖 (编译vim) > msys2下载:https://www.msys2.org/ 安装完`msys2`后,将目录下文件夹`usr\bin`和`mingw64\bin`添加到环境变量`PATH`中。 > 注意安装`msys2`和添加完环境变量后才能进行以下操作。 > 安装64位C\C++编译器 ```cmd pacmam -Syu pacman -S --needed base-devel mingw-w64-x86_64-toolchain ``` > 安装vim依赖库 ```cmd pacman -S mingw-w64-x86_64-libsodium ``` ## 编译vim > 定位到当前目录,运行以下文件 ```cmd UpdateAndCompile.bat ``` ### 功能 ![功能](images/0.png) ## 安装 NSIS (用于制作安装包) ```cmd pacman -S mingw-w64-x86_64-nsis ``` 注意:务必将目录下的`tools\ShellExecAsUser.dll`文件复制到`mingw64\share\nsis\Plugins\unicode`目录下, 否则制作安装包时会报错 ## 制作安装包 > 定位到当前目录,运行以下文件 ```cmd makensis.bat ``` ## 安装包说明 **使用前请安装 `CascadiaCodeNF.ttf` 字体** (也可自行安装其他powerline字体) > 安装包自带`coc.nvim`插件 安装包已经内置`js`,`css`,`html`,`json`,`python`,`c/c++`,`php`,`viml`语法补全服务 ### 内置插件 1. [vim-devicons](https://github.com/ryanoasis/vim-devicons.git) 2. [vim-airline](https://github.com/vim-airline/vim-airline.git) 3. [vim-plug](https://github.com/junegunn/vim-plug.git) 4. [LeaderF](https://github.com/Yggdroot/LeaderF.git) `f` 5. [nerdtree](https://github.com/scrooloose/nerdtree.git) 6. [tagbar](https://github.com/majutsushi/tagbar.git) `` 8. [auto-pairs](https://github.com/jiangmiao/auto-pairs) `` 9. [NERD_commenter](https://github.com/scrooloose/nerdcommenter.git) `cc` 10. [vim-fugitive](https://github.com/tpope/vim-fugitive.git) 11. [gv](https://github.com/junegunn/gv.vim.git) `:GV` 12. [vim-autoformat](https://github.com/Chiel92/vim-autoformat.git) `:Autoformat` 18. [vim-quickrun](https://github.com/thinca/vim-quickrun.git) `r` 19. [vim-startify](https://github.com/mhinz/vim-startify.git) ### 运行界面 ![运行图片](images/1.png) > 在win7下运行也没有任何问题 ![运行图片2](images/2.png) ### 安装大小 由于内置了`node.exe(55MB)`, `clangd.exe(37MB)`,等插件,所以安装包大小较大。 ![安装大小](images/3.png) ## 总结 > vim作为一个强大的文本编辑器,可以很好的替代`记事本`,非常适合小白用户,使用起来很有趣,但不建议用于生产开发。 本项目主要是本人用来练习git命令操作的,顺带编译一下vim和制作vim安装包。