VIM: Setup ripgrep and inccommand
RIPGREP ripgrep is now my grep command and I can use [c and ]c for moving between quickfix entries INCCOMMAND Setting this makes vim show the results of substitute commands as they are types
This commit is contained in:
		
							parent
							
								
									21ca27dec4
								
							
						
					
					
						commit
						0c5cadaea6
					
				
					 3 changed files with 52 additions and 0 deletions
				
			
		|  | @ -75,3 +75,6 @@ vnoremap / /\v | |||
| " Makes vim re-select visual selection when using < or > | ||||
| vnoremap < <gv | ||||
| vnoremap > >gv | ||||
| 
 | ||||
| nnoremap [c :cprevious<cr> | ||||
| nnoremap ]c :cnext<cr> | ||||
|  |  | |||
							
								
								
									
										41
									
								
								nvim/.config/nvim/plugin/omnisharp.vim
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								nvim/.config/nvim/plugin/omnisharp.vim
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,41 @@ | |||
| "let g:OmniSharp_highlighting = 0 | ||||
| let g:OmniSharp_selector_ui = 'fzf' | ||||
| 
 | ||||
| augroup omnisharp_commands | ||||
|   autocmd! | ||||
| 
 | ||||
|   " Show type information automatically when the cursor stops moving. | ||||
|   " Note that the type is echoed to the Vim command line, and will overwrite | ||||
|   " any other messages in this space including e.g. ALE linting messages. | ||||
|   "autocmd CursorHold *.cs OmniSharpTypeLookup | ||||
| 
 | ||||
|   " The following commands are contextual, based on the cursor position. | ||||
|   autocmd FileType cs nmap <silent> <buffer> <c-]> <Plug>(omnisharp_go_to_definition) | ||||
|   autocmd FileType cs nmap <silent> <buffer> <Leader>osfi <Plug>(omnisharp_find_implementations) | ||||
|   autocmd FileType cs nmap <silent> <buffer> <Leader>ospd <Plug>(omnisharp_preview_definition) | ||||
|   autocmd FileType cs nmap <silent> <buffer> <Leader>ospi <Plug>(omnisharp_preview_implementations) | ||||
|   autocmd FileType cs nmap <silent> <buffer> K <Plug>(omnisharp_type_lookup) | ||||
|   autocmd FileType cs nmap <silent> <buffer> <Leader>osd <Plug>(omnisharp_documentation) | ||||
|   autocmd FileType cs nmap <silent> <buffer> <Leader>osfs <Plug>(omnisharp_find_symbol) | ||||
|   autocmd FileType cs nmap <silent> <buffer> <Leader>osfx <Plug>(omnisharp_fix_usings) | ||||
| 
 | ||||
|   " Navigate up and down by method/property/field | ||||
|   autocmd FileType cs nmap <silent> <buffer> [[ <Plug>(omnisharp_navigate_up) | ||||
|   autocmd FileType cs nmap <silent> <buffer> ]] <Plug>(omnisharp_navigate_down) | ||||
|   " Find all code errors/warnings for the current solution and populate the quickfix window | ||||
|   autocmd FileType cs nmap <silent> <buffer> <Leader>osgcc <Plug>(omnisharp_global_code_check) | ||||
|   " Contextual code actions (uses fzf, vim-clap, CtrlP or unite.vim selector when available) | ||||
|   autocmd FileType cs nmap <silent> <buffer> <Leader>osca <Plug>(omnisharp_code_actions) | ||||
|   autocmd FileType cs xmap <silent> <buffer> <Leader>osca <Plug>(omnisharp_code_actions) | ||||
|   " Repeat the last code action performed (does not use a selector) | ||||
|   autocmd FileType cs nmap <silent> <buffer> <Leader>os. <Plug>(omnisharp_code_action_repeat) | ||||
|   autocmd FileType cs xmap <silent> <buffer> <Leader>os. <Plug>(omnisharp_code_action_repeat) | ||||
| 
 | ||||
|   autocmd FileType cs nmap <silent> <buffer> <Leader>os= <Plug>(omnisharp_code_format) | ||||
| 
 | ||||
|   autocmd FileType cs nmap <silent> <buffer> <Leader>osnm <Plug>(omnisharp_rename) | ||||
| 
 | ||||
|   autocmd FileType cs nmap <silent> <buffer> <Leader>osre <Plug>(omnisharp_restart_server) | ||||
|   autocmd FileType cs nmap <silent> <buffer> <Leader>osst <Plug>(omnisharp_start_server) | ||||
|   autocmd FileType cs nmap <silent> <buffer> <Leader>ossp <Plug>(omnisharp_stop_server) | ||||
| augroup END | ||||
|  | @ -49,6 +49,14 @@ set formatoptions+=r | |||
| " Automatically insert comment leader after hitting o or O | ||||
| set formatoptions+=o | ||||
| 
 | ||||
| " Show the results of the substitute command as you type | ||||
| set inccommand=nosplit | ||||
| 
 | ||||
| if executable('rg') | ||||
|   set grepprg=rg\ --vimgrep\ --no-heading\ --color=never\ --glob=\"!shell-logs/*\" | ||||
|   set grepformat=%f:%l:%c:%m,%f:%l:%m | ||||
| endif | ||||
| 
 | ||||
| augroup colorcols | ||||
| 	autocmd! | ||||
| 	autocmd FileType,VimEnter,BufEnter * call mine#functions#colorcols() | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue