This is a quick dump of my windows vim setup. This works fairly well and I've written a lot of software using this. I also include other software I installed.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
windows-vim/_vimrc

131 lines
3.1 KiB

execute pathogen#infect()
syntax enable
filetype plugin indent on
set diffopt+=iwhite,vertical
set fileformat=unix
set statusline+=%#warningmsg#
set statusline+=%*
" my customizations from my previous
nmap <Leader>S <ESC>:setlocal spell spelllang=en_us<CR>
set number
nmap <Leader>M <ESC>:wa<CR>:make!<CR>
nmap <Leader>D <ESC>:w<CR>:diffthis<CR>
nmap <Leader>d <ESC>:w<CR>:diffoff<CR>
nmap f <Plug>(easymotion-bd-f)
nmap F <Plug>(easymotion-overwin-f)
nmap <Leader>n :cnext<CR>
nmap <Leader>p :cprevious<CR>
nmap <Leader>g :Ag<CR>
nmap <Leader>f :Files<CR>
nmap <Leader>b :Buffers<CR>
" under windows not a damn thing about dispatch or test works
" you have to reconfigure vim to use powershell then you have
" run:
"
" Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser
set shell=powershell
set shellcmdflag=-c
set shellquote=\"
set shellxquote=
nmap <Leader>T :TestSuite<CR>
set grepprg=rg\ --vimgrep
colorscheme industry
" set sane autoindent and 4 space soft tabs
syntax enable
set cindent
set nopaste " people say this has to be off
set tabstop=4
set shiftwidth=2
set softtabstop=2
set expandtab
set autoindent
set smartindent
autocmd FileType js setlocal shiftwidth=2 softtabstop=2 expandtab
autocmd FileType svelte setlocal shiftwidth=2 softtabstop=2 expandtab
autocmd FileType markdown setl noai nocin nosi inde=<CR> tw=100
set guifont=Consolas:h22:cANSI:qDRAFT
set hidden
nnoremap <MiddleMouse> <Nop>
nnoremap <2-MiddleMouse> <Nop>
nnoremap <3-MiddleMouse> <Nop>
nnoremap <4-MiddleMouse> <Nop>
inoremap <MiddleMouse> <Nop>
inoremap <2-MiddleMouse> <Nop>
inoremap <3-MiddleMouse> <Nop>
inoremap <4-MiddleMouse> <Nop>
nnoremap <F8> :setl noai nocin nosi inde=<CR> tw=100
set visualbell
augroup VimCSS3Syntax
autocmd!
autocmd FileType css setlocal iskeyword+=-
augroup END
let g:gitgutter_git_executable = 'C:\Shared\cmder\vendor\git-for-windows\bin\git.exe'
highlight clear SignColumn
highlight GitGutterAdd ctermfg=green guifg=darkgreen
highlight GitGutterChange ctermfg=yellow guifg=darkyellow
highlight GitGutterDelete ctermfg=red guifg=darkred
highlight GitGutterChangeDelete ctermfg=yellow guifg=darkyellow
let g:indent_guides_guide_size = 1
let g:indent_guides_color_change_percent = 3
let g:indent_guides_enable_on_vim_startup = 1
let test#strategy = "dispatch"
let g:ale_linter_aliases = {
\ 'svelte': ['css', 'javascript'],
\ 'css': ['css'],
\}
let g:ale_linters = {
\ 'css': ['stylelint'],
\ 'svelte': ['stylelint', 'eslint'],
\ 'javascript': ['eslint'],
\ 'nim': ['nimlsp', 'nimcheck'],
\}
let g:ale_fixers = {
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
\ 'nim': ['nimpretty'],
\}
let g:ale_linters_explicit = 1
let g:ale_set_loclist = 0
let g:ale_set_quickfix = 0
let g:ale_lint_on_text_changed = 'never'
let g:ale_lint_on_insert_leave = 0
let g:ale_fix_on_save = 1
let g:ale_sign_error = '!'
let g:ale_sign_warning = '?'
highlight ALEErrorSign guifg=Red
highlight ALEWarningSign guifg=Yellow
set ff=unix
set ffs=unix
fun! JumpToDef()
if exists("*GotoDefinition_" . &filetype)
call GotoDefinition_{&filetype}()
else
exe "norm! \<C-]>"
endif
endf
" Jump to tag
nn <M-g> :call JumpToDef()<cr>
ino <M-g> <esc>:call JumpToDef()<cr>i