• Solve VsVim Issue with Visual Studio for Mac: ClosePair(')')


    When use the VsVim plugin in Visual Studio for Mac and type the closing part of a parenthesis, you might see ClosePair(')') pop up with awkward sound. This might because you don't have the `vsvimrc` setting file, so just create one if you don't have with the following cmd:

    vim ~/.vsvimrc

    We can find some setting from the Github, like this one:

    " Set global shortcut in Visual Studio options:
    "     Window.ActivateDocumentWindow => Esc
    " External tool to open new Vim at current line:
    "     gvim.exe $(ItemPath) +$(CurLine)
    " External tool to open in Vim server:
    "     gvim.exe --servername vsvim --remote-silent $(ItemPath)
    "
    "   nnoremap yx<bs>  :vsc OtherContextMenus.FSIConsoleContext.ResetInteractiveSession<cr>
    "   nnoremap !m  :vsc OtherContextMenus.FSIConsoleContext.ResetInteractiveSession<bar>vsc Build.BuildSelection<cr>
    
    set ignorecase
    set smartcase
    set incsearch
    set tabstop=4
    set shiftwidth=4
    set backspace=eol,start,indent
    set nostartofline
    set hlsearch
    set autoindent
    set expandtab
    set ttimeout
    set ttimeoutlen=50
    
    inoremap z,  <c-o>
    inoremap z,p <c-r>"
    
    "horrible hack because VsVim refuses to fix this bug
    nnoremap g; u<c-r>
    
    nnoremap  ,
    nnoremap gj i<cr><esc>k$
    nnoremap s /
    nnoremap S ?
    nnoremap zy  zt5<c-y>
    
    nnoremap gwo :vsc FullScreen<cr>
    nnoremap gws :vsc Window.Split<cr>
    nnoremap gwc :vsc Window.Split<cr>
    nnoremap d<tab> :vsc Window.CloseDocumentWindow<cr>
    nnoremap gwC :vsc Window.CloseDocumentWindow<cr>
    nnoremap gwH :vsc Window.MovetoPreviousTabGroup<cr>
    nnoremap gwL :vsc Window.MovetoNextTabGroup<cr>
    nnoremap gwS :vsc Window.NewHorizontalTabGroup<cr>
    nnoremap gwv :vsc Window.NewVerticalTabGroup<cr>
    nnoremap gwT :vsc Window.Float<cr>
    nnoremap gwj :vsc Window.NextSplitPane<cr>
    nnoremap gwk :vsc Window.PreviousSplitPane<cr>
    
    nnoremap <c-d> <PageDown>
    nnoremap <c-u> <PageUp>
    nnoremap z. :w<cr>
    
    nnoremap vd "_d
    xnoremap x  "_d
    nnoremap vD "_D
    xnoremap P  "0p
    nnoremap =p o<esc>p==
    nnoremap =P O<esc>p==
    xnoremap Y "+y
    
    nnoremap <c-l> :nohlsearch<cr>
    xnoremap - $
    nnoremap - $
    
    nnoremap <c-n> n.
    nnoremap Q @@
    
    nnoremap ]e :m+1<cr>
    nnoremap [e :m-2<cr>j
    xnoremap ]e :m'>+1<cr>gv
    xnoremap [e :m'<-2<cr>jgv
    
    nnoremap Y y$
    
    nnoremap <c-o> :vsc View.NavigateBackward<cr>
    nnoremap <c-i> :vsc View.NavigateForward<cr>
    xnoremap gc :vsc Edit.CommentSelection<cr>
    nnoremap gcc V:vsc Edit.CommentSelection<cr>
    
    "version control
    nnoremap Ud :vsc Team.Git.CompareWithUnmodified<cr>
    nnoremap Us :vsc Team.Git.GoToGitChanges<cr>
    nnoremap ]c :vsc Diff.NextDifference<cr>
    nnoremap [c :vsc Diff.PreviousDifference<cr>
    
    " gs  =>  expression manipulation
    " cr  =>  refactor
    " g/  =>  navigation (search for files/symbols)
    " gk  =>  inspection
    "   g]  =>  peek current symbol
    "   ]I
    "   ]d
    " debugging
    
    nnoremap gr :vsc Edit.FindAllReferences<cr>
    " go to the type of the current symbol
    nnoremap gD :vsc ReSharper.ReSharper_GotoTypeDeclaration<cr>
    nnoremap gI :vsc ReSharper.ReSharper_GotoImplementation<cr>
    nnoremap gI :vsc Edit.GoToImplementation<cr>
    " go to class member ("outline")
    nnoremap <M-o> :vsc ReSharper.ReSharper_GotoFileMember<cr>
    
    " go to file
    nnoremap <C-p> :vsc ReSharper.ReSharper_GotoFile<cr>
    " go to anything ("tags"/types/symbols/files)
    nnoremap g/t :vsc ReSharper.ReSharper_GotoType<cr>
    " grep everything
    nnoremap g// :vsc Edit.FindinFiles<cr>
    " find/replace in current buffer
    nnoremap g/r :vsc Edit.Replace<cr>
    nnoremap gl  :vsc ReSharper.ReSharper_GotoRecentFiles<cr>
    
    nnoremap <C-t> :vsc ReSharper.ReSharper_TypeHierarchy_Browse<cr>
    nnoremap K     :vsc Edit.QuickInfo<cr>
    nnoremap <C-k> :vsc ReSharper.ReSharper_InspectThis<cr>
    nnoremap gk    :vsc Edit.PeekDefinition<cr>
    
    "show refactor menu
    nnoremap crr        :vsc ReSharper.ReSharper_RefactorThis<cr>
    xnoremap <c-r><c-r> :vsc ReSharper.ReSharper_RefactorThis<cr>
    nnoremap crn        :vsc Refactor.Rename<cr>
    nnoremap cri        :vsc EditorContextMenus.CodeWindow.OrganizeUsings.RemoveAndSort<cr>
    "show quickfix menu
    nnoremap <bs> :vsc ReSharper_AltEnter<cr>
    xnoremap <bs> :vsc ReSharper_AltEnter<cr>
    
    " expression manipulation
    nnoremap gst :vsc Edit.WordTranspose<cr>
    nnoremap gsh :vsc ReSharper.ReSharper_MoveLeft<cr>
    nnoremap gsl :vsc ReSharper.ReSharper_MoveRight<cr>
    nnoremap gsk :vsc ReSharper.ReSharper_MoveUp<cr>
    nnoremap gsj :vsc ReSharper.ReSharper_MoveDown<cr>
    
    " evaluate F#
    xnoremap <enter>  :vsc EditorContextMenus.CodeWindow.ExecuteInInteractive<cr>
    nnoremap yxx      ggVG:vsc EditorContextMenus.CodeWindow.ExecuteInInteractive<cr>
    nnoremap <enter>  :vsc EditorContextMenus.CodeWindow.ExecuteLineInInteractive<cr>
    
    nnoremap ]q :vsc Edit.GoToNextLocation<cr>
    nnoremap [q :vsc Edit.GoToPrevLocation<cr>
    nnoremap ]l  :vsc Edit.NextHighlightedReference<cr>
    nnoremap [l  :vsc Edit.PreviousHighlightedReference<cr>
    
    " 'omnibox'
    nnoremap <space> :vsc Window.QuickLaunch<cr>
    
    nnoremap <insert> :vsc Debug.ToggleBreakpoint<cr>
    nnoremap [o<insert> :vsc Debug.EnableAllBreakpoints<cr>
    nnoremap ]o<insert> :vsc Debug.DisableAllBreakpoints<cr>
    nnoremap da<insert> :vsc Debug.DeleteAllBreakpoints<cr>
    
    nnoremap @T :vsc TestExplorer.RepeatLastRun<cr>
    
    nnoremap q; :vsc View.C#Interactive<cr>
    nnoremap q: :vsc View.CommandWindow<cr>
    nnoremap q[ :vsc TestExplorer.ShowTestExplorer<cr>
    nnoremap q] :vsc View.ErrorList<cr>
    
    nnoremap gof :vsc File.OpenContainingFolder<cr>
    nnoremap got :vsc Tools.ExternalCommand2<cr>
    " toggle 'Track Active Item in Solution Explorer' option
    nnoremap cos :vsc View.TrackActivityinSolutionExplorer<cr>
    " highlight active file in Solution Explorer (VS 2012+)
    nnoremap ^ :vsc SolutionExplorer.SyncWithActiveDocument<cr>
    
    nnoremap cow :vsc Edit.ToggleWordWrap<cr>

    喜欢请点赞,疼爱请打赏❤️~.~


    微信打赏


    Venmo 打赏

  • 相关阅读:
    C++基于范围的for循环性能测试(针对std::vector)
    C++ 中std::function 、std::bind的使用和lambda的使用
    C++ auto 关键字的使用
    C++内存管理解析
    c++类内存分布解析
    Windows上编译GRPC
    在从1到n的正数中1出现的次数
    POJ 1009 解题报告
    Cheat Engine 笔记
    Cheat Engine 教程 Step 9
  • 原文地址:https://www.cnblogs.com/grandyang/p/15250119.html
Copyright © 2020-2023  润新知