Last active
June 10, 2021 04:11
-
-
Save agrawal-d/717068c45845e7e2b77e6d49b8598cd7 to your computer and use it in GitHub Desktop.
My Vim resource configuration file for the xub system
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
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