filetype indent plugin on let g:OmniSharp_server_stdio = 1 set previewheight=5 let g:OmniSharp_highlight_types = 3 let g:OmniSharp_server_path = '/mnt/c/Users/bkains/AppData/Local/omnisharp-vim/omnisharp-roslyn/OmniSharp.exe' let g:OmniSharp_translate_cygwin_wsl = 1 set completeopt=longest,menuone,preview augroup omnisharp_commands autocmd! " Show type information automatically when the cursor stops moving autocmd CursorHold *.cs call OmniSharp#TypeLookupWithoutDocumentation() " The following commands are contextual, based on the cursor position. autocmd FileType cs nnoremap gd :OmniSharpGotoDefinition autocmd FileType cs nnoremap fi :OmniSharpFindImplementations autocmd FileType cs nnoremap fs :OmniSharpFindSymbol autocmd FileType cs nnoremap fu :OmniSharpFindUsages " Finds members in the current buffer autocmd FileType cs nnoremap fm :OmniSharpFindMembers autocmd FileType cs nnoremap fx :OmniSharpFixUsings autocmd FileType cs nnoremap tt :OmniSharpTypeLookup autocmd FileType cs nnoremap dc :OmniSharpDocumentation autocmd FileType cs nnoremap :OmniSharpSignatureHelp autocmd FileType cs inoremap :OmniSharpSignatureHelp " Navigate up and down by method/property/field autocmd FileType cs nnoremap :OmniSharpNavigateUp autocmd FileType cs nnoremap :OmniSharpNavigateDown " Find all code errors/warnings for the current solution and populate the quickfix window autocmd FileType cs nnoremap cc :OmniSharpGlobalCodeCheck " Running tests autocmd FileType cs nnoremap rt :OmniSharpRunTest autocmd FileType cs nnoremap ra :OmniSharpRunTestsInFile augroup END " Contextual code actions (uses fzf, CtrlP or unite.vim when available) nnoremap :OmniSharpGetCodeActions " Run code actions with text selected in visual mode to extract method xnoremap :call OmniSharp#GetCodeActions('visual') " Rename with dialog nnoremap nm :OmniSharpRename nnoremap :OmniSharpRename " Rename without dialog - with cursor on the symbol to rename: `:Rename newname` command! -nargs=1 Rename :call OmniSharp#RenameTo("") nnoremap cf :OmniSharpCodeFormat " Start the omnisharp server for the current solution nnoremap ss :OmniSharpStartServer nnoremap sp :OmniSharpStopServer nnoremap :!msbuild