powershell配置Gvim
1.下载安装Gvim
我的安装目录在:C:\gVimPortable
配色方案目录:C:\gVimPortable\App\vim\vim72\colors
配置文件目录:C:\gVimPortable\Data\settings\_vimrc
2.配置powershell
powershell目录:C:\Windows\System32\WindowsPowerShell\v1.0
在这个目录下新建文件, 命名为:profile.ps1
内容如下:
# There's usually much more than this in my profile!
$SCRIPTPATH = "C:\gVimPortable"
$VIMPATH = $SCRIPTPATH + "\gVimPortable.exe" Set-Alias vi $VIMPATH
Set-Alias vim $VIMPATH # for editing your PowerShell profile
Function Edit-Profile
{
vim $profile
} # for editing your Vim settings
Function Edit-Vimrc
{
vim $home\_vimrc
}
3.管理员模式启动powershell
运行set-executionpolicy remotesigned
如图所示

选择Y
然后编辑_vimrc, 在最末行添加下面的内容
" Startup {{{
filetype indent plugin on
" vim 文件折叠方式为 marker
augroup ft_vim
au!
au FileType vim setlocal foldmethod=marker
augroup END
" }}}
" GUI {{{
colorscheme chenglee
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
set cursorline
set hlsearch
set number
" 窗口大小
set lines=35 columns=140
" 分割出来的窗口位于当前窗口下边/右边
set splitbelow
set splitright
"不显示工具/菜单栏
set guioptions-=T
set guioptions-=m
set guioptions-=L
set guioptions-=r
set guioptions-=b
" 使用内置 tab 样式而不是 gui
set guioptions-=e
set nolist
" set listchars=tab:?\ ,eol:?,trail:·,extends:>,precedes:<
set guifont=Inconsolata:h12:cANSI
" }}}
注意: 上面的chenglee, chenglee是我的配色方案
配色方案仓库:https://gitshell.com/yuwen/vimfile/tree/master/colors/
4.配色方案
chenglee
" Vim color file
" Maintainer: Jonathan Filip <jfilip1024@gmail.com>
" Last Modified: Wed Oct 21, 2009 11:39AM
" Version: 3.1
"
" GUI / 256 color terminal
"
" I started out trying to combine my favorite parts of other schemes and ended
" up with this (oceandeep, moria, peaksea, wombat, zenburn).
"
" This file also tries to have descriptive comments for each higlighting group
" so it is easy to understand what each part does. set background=dark
hi clear
if exists("syntax_on")
syntax reset
endif
let colors_name="lucius" " Some other colors to save
" blue: 3eb8e5
" green: 92d400
" c green: d5f876, cae682
" new blue: 002D62
" new gray: CCCCCC " Base color
" ----------
hi Normal guifg=#e0e0e0 guibg=#202020
hi Normal ctermfg=253 ctermbg=235 " Comment Group
" -------------
" any comment
hi Comment guifg=#606060 gui=none
hi Comment ctermfg=240 cterm=none " Constant Group
" --------------
" any constant
hi Constant guifg=#8cd0d3 gui=none
hi Constant ctermfg=116 cterm=none
" strings
hi String guifg=#80c0d9 gui=none
hi String ctermfg=110 cterm=none
" character constant
hi Character guifg=#80c0d9 gui=none
hi Character ctermfg=110 cterm=none
" numbers decimal/hex
hi Number guifg=#8cd0d3 gui=none
hi Number ctermfg=116 cterm=none
" true, false
hi Boolean guifg=#8cd0d3 gui=none
hi Boolean ctermfg=116 cterm=none
" float
hi Float guifg=#8cd0d3 gui=none
hi Float ctermfg=116 cterm=none " Identifier Group
" ----------------
" any variable name
hi Identifier guifg=#efaf7f gui=none
hi Identifier ctermfg=216 cterm=none
" function, method, class
hi Function guifg=#efaf7f gui=none
hi Function ctermfg=216 cterm=none " Statement Group
" ---------------
" any statement
hi Statement guifg=#b3d38c gui=none
hi Statement ctermfg=150 cterm=none
" if, then, else
hi Conditional guifg=#b3d38c gui=none
hi Conditional ctermfg=150 cterm=none
" try, catch, throw, raise
hi Exception guifg=#b3d38c gui=none
hi Exception ctermfg=150 cterm=none
" for, while, do
hi Repeat guifg=#b3d38c gui=none
hi Repeat ctermfg=150 cterm=none
" case, default
hi Label guifg=#b3d38c gui=none
hi Label ctermfg=150 cterm=none
" sizeof, +, *
hi Operator guifg=#b3d38c gui=none
hi Operator ctermfg=150 cterm=none
" any other keyword
hi Keyword guifg=#b3d38c gui=none
hi Keyword ctermfg=150 cterm=none " Preprocessor Group
" ------------------
" generic preprocessor
hi PreProc guifg=#f0dfaf gui=none
hi PreProc ctermfg=223 cterm=none
" #include
hi Include guifg=#f0dfaf gui=none
hi Include ctermfg=223 cterm=none
" #define
hi Define guifg=#f0dfaf gui=none
hi Define ctermfg=223 cterm=none
" same as define
hi Macro guifg=#f0dfaf gui=none
hi Macro ctermfg=223 cterm=none
" #if, #else, #endif
hi PreCondit guifg=#f0dfaf gui=none
hi PreCondit ctermfg=223 cterm=none " Type Group
" ----------
" int, long, char
hi Type guifg=#93d6a9 gui=none
hi Type ctermfg=115 cterm=none
" static, register, volative
hi StorageClass guifg=#93d6a9 gui=none
hi StorageClass ctermfg=115 cterm=none
" struct, union, enum
hi Structure guifg=#93d6a9 gui=none
hi Structure ctermfg=115 cterm=none
" typedef
hi Typedef guifg=#93d6a9 gui=none
hi Typedef ctermfg=115 cterm=none " Special Group
" -------------
" any special symbol
hi Special guifg=#cca3b3 gui=none
hi Special ctermfg=181 cterm=none
" special character in a constant
hi SpecialChar guifg=#cca3b3 gui=none
hi SpecialChar ctermfg=181 cterm=none
" things you can CTRL-]
hi Tag guifg=#cca3b3 gui=none
hi Tag ctermfg=181 cterm=none
" character that needs attention
hi Delimiter guifg=#cca3b3 gui=none
hi Delimiter ctermfg=181 cterm=none
" special things inside a comment
hi SpecialComment guifg=#cca3b3 gui=none
hi SpecialComment ctermfg=181 cterm=none
" debugging statements
hi Debug guifg=#cca3b3 guibg=NONE gui=none
hi Debug ctermfg=181 ctermbg=NONE cterm=none " Underlined Group
" ----------------
" text that stands out, html links
hi Underlined guifg=fg gui=underline
hi Underlined ctermfg=fg cterm=underline " Ignore Group
" ------------
" left blank, hidden
hi Ignore guifg=bg
hi Ignore ctermfg=bg " Error Group
" -----------
" any erroneous construct
hi Error guifg=#e37170 guibg=#432323 gui=none
hi Error ctermfg=167 ctermbg=52 cterm=none " Todo Group
" ----------
" todo, fixme, note, xxx
hi Todo guifg=#efef8f guibg=NONE gui=underline
hi Todo ctermfg=228 ctermbg=NONE cterm=underline " Spelling
" --------
" word not recognized
hi SpellBad guisp=#ee0000 gui=undercurl
hi SpellBad ctermbg=9 cterm=undercurl
" word not capitalized
hi SpellCap guisp=#eeee00 gui=undercurl
hi SpellCap ctermbg=12 cterm=undercurl
" rare word
hi SpellRare guisp=#ffa500 gui=undercurl
hi SpellRare ctermbg=13 cterm=undercurl
" wrong spelling for selected region
hi SpellLocal guisp=#ffa500 gui=undercurl
hi SpellLocal ctermbg=14 cterm=undercurl " Cursor
" ------
" character under the cursor
hi Cursor guifg=bg guibg=#a3e3ed
hi Cursor ctermfg=bg ctermbg=153
" like cursor, but used when in IME mode
hi CursorIM guifg=bg guibg=#96cdcd
hi CursorIM ctermfg=bg ctermbg=116
" cursor column
hi CursorColumn guifg=NONE guibg=#202438 gui=none
hi CursorColumn ctermfg=NONE ctermbg=236 cterm=none
" cursor line/row
hi CursorLine gui=NONE guibg=#202438 gui=none
hi CursorLine cterm=NONE ctermbg=236 cterm=none " Misc
" ----
" directory names and other special names in listings
hi Directory guifg=#c0e0b0 gui=none
hi Directory ctermfg=151 cterm=none
" error messages on the command line
hi ErrorMsg guifg=#ee0000 guibg=NONE gui=none
hi ErrorMsg ctermfg=196 ctermbg=NONE cterm=none
" column separating vertically split windows
hi VertSplit guifg=#777777 guibg=#363946 gui=none
hi VertSplit ctermfg=242 ctermbg=237 cterm=none
" columns where signs are displayed (used in IDEs)
hi SignColumn guifg=#9fafaf guibg=#181818 gui=none
hi SignColumn ctermfg=145 ctermbg=233 cterm=none
" line numbers
hi LineNr guifg=#818698 guibg=#363946
hi LineNr ctermfg=102 ctermbg=237
" match parenthesis, brackets
hi MatchParen guifg=#00ff00 guibg=NONE gui=bold
hi MatchParen ctermfg=46 ctermbg=NONE cterm=bold
" the 'more' prompt when output takes more than one line
hi MoreMsg guifg=#2e8b57 gui=none
hi MoreMsg ctermfg=29 cterm=none
" text showing what mode you are in
hi ModeMsg guifg=#76d5f8 guibg=NONE gui=none
hi ModeMsg ctermfg=117 ctermbg=NONE cterm=none
" the '~' and '@' and showbreak, '>' double wide char doesn't fit on line
hi NonText guifg=#404040 gui=none
hi NonText ctermfg=235 cterm=none
" the hit-enter prompt (show more output) and yes/no questions
hi Question guifg=fg gui=none
hi Question ctermfg=fg cterm=none
" meta and special keys used with map, unprintable characters
hi SpecialKey guifg=#404040
hi SpecialKey ctermfg=237
" titles for output from :set all, :autocmd, etc
hi Title guifg=#62bdde gui=none
hi Title ctermfg=74 cterm=none
"hi Title guifg=#5ec8e5 gui=none
" warning messages
hi WarningMsg guifg=#e5786d gui=none
hi WarningMsg ctermfg=173 cterm=none
" current match in the wildmenu completion
hi WildMenu guifg=#cae682 guibg=#363946 gui=bold,underline
hi WildMenu ctermfg=16 ctermbg=186 cterm=bold " Diff
" ----
" added line
hi DiffAdd guifg=#80a090 guibg=#313c36 gui=none
hi DiffAdd ctermfg=108 ctermbg=22 cterm=none
" changed line
hi DiffChange guifg=NONE guibg=#4a343a gui=none
hi DiffChange ctermfg=fg ctermbg=52 cterm=none
" deleted line
hi DiffDelete guifg=#6c6661 guibg=#3c3631 gui=none
hi DiffDelete ctermfg=59 ctermbg=58 cterm=none
" changed text within line
hi DiffText guifg=#f05060 guibg=#4a343a gui=bold
hi DiffText ctermfg=203 ctermbg=52 cterm=bold " Folds
" -----
" line used for closed folds
hi Folded guifg=#91d6f8 guibg=#363946 gui=none
hi Folded ctermfg=117 ctermbg=238 cterm=none
" column on side used to indicated open and closed folds
hi FoldColumn guifg=#91d6f8 guibg=#363946 gui=none
hi FoldColumn ctermfg=117 ctermbg=238 cterm=none " Search
" ------
" highlight incremental search text; also highlight text replaced with :s///c
hi IncSearch guifg=#66ffff gui=reverse
hi IncSearch ctermfg=87 cterm=reverse
" hlsearch (last search pattern), also used for quickfix
hi Search guibg=#ffaa33 gui=none
hi Search ctermbg=214 cterm=none " Popup Menu
" ----------
" normal item in popup
hi Pmenu guifg=#e0e0e0 guibg=#303840 gui=none
hi Pmenu ctermfg=253 ctermbg=233 cterm=none
" selected item in popup
hi PmenuSel guifg=#cae682 guibg=#505860 gui=none
hi PmenuSel ctermfg=186 ctermbg=237 cterm=none
" scrollbar in popup
hi PMenuSbar guibg=#505860 gui=none
hi PMenuSbar ctermbg=59 cterm=none
" thumb of the scrollbar in the popup
hi PMenuThumb guibg=#808890 gui=none
hi PMenuThumb ctermbg=102 cterm=none " Status Line
" -----------
" status line for current window
hi StatusLine guifg=#e0e0e0 guibg=#363946 gui=bold
hi StatusLine ctermfg=254 ctermbg=237 cterm=bold
" status line for non-current windows
hi StatusLineNC guifg=#767986 guibg=#363946 gui=none
hi StatusLineNC ctermfg=244 ctermbg=237 cterm=none " Tab Lines
" ---------
" tab pages line, not active tab page label
hi TabLine guifg=#b6bf98 guibg=#363946 gui=none
hi TabLine ctermfg=244 ctermbg=236 cterm=none
" tab pages line, where there are no labels
hi TabLineFill guifg=#cfcfaf guibg=#363946 gui=none
hi TabLineFill ctermfg=187 ctermbg=236 cterm=none
" tab pages line, active tab page label
hi TabLineSel guifg=#efefef guibg=#414658 gui=bold
hi TabLineSel ctermfg=254 ctermbg=236 cterm=bold " Visual
" ------
" visual mode selection
hi Visual guifg=NONE guibg=#364458
hi Visual ctermfg=NONE ctermbg=24
" visual mode selection when vim is not owning the selection (x11 only)
hi VisualNOS guifg=fg gui=underline
hi VisualNOS ctermfg=fg cterm=underline
然后在powershell中再执行set-executionpolicy remotesigned
powershell启动vim


powershell配置Gvim的更多相关文章
- Win7下安装配置gVim
本文根据vim官网的<Simple Steps to Help You Install gVim on Windows 7>[1]一文整理而成. 1. 下载gVim 在http://www ...
- (转载+新增)Win7下安装配置gVim
转载自 http://www.cnblogs.com/zhcncn/p/4151701.html.而后安装过程中加入自己遇到的问题解决方案. 本文根据vim官网的<Simple Steps to ...
- 通过 powershell 配置 IIS
1. 设置iis pool: cls Import-Module WebAdministration Get-ChildItem IIS:\apppools | ForEach-Object{ ...
- 配置gVim使之不自动生成备份文件
设置 _vimrc set nobacku 1 set nobacku 或指定一个其备份的地方: set backupdir=D:/Program/ Files/Vim /tmp 1 1 1 ...
- 使用PowerShell简化我的工作
欢迎关注我的社交账号: 博客园地址: http://www.cnblogs.com/jiangxinnju/p/4781259.html GitHub地址: https://github.com/ji ...
- vim配置及插件安装管理(超级详细)
1 写在前面 Linux下编程一直被诟病的一点是: 没有一个好用的IDE, 但是听说Linux牛人, 黑客之类的也都不用IDE. 但是对我等从Windows平台转移过来的Coder来说, 一个好用 ...
- vim配置及插件安装管理(超级详细)[转]
1 写在前面 Linux下编程一直被诟病的一点是: 没有一个好用的IDE, 但是听说Linux牛人, 黑客之类的也都不用IDE. 但是对我等从Windows平台转移过来的Coder来说, 一个好用 ...
- 虚拟机压力测试延迟高的可能原因及 ILPIP 配置 / 查询脚本
测试初期 Client VM 的延迟结果正常: 测试后期 Client VM 的延迟偶尔突增/连接失败,越后期超高延迟(比如 30 秒)出现越多: 问题分析 造成这一现象的根本原因很可能是 SNAT( ...
- 使用 PowerShell 创建和修改 ExpressRoute 线路的对等互连
本文可帮助使用 PowerShell 在资源管理器部署模型中创建和管理 ExpressRoute 线路的路由配置. 还可以检查 ExpressRoute 线路的状态,更新.删除和取消预配其对等互连. ...
随机推荐
- TOP100summit 2017:投资千亿成立达摩院,揭秘阿里在人工智能领域的探索
今天上午,阿里巴巴云栖大会在杭州开幕,第一条重磅消息是阿里首席技术官张建锋宣布成立达摩院,在全球各地建立实验室,3年内投入千亿在全球建立实验室.和高校建立研究所.建立全球研究中心等事务. 该院由全球实 ...
- 使用 Python 进行 socket 编程
本文主要参考 https://docs.python.org/3/howto/sockets.html . 本文只讨论 STREAME(比如 TCP) INET(比如 IPv4) socket. 在多 ...
- 使用Intel IPT技术保护您的帐号安全
使用Intel IPT技术保护您的帐号安全
- 使用代理*** and kubeadm init错误
没有代理 可申请AWS免费账户,创建EC2实例,搭建Shadowsocks服务器. 配置代理客户端 参考链接:https://www.zybuluo.com/ncepuwanghui/note/954 ...
- php Only variables can be passed by reference
最近做项目,发现了一个报错 Only variables can be passed by reference, 意思是"只有变量能通过'引用'" 就是在代码中 使用了一个方法 ...
- (转)Spring实现IoC的多种方式
原文地址:http://www.cnblogs.com/best/p/5727935.html 目录 一.使用XML配置的方式实现IOC 二.使用Spring注解配置IOC 三.自动装配 四.零配置实 ...
- sql server作业管理查看/进程管理查看命令
一.作业管理 (1) select * from msdb.dbo.sysjobhistory 可以查看作业的历史记录 (2) select * from msdb.dbo.sysjobs 查 ...
- 应用笔画宽度变换(SWT)来检测自然场景中的文本
Introduction: 应用背景:是盲人辅助系统,城市环境中的机器导航等计算机视觉系统应用的重要一步.获取文本能够为许多视觉任务提供上下文的线索,并且,图像检索算法的性能很大部分都依赖于对应的文本 ...
- (转)FastDFS文件存储
一.FastDFS介绍 FastDFS开源地址:https://github.com/happyfish100 参考:分布式文件系统FastDFS设计原理 参考:FastDFS分布式文件系统 个人封装 ...
- Scala里面如何使用枚举
枚举通常用来定义已知数量的常量,比如月份,星期,季节等等,用过java的人都知道定义枚举的关键字是enum,在scala里面和java有所不同,来看一个完整的例子定义: object EnumTest ...