Skip to content

Instantly share code, notes, and snippets.

@random-integer
Created October 14, 2018 04:08
Show Gist options
  • Select an option

  • Save random-integer/19668f1489a883e0d6d909dea47b5c28 to your computer and use it in GitHub Desktop.

Select an option

Save random-integer/19668f1489a883e0d6d909dea47b5c28 to your computer and use it in GitHub Desktop.
My _vimrc
source $VIMRUNTIME/vimrc_example.vim
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 arg1 = substitute(arg1, '!', '\!', 'g')
let arg2 = v:fname_new
if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
let arg2 = substitute(arg2, '!', '\!', 'g')
let arg3 = v:fname_out
if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
let arg3 = substitute(arg3, '!', '\!', 'g')
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
let cmd = substitute(cmd, '!', '\!', 'g')
silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3
if exists('l:shxq_sav')
let &shellxquote=l:shxq_sav
endif
endfunction
" MyDiff() end
" MyDiff() end
set nocompatible
filetype off
set langmenu=en_US.UTF-8 " sets the language of the menu (gvim)
language en " sets the language of the messages / ui (vim)
" Plug
call plug#begin('D:\VimPlugins')
Plug 'vim-syntastic/syntastic'
Plug 'terryma/vim-multiple-cursors'
Plug 'itchyny/lightline.vim'
Plug 'tpope/vim-sensible'
Plug 'NLKNguyen/papercolor-theme'
Plug 'plasticboy/vim-markdown'
Plug 'roxma/nvim-yarp', {'cond': v:version == 800 && !has('nvim')}
Plug 'roxma/vim-hug-neovim-rpc', {'cond': v:version == 800 && !has('nvim')}
Plug 'raghur/vim-ghost', {'do': ':GhostInstall'}
call plug#end()
" Plug
syntax on
filetype plugin indent on
set guifont=Consolas:h11
let g:lightline={
\ 'colorscheme': 'PaperColor'
\ }
set laststatus=2 " for the status bar
set nu " line numbering
set lbr " line wrap at word
set wrap " line wrap
set ai " automatic indent
set softtabstop=0
set tabstop=4
set shiftwidth=4
set noexpandtab
set smartindent
set noshowmode
nnoremap j gj
nnoremap k gk
nnoremap <up> gk
nnoremap <down> gj
set fileencoding=utf-8
set encoding=utf-8
set t_Co=256
set background=dark
colorscheme PaperColor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment