Last active
October 11, 2019 21:06
-
-
Save r1walz/ec76765f77dcc5078bdf08a96b5c3187 to your computer and use it in GitHub Desktop.
configuration file for vim
This file contains 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 background=dark | |
syntax enable | |
set mouse=n | |
set number | |
set wildmenu | |
set ruler | |
set backspace=eol,start,indent | |
set whichwrap+=<,>,h,l | |
set ignorecase | |
set smartcase | |
set incsearch | |
set showmatch | |
set smarttab | |
set shiftwidth=8 | |
set tabstop=8 | |
set ai | |
set si | |
set wrap | |
match ErrorMsg '\%>68v.\+\|\s\+$\| \+\ze\t' | |
fun! CleanExtraSpaces() | |
let save_cursor = getpos(".") | |
let old_query = getreg('/') | |
silent! %s/\s\+$//e | |
call setpos('.', save_cursor) | |
call setreg('/', old_query) | |
endfun | |
if has("autocmd") | |
autocmd BufWritePre *.txt,*.js,*.py,*.wiki,*.sh,*.coffee :call CleanExtraSpaces() | |
endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment