PowerShell Configuration Gvim

Source: Internet
Author: User

1. Download and install Gvim

My installation directory is in: C:\gVimPortable

Color scheme Catalog: C:\gVimPortable\App\vim\vim72\colors

Configuration file directory: C:\GVIMPORTABLE\DATA\SETTINGS\_VIMRC

2. Configure PowerShell

PowerShell directory: C:\Windows\System32\WindowsPowerShell\v1.0

Under this directory, create a new file named: Profile.ps1

The contents are as follows:

# there ' s usually much more than this in my profile! $SCRIPTPATH = "C:\gVimPortable" $VIMPATH    = $SCRIPTPATH + "\gvimport Able.exe "Set-alias vi   $VIMPATHSet-alias vim  $VIMPATH # for editing your PowerShell profilefunction edit-profile {    vim $profile}# for editing your vim settingsfunction edit-vimrc{    vim $home \_VIMRC}

3. Admin mode to start PowerShell

Run Set-executionpolicy remotesigned

Select Y

Then edit _VIMRC and add the following to the last line

"Startup {{{filetype indent plugin on" Vim file is collapsed in Markeraugroup ft_vim    au!    Au FileType vim setlocal foldmethod=markeraugroup END "}}" GUI {{{ColorScheme chengleesource $VIMRUNTIME/ Delmenu.vimsource $VIMRUNTIME/menu.vimset cursorlineset hlsearchset number "window size set lines=35 columns=140" The split window is located at the bottom of the current window/right set Splitbelowset splitright "Do not show tools/menu bar set Guioptions-=tset guioptions-=mset guioptions-=lset Guioptions-=rset guioptions-=b "Use the built-in tab style instead of Guiset guioptions-=eset nolist" Set listchars=tab:?\, Eol:?,trail:, Extends:>,precedes:<set Guifont=inconsolata:h12:cansi "}}}

Note: Above the Chenglee, Chenglee is my color scheme

Color scheme Warehouse: https://gitshell.com/yuwen/vimfile/tree/master/colors/

4. Color scheme

Chenglee

"Vim color file" Maintainer:jonathan Filip <[email protected]> "Last modified:wed Oct, 11:39am" V ersion: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 has descriptive comments for each higlighting group "so it's easy to understand what each part D Oes.set Background=darkhi Clearif exists ("syntax_on") syntax Resetendiflet colors_name= "Lucius" "Some other colors to s Ave "Blue:3eb8e5" green:92d400 "C green:d5f876, cae682" New blue:002d62 "new GRAY:CCCCCC" Base color "----------Hi No Rmal guifg= #e0e0e0 guibg= #202020hi Normal ctermfg=253 ctermbg=235 "Comment Group          "-------------" any Commenthi Comment guifg= #606060 Gui=nonehi Comment ctermfg=240 cterm=none "Constant Group"--------------"Any constanthi Constant guifg= #8cd0d3 Gui=nonehi Constant ctermfg=                                   Cterm=none "Stringshi String guifg= #80c0d9 Gui=nonehi String ctermfg=110 cterm=none "character Constanthi characte                                     R guifg= #80c0d9 Gui=nonehi Character ctermfg=110 Cterm=none "Numbers decimal/hexhi number guifg= #8cd0d3 Gui=nonehi N                                   Umber ctermfg=116 Cterm=none "true, Falsehi Boolean guifg= #8cd0d3 Gui=nonehi Boolean ctermfg=116 Cterm=none "f                                   Loathi float guifg= #8cd0d3 Gui=nonehi float ctermfg=116  Cterm=none "Identifier Group"----------------"any variable Namehi Identifier guifg= #efaf7f Gui=nonehi Identifier ctermfg=216 Cterm=none "function, method, CLA                                     Sshi function guifg= #efaf7f Gui=nonehi function ctermfg=216                                   Cterm=none "Statement Group"---------------"any Statementhi Statement guifg= #b3d38c Gui=nonehi Statement ctermfg=150 Cterm=none "if, t                                     Hen, Elsehi Conditional guifg= #b3d38c Gui=nonehi Conditional ctermfg=150                                   Cterm=none "Try, catch, throw, Raisehi Exception guifg= #b3d38c Gui=nonehi Exception ctermfg=150 Cterm=none "for, while, Dohi Repe At guifg= #b3d38c Gui=nonehi Repeat ctermfg=150 Cterm=non E "case, Defaulthi label guifg= #b3d38c Gui=nonehi label ctermfg=15                                   0 Cterm=none "sizeof, +, *hi Operator guifg= #b3d38c Gui=nonehi Operator ctermfg=150 Cterm=none "any other Keywordhi Keywor                                     D guifg= #b3d38c Gui=nonehi Keyword ctermfg=150                                   Cterm=none "Preprocessor Group"------------------"generic Preprocessorhi preproc guifg= #f0dfaf Gui=nonehi preproc ctermfg=223 Cterm=none "#in                                  Cludehi include guifg= #f0dfaf Gui=nonehi include ctermfg=223   Cterm=none "#definehi Define guifg= #f0dfaf Gui=nonehi Define cter                                   mfg=223 Cterm=none "Same as Definehi Macro guifg= #f0dfaf Gui=nonehi Macro ctermfg=223 cterm=none "#if, #else, #endif                                     Hi precondit guifg= #f0dfaf gui=nonehi precondit ctermfg=223                                   Cterm=none "type Group"----------"int, long, Charhi type guifg= #93d6a9 Gui=nonehi Type ctermfg=115 cterm=none "Static, Registe                                     R, Volativehi storageclass guifg= #93d6a9 Gui=nonehi storageclass ctermfg=115                                   Cterm=none "struct, Union, ENUMHI Structure guifg= #93d6a9 Gui=nonehi STRUcture ctermfg=115 cterm=none "Typedefhi Typedef guifg= #93d6a9  Gui=nonehi Typedef ctermfg=115 Cterm=none "Special Group "-------------" any special Symbolhi special guifg= #cca3b3 Gui=nonehi Sp      Ecial ctermfg=181 Cterm=none "special character in a Constanthi Specialchar                                     guifg= #cca3b3 Gui=nonehi Specialchar ctermfg=181              Cterm=none "Things you can ctrl-]hi tag guifg= #cca3b3 gui=nonehi Tag        ctermfg=181 Cterm=none "character that needs Attentionhi Delimiter                                     guifg= #cca3b3 Gui=nonehi Delimiter ctermfg=181 Cterm=none "Special THings inside a commenthi specialcomment guifg= #cca3b3 Gui=nonehi specialcomment cter mfg=181 cterm=none "Debugging Statementshi Debug guifg= #cca3b3 gu Ibg=none Gui=nonehi Debug ctermfg=181 ctermbg=none cterm=none "underlined G                                        Roup "----------------" text that stands out, HTML Linkshi underlined GUIFG=FG Gui=underlinehi underlined CTERMFG=FG cterm=underline "Ignore Group"-------- ----"Left blank, hiddenhi Ignore guifg=bghi Ignore ctermfg=bg" Error Group "-----------" any Erroneou             S Constructhi error guifg= #e37170 guibg= #432323 Gui=nonehi error ctermfg=167            ctermbg=52 cterm=none "Todo Group"----------"Todo, fixme, note, Xxxhi todo guifg= #efef8f   Guibg=none           Gui=underlinehi Todo ctermfg=228 ctermbg=none cterm=underline "spelling"---                                 -----"Word not recognizedhi Spellbad guisp= #ee0000 gui=undercurlhi Spellbad Ctermbg=9 Cterm=undercurl "Word not capitalizedhi spellcap guisp= #eeee0 0 Gui=undercurlhi Spellcap ctermbg=12 cterm                                =undercurl "Rare Wordhi spellrare guisp= #ffa500 gui=undercurlhi spellrare ctermbg=13 cterm=undercurl "wrong spelling for selected Regionhi spelllocal GUI              sp= #ffa500 Gui=undercurlhi spelllocal ctermbg=14  Cterm=undercurl "cursor"------"character under the Cursorhi cursor GUIFG=BG guibg= #a3e3edhi Cursor CTERMFG=BG ctermbg=153 "Like the cursor, but used if in IME Modehi cursorim guifg=bg guibg= #96 Cdcdhi Cursorim ctermfg=bg ctermbg=116 "cursor columnhi cursorcolumn guifg=none Guib g= #202438 Gui=nonehi cursorcolumn ctermfg=none ctermbg=236 cterm=none "cursor Line/ro WHI cursorline gui=none guibg= #202438 gui=nonehi cursorline cterm=none C termbg=236 cterm=none "Misc"----"Directory names and other special names in Listingshi directory Guif g= #c0e0b0 gui=nonehi Directory ctermfg=151 CT  Erm=none "error messages on the command Linehi errormsg guifg= #ee0000 guibg=none Gui=nonehi  ErrorMsg ctermfg=196 ctermbg=none cterm=none "column separating vertically split Windowshi Vertsplit guifg=#777777 guibg= #363946 Gui=nonehi vertsplit ctermfg=242 ctermbg=237 cter           M=none "Columns where signs is displayed (used in IDEs) Hi signcolumn guifg= #9fafaf guibg= #181818           Gui=nonehi signcolumn ctermfg=145 ctermbg=233 cterm=none "line Numbershi Linenr guifg= #818698 guibg= #363946hi linenr ctermfg=102 ctermbg=237 "match parenthesis, bracketsh I matchparen guifg= #00ff00 guibg=none gui=boldhi matchparen ctermfg=46 CTE                                   Rmbg=none Cterm=bold "The ' more ' prompt if output takes more than one Linehi moremsg guifg= #2e8b57 Gui=nonehi moremsg ctermfg=29 cterm=none "t          Ext showing what mode is Inhi modemsg guifg= #76d5f8 guibg=none Gui=nonehi modemsg       ctermfg=117      Ctermbg=none Cterm=none "the ' ~ ' and ' @ ' and showbreak, ' > ' Double wide char doesn ' t fit on Linehi Non                                     Text guifg= #404040 Gui=nonehi nontext ctermfg=235                                        Cterm=none "The Hit-enter prompt (show more output) and yes/no Questionshi Question GUIFG=FG Gui=nonehi Question CTERMFG=FG Cterm=none " Meta and special keys used with map, unprintable Charactershi specialkey guifg= #404040hi specialkey ctermfg=23 7 "Titles for output From:set all,: Autocmd, Etchi Title guifg= #62bdde gui=n                                   Onehi title ctermfg=74 cterm=none "Hi title guifg= #5ec8e5                                   Gui=none "Warning Messageshi warningmsg guifg= #e5786d   Gui=nonehi warningmsg    ctermfg=173 Cterm=none "Current match in the Wildmenu completionhi Wildmenu guifg= #cae682 guibg= #363946 gui=bold,underlinehi wildmenu ctermfg=16 ctermbg=18 6 Cterm=bold "Diff"----"added Linehi diffadd guifg= #80a090 guibg= #313c36 gui=no Nehi diffadd ctermfg=108 ctermbg=22 cterm=none "changed Linehi diffchange guifg=no NE guibg= #4a343a Gui=nonehi diffchange ctermfg=fg ctermbg=52 cterm= None "deleted Linehi diffdelete guifg= #6c6661 guibg= #3c3631 Gui=nonehi diffdelete ctermfg= ctermbg=58 cterm=none "changed text within Linehi difftext guifg= #f05060 gu  ibg= #4a343a gui=boldhi difftext ctermfg=203 ctermbg=52 cterm=bold "folds"-----" Line used for closed foLdshi Folded guifg= #91d6f8 guibg= #363946 Gui=nonehi Folded ctermfg=117 ctermbg=238 cterm=none "column on side used to indicated open and closed Foldshi foldcolumn guifg= #91d6 F8 guibg= #363946 Gui=nonehi foldcolumn ctermfg=117 ctermbg=238 Cterm=non E "Search"------"highlight incremental search text; Also highlight text replaced With:s///chi incsearch guifg= #66ffff Gui=reversehi Incsearch ctermfg=87 cterm=reverse "hlsearch (last search pattern), also used                                    For Quickfixhi search guibg= #ffaa33 Gui=nonehi Search ctermbg=214 cterm=none "Popup menu"----------"Normal item in Popuphi Pmenu guifg= #e0e0e 0 guibg= #303840 Gui=nonehi pmenu ctermfg=253 ctermbg=233 Cterm=none "selected item in Popuphi pmenusel guifg= #cae682 guibg= #505860                                Gui=nonehi Pmenusel ctermfg=186 ctermbg=237 cterm=none "scrollbar in Popuphi Pmenusbar              guibg= #505860 Gui=nonehi Pmenusbar ctermbg=59 Cterm=none "Thumb of the scrollbar in the Popuphi pmenuthumb guibg= #808890 g Ui=nonehi pmenuthumb ctermbg=102 cterm=none "status line"-----------"status Li NE for current windowhi statusline guifg= #e0e0e0 guibg= #363946 gui=boldhi statusline cterm fg=254 ctermbg=237 cterm=bold "status line for Non-current Windowshi Statuslinenc guifg= #76798 6 guibg= #363946 Gui=nonehi statuslinenc ctermfg=244 ctermbg=237 cterm=none "Tab Lines"---------"tab pages, not active tab page Labelhi tabline guifg= #b6bf98 guibg= #363946 Gui=nonehi Ta BLine ctermfg=244 ctermbg=236 cterm=none "tab pages line, where there is no Labelshi tab LineFill guifg= #cfcfaf guibg= #363946 gui=nonehi tablinefill ctermfg=187 ctermbg=            236 cterm=none "tab pages line, active tab page Labelhi tablinesel guifg= #efefef guibg= #414658 Gui=boldhi Tablinesel ctermfg=254 ctermbg=236 cterm=bold "Visual"------"visual Mode selectionhi Visual Guifg=none guibg= #364458hi visual Ctermfg=none CTERMBG                                        =24 "Visual mode selection when Vim was not owning the selection (X11 only) Hi Visualnos guifg=fg Gui=underlinehi Visualnos CTERMFG=FG Cterm=underline

Then execute the Set-executionpolicy remotesigned in PowerShell

PowerShell starts vim

PowerShell Configuration Gvim

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.