Explorar o código

remove settings copied from omnisharp plugin recommendations and organize custome settins section

Daniel Sheffield hai 1 día
pai
achega
821070c77f
Modificáronse 1 ficheiros con 74 adicións e 74 borrados
  1. 74 74
      vim/vimfiles/vimrc

+ 74 - 74
vim/vimfiles/vimrc

@@ -8,8 +8,6 @@ set foldmethod=marker
 syntax enable
 filetype indent plugin on
 
-nnoremap <LEADER>gid :read !date +\%Y-\%m-\%d<CR>kJ
-
 " Plugins {{{
 call plug#begin()
 
@@ -24,31 +22,36 @@ call plug#end()
 
 " Looks {{{
 
-
-function! ConfigPresent()
-    " Settings for presentation mode
-    set nonumber norelativenumber
-endfunction
-function! ConfigNoPresent()
-    " Settings for non-presentation mode
-    set number relativenumber
-endfunction
-nnoremap <Leader>gp :call ConfigPresent()<CR>
-nnoremap <Leader>gP :call ConfigNoPresent()<CR>
-
 " Window title reflects document title
 set title
 
 " Ye olde faithful
 set textwidth=80
 
+" Sensible autocomplete
+set completeopt=menuone,noinsert,noselect,popuphidden
+set completepopup=highlight:Pmenu,border:off
+
+" Always show status line
+set laststatus=2
+
+" Always show sign column
+set signcolumn=yes
+
+" Mouse support in all modes
+set mouse=a
 
-" HUD {{{
+" Highlight search
 set hlsearch incsearch
-call ConfigNoPresent()
+
+" Show cursor position
 set ruler
-set showcmd
-" }}}
+
+" Show commands on last line of screen
+set showcmd=last
+
+" Show the current mode (Visual, Insert, etc.)
+set showmode
 
 " Spaces instead of TABs :( {{{
 set expandtab       " Use spaces instead of tab characters
@@ -60,6 +63,20 @@ set tabstop=6       " Make TAB char more obvious
 set tabstop=6       " Number of spaces that a tab character represents
 " }}}
 
+" Presentation {{{
+function! ConfigPresent()
+    " Settings for presentation mode
+    set nonumber norelativenumber
+endfunction
+function! ConfigNoPresent()
+    " Settings for non-presentation mode
+    set number relativenumber
+endfunction
+nnoremap <Leader>gp :call ConfigPresent()<CR>
+nnoremap <Leader>gP :call ConfigNoPresent()<CR>
+call ConfigNoPresent()
+" }}}
+
 " }}}
 
 " Feels {{{
@@ -78,6 +95,9 @@ set wildmenu
 set encoding=utf-8
 scriptencoding utf-8
 
+" Insert date
+nnoremap <LEADER>gid :read !date +\%Y-\%m-\%d<CR>kJ
+
 " Copy Pasta {{{
 
 " Registers
@@ -112,6 +132,8 @@ nnoremap gtt V:s/\v<(.)(\w*)/\u\1\L\2/g<CR>:noh<CR>
 " (visual) gt  := titlecase selection
 " (normal) gtt := titlecase line
 
+" Use smart ignore case
+set ignorecase smartcase
 " }}}
 
 " Quote {{{
@@ -130,6 +152,14 @@ vnoremap gi :<C-u>call SelectionSurroundWith()<CR>
 
 " }}}
 
+" Quirks {{{
+" Fix CTRL-] suppressed on Alacritty for Windows
+nnoremap <LEADER><TAB> <C-]>
+
+" Make tilde-slash easier to type on my ~60 key keyboard
+inoremap `/ ~/
+" }}}
+
 " Autoformatting (to be tested) {{{
 "set formatoptions+=c
 "set formatoptions+=n
@@ -143,8 +173,6 @@ vnoremap gi :<C-u>call SelectionSurroundWith()<CR>
 " Enable OmniSharp for C# files
 autocmd FileType cs setlocal omnifunc=OmniSharp#Complete
 
-" Optional: Key mappings {{{
-
 augroup omnisharp_commands
   autocmd!
 
@@ -160,56 +188,39 @@ augroup omnisharp_commands
   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> <Leader>ost <Plug>(omnisharp_type_lookup)
   autocmd FileType cs nmap <silent> <buffer> K <Plug>(omnisharp_documentation)
-"  autocmd FileType cs nmap <silent> <buffer> <Leader>osfs <Plug>(omnisharp_find_symbol)
   autocmd FileType cs nmap <silent> <buffer> <Leader>F <Plug>(omnisharp_fix_usings)
-"  autocmd FileType cs nmap <silent> <buffer> <C-\> <Plug>(omnisharp_signature_help)
-"  autocmd FileType cs imap <silent> <buffer> <C-\> <Plug>(omnisharp_signature_help)
-"
-"  " 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>R <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)
-
   autocmd FileType cs nmap <silent> <buffer> <Leader>T <Plug>(omnisharp_run_tests_in_file)
   autocmd FileType cs nmap <silent> <buffer> <Leader>t <Plug>(omnisharp_run_test)
-augroup END
-" }}}
 
-" Settings: {{{
-set completeopt=menuone,noinsert,noselect,popuphidden
-set completepopup=highlight:Pmenu,border:off
+  " Other settings (currently unused) {{{
+  " autocmd FileType cs nmap <silent> <buffer> <Leader>ost <Plug>(omnisharp_type_lookup)
+  " autocmd FileType cs nmap <silent> <buffer> <Leader>osfs <Plug>(omnisharp_find_symbol)
+  " autocmd FileType cs nmap <silent> <buffer> <C-\> <Plug>(omnisharp_signature_help)
+  " autocmd FileType cs imap <silent> <buffer> <C-\> <Plug>(omnisharp_signature_help)
+  "
+  " " 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>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)
+  " }}}
 
-set backspace=indent,eol,start
-set hidden
-set nofixendofline
-set nostartofline
-set splitbelow
-set splitright
-
-set laststatus=2
-set showmode
-set signcolumn=yes
-
-set mouse=a
-set updatetime=1000
-" }}}
+augroup END
 
 " }}}
 
@@ -399,17 +410,6 @@ let g:OmniSharp_highlight_groups = {
 " Restore some things Max Cantor changed
 unlet g:netrw_banner
 
-" Restore some other defaults that got disabled
-set showcmd
-
 " Clear search highlight after sourcing
 silent! call feedkeys(":nohlsearch\<CR>")
 
-" Fix CTRL-] suppressed on Alacritty for Windows
-nnoremap <LEADER><TAB> <C-]>
-
-" Make navigation a bit easier on Colemak
-set langmap=jk,kj
-
-" Make tilde-slash easier to type on my ~60 key keyboard
-inoremap `/ ~/