Skip to content

Instantly share code, notes, and snippets.

@agrawal-d
Last active June 10, 2021 04:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agrawal-d/717068c45845e7e2b77e6d49b8598cd7 to your computer and use it in GitHub Desktop.
Save agrawal-d/717068c45845e7e2b77e6d49b8598cd7 to your computer and use it in GitHub Desktop.
My Vim resource configuration file for the xub system
set nocompatible
syntax on
set number
set ruler
colorscheme one
set autoindent
set hlsearch " enable search highlighting
set wrap
set title
set shiftround
set ignorecase
set incsearch
set smartcase
set cursorline
set mouse=a " Enable mouse
set background=dark
set wildmenu
set lazyredraw
" Diff function (https://stackoverflow.com/questions/749297/can-i-see-changes-before-i-save-my-file-in-vim/22360650)
function! s:DiffWithSaved()
let filetype=&ft
diffthis
vnew | r # | normal! 1Gdd
diffthis
exe "setlocal bt=nofile bh=wipe nobl noswf ro ft=" . filetype
endfunction
com! DiffSaved call s:DiffWithSaved()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment