parent
ccbd922a6d
commit
f0c74d95f5
@ -1,3 +1,48 @@ |
||||
# windows-vim |
||||
This is a quick dump of my windows Vim setup. I run |
||||
gvim on windows with this setup and also in the browser. |
||||
|
||||
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. |
||||
This is the list of vim-plugins that I install via pathogen: |
||||
|
||||
``` |
||||
ale |
||||
bufexplorer |
||||
codi.vim |
||||
emmet-vim |
||||
fzf |
||||
fzf.vim |
||||
html5.vim |
||||
ListToggle |
||||
nim.vim |
||||
scss-syntax.vim |
||||
tagbar |
||||
tlib_vim |
||||
vim-addon-mw-utils |
||||
vim-css3-syntax |
||||
vim-dispatch |
||||
vim-easymotion |
||||
vim-fugitive |
||||
vim-gitgutter |
||||
vim-indent-guides |
||||
vim-javascript |
||||
vim-sensible |
||||
vim-snipmate |
||||
vim-snippets |
||||
vim-surround |
||||
vim-svelte |
||||
vim-test |
||||
``` |
||||
|
||||
Remove what you don't want. I also have the following software installed: |
||||
|
||||
Software |
||||
== |
||||
|
||||
[PowerToys](https://github.com/microsoft/PowerToys) - Remap keys and other useful things like alt-space search. |
||||
[AG](https://github.com/ggreer/the_silver_searcher) - Good code search, but not good all files search. |
||||
[RipGrep](https://github.com/BurntSushi/ripgrep) -- Mediocre grep alternative. It works but it will consistently skip files in arbitrary situations for "speed". |
||||
[cmder](https://cmder.net/) -- A PowerShell reskin/terminal that includes most of the stuff you need as a developer, like git. Also has something called "posh git" that gives improved CLI status, but it's slow so consider removing it. |
||||
|
||||
Fonts |
||||
== |
||||
|
||||
[VictorMono](https://rubjo.github.io/victor-mono/) -- Great for Vim, but on the web the author decided to _by default_ enable sigils that convert code text to arbitrary math symbols nobody wants. |
||||
|
@ -0,0 +1,131 @@ |
||||
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 |
Loading…
Reference in new issue