Created
April 3, 2026 10:55
-
-
Save M9k/17193286d68b8785e63a966bddf7a5b7 to your computer and use it in GitHub Desktop.
My gvim config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| source $VIMRUNTIME/vimrc_example.vim | |
| source $VIMRUNTIME/mswin.vim | |
| behave mswin | |
| set diffexpr=MyDiff() | |
| function MyDiff() | |
| let opt = '-a --binary ' | |
| if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif | |
| if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif | |
| let arg1 = v:fname_in | |
| if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif | |
| let arg2 = v:fname_new | |
| if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif | |
| let arg3 = v:fname_out | |
| if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif | |
| if $VIMRUNTIME =~ ' ' | |
| if &sh =~ '\<cmd' | |
| if empty(&shellxquote) | |
| let l:shxq_sav = '' | |
| set shellxquote& | |
| endif | |
| let cmd = '"' . $VIMRUNTIME . '\diff"' | |
| else | |
| let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"' | |
| endif | |
| else | |
| let cmd = $VIMRUNTIME . '\diff' | |
| endif | |
| silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 | |
| if exists('l:shxq_sav') | |
| let &shellxquote=l:shxq_sav | |
| endif | |
| endfunction | |
| "color M9k | |
| color koehler | |
| set number | |
| set guioptions -=T | |
| set lines=40 columns=140 | |
| nnoremap <silent> <C-l> :nohl<CR><C-l> | |
| function! InsertStatuslineColor(mode) | |
| if a:mode == 'i' | |
| hi statusline guibg=magenta guifg=black | |
| elseif a:mode == 'r' | |
| hi statusline guibg=blue guifg=black | |
| else | |
| hi statusline guibg=red guifg=black | |
| endif | |
| endfunction | |
| au InsertEnter * call InsertStatuslineColor(v:insertmode) | |
| au InsertChange * call InsertStatuslineColor(v:insertmode) | |
| au InsertLeave * hi statusline guibg=green guifg=black | |
| " default the statusline to green when entering Vim | |
| hi statusline guibg=green guifg=black | |
| vmap <Tab> >gv | |
| vmap <S-Tab> <gv | |
| set tabstop=4 | |
| set whichwrap+=<,>,h,l,[,] | |
| set shiftwidth=4 | |
| "nerdtree | |
| " autocmd VimEnter * NERDTree . | |
| " let NERDTreeShowBookmarks=1 | |
| " autocmd VimEnter * wincmd w | |
| "tagbar | |
| "let g:tagbar_ctags_bin = 'C:\Users\Mirco Cailotto\vimfiles\ctags58\ctags.exe' | |
| "let g:tagbar_left=1 | |
| autocmd VimEnter * TagbarOpen . | |
| set guioptions-=L | |
| "synastic | |
| let g:syntastic_cpp_compiler = 'clang++' | |
| let g:syntastic_cpp_compiler_options = ' -std=c++11 -stdlib=libc++' | |
| "setta le cartelle temporanee | |
| set backupdir=%appdata%\VIM\backup | |
| set undodir=%appdata%\VIM\undo | |
| "apri la cartella del file corrente | |
| set autochdir | |
| "mappa ~ in Ctrl+1 | |
| inoremap <c-q> ~ | |
| " niente autoindent | |
| set wrap linebreak nolist | |
| set formatoptions-=t | |
| "UTF-8 | |
| set encoding=utf-8 | |
| set fileencoding=utf-8 | |
| "Abilita il plugin java complete 2 attraverso vim-plug | |
| ":PlugInstall per installare | |
| "call plug#begin('~/vimfiles/plugged_plugin') | |
| "Plug 'artur-shaik/vim-javacomplete2' | |
| "Plug 'tomlion/vim-solidity' | |
| "call plug#end() | |
| "Un tab crea 4 spazi | |
| "set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab | |
| "Un tab crea 2 spazi | |
| "set tabstop=8 softtabstop=0 expandtab shiftwidth=2 smarttab | |
| "setta i capolinea alla Unix | |
| set ff=unix | |
| "e ++ff=unix | |
| "w ++ff=unix | |
| set guifont=Fixedsys:h12:cANSI:qDRAFT | |
| "entra in edit | |
| start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment