日常生活的交流与学习

首页 新随笔 联系 管理
set ai 
"自动缩进宽度
set sw=4 
set ts=4 
"关闭高亮显示
set nohlsearch   
set is
set ignorecase
set backspace=indent,eol,start
set clipboard=unnamed
set number

"Set <LEADER> as <SPACE>, ; as :
let mapleader=" "


" jk用于退出j 
:inoremap jk <esc>


"跳转到行首和行尾"
:nnoremap H ^
:nnoremap L A<esc>

:vnoremap H ^
:vnoremap L g_ 



"大写JK,用于切换标签页"
:nnoremap J :vsc Window.NextTab<CR>
:nnoremap K :vsc Window.PreviousTab<CR>

"查找所有引用--  
nnoremap gr :vsc Edit.FindAllReferences<CR>  


"打开解决方案资源管理器  
:nnoremap  <c-;>  :vsc View.SolutionExplorer<CR>  

"快速查看方法定义 
:nnoremap gh :vsc Edit.QuickInfo<CR>
:nnoremap gb :vsc View.NavigateBackward<CR>

"显示错误列表的快捷键
:nnoremap ge :vsc View.ErrorList<CR>
:nnoremap en :vsc View.NextError<CR>
:nnoremap ep :vsc View.PreviousError<CR>

" 窗口关闭
:nnoremap <leader>co :vsc File.CloseAllButThis<CR>


" 代码格式化
:nnoremap <leader>fm :vsc Edit.FormatDocument<CR>
:nnoremap <leader>fM :vsc Edit.FormatSelection<CR>


"代码注释"
:nnoremap <leader>ct :vsc Edit.ToggleLineComment<CR>
:vnoremap <leader>ct:vsc Edit.ToggleLineComment<CR>


:nnoremap <leader>fm :vsc Edit.FormatDocument<CR>


"bookmark"
" `m(ark)` - Navigate forwards through bookmarks
" `M(ark)` - Navigate backwards through bookmarks
" `<leader> + m + m(ark)` - Toggle bookmarks
" `<leader> + m(arks) + r(emove)` - Remove all bookmarks
" `<leader> + m(arks) + a(ll)` - Show bookmarks list
noremap m :vsc Edit.NextBookmark<CR>
noremap M :vsc Edit.PreviousBookmark<CR>
noremap <leader>mm :vsc Edit.ToggleBookmark<CR>
noremap <leader>mr :vsc Edit.ClearBookmarks<CR>
noremap <leader>ma :vsc View.BookmarkWindow<CR>


" `<leader> + s(tart) + b(uild)` - Build solution
" `<leader> + s(tart) + c(lean)` - Clean solution
" `<leader> + s(tart) + b(uild)` + s(election) - Build the project that is currently selected
" `<leader> + s(tart) + c(lean)` + s(election) - Clean the project that is currently selected
" `<leader> + s(tart) + d(ebug)` - Start with debugging
" `<leader> + s(tart) + r(un)` - Run a program without debugging
" `<leader> + s(tarted) + b(uild) + c(ancel)` - Cancel building process
" `<leader> + s(tarted) + d(ebug) + c(ancel)` - Stop debugging
noremap <leader>sb :vsc Build.BuildSolution<CR>
noremap <leader>sc :vsc Build.CleanSolution<CR>
noremap <leader>sbs :vsc Build.BuildSelection<CR>
noremap <leader>scs :vsc Build.CleanSelection<CR>
noremap <leader>sd :vsc Debug.Start<CR>
noremap <leader>sr :vsc Debug.StartWithoutDebugging<CR>
noremap <leader>sbc :vsc Build.Cancel<CR>
noremap <leader>sdc :vsc Debug.StopDebugging<CR>

" `<leader> + /` - Comment/uncomment the current line
noremap <leader>/ :vsc ReSharper.ReSharper_LineComment<CR>


"========================================================================================================"






"重命名
":nnoremap <LEADER>r :vsc VAssistX.RefactorRename<CR>
nmap <leader>r :vsc ReSharper.ReSharper_Rename<CR>



"去定义
":nnoremap gd <C-]>zz

"gq->== 整理代码格式
:nnoremap gq ==
":vnoremap gq ==

"format code
":nnoremap == :vsc Edit.FormatDocument<CR>

"查看函数列表 list methods
":nnoremap zm :vsc VAssistX.ListMethodsInCurrentFile<CR>

"查找所有引用--
:nnoremap ca :vsc Edit.FindAllReferences<CR>
"或者使用VA的命令(vs2017中使用va命令比较好)
":nnoremap ca :vsc VAssistX.FindReferences<CR>


"打开查看类的对话框
":nnoremap cs :vsc VAssistX.FindSymbolDialog<CR>


"打开查看文件的对话框
":nnoremap cf :vsc VAssistX.OpenFileInSolutionDialog<CR>




"open VAOutline
":nnoremap co :vsc VAssistX.VAOutline<CR>


"查找在当前文件中的引用
":nnoremap cj :vsc VAssistX.FindReferencesinFile<CR>

"在文件中查找
":nnoremap ck :vsc Edit.FindinFiles<CR>

"打开文件所在文件夹
":nnoremap cm :vsc File.OpenContainingFolder<CR>

"打开查找符号结果
":nnoremap zs :vsc View.FindSymbolResults<CR>

"打开查找结果1
":nnoremap zi :vsc View.FindResults1<CR>

"打开查找结果2
":nnoremap zu :vsc View.FindResults2<CR>

"打开va的在本文件中查找结果
":nnoremap ,i :vsc VAssistX.FindReferencesResults<CR>

"实现interface接口
":nnoremap zp :vsc VAssistX.RefactorImplementInterface<CR>



posted on 2024-04-10 20:09  lazycookie  阅读(31)  评论(0编辑  收藏  举报